Let's say I have a $2 \times 2$ pixel of grayscale picture, where there is one edge such that the left pixel contains a value, 30, and the right pixels contain a value 0 (in red below). And for edge detection I have zero-padded the input image and then used the Sobel vertical filter to find out the vertical edges and apply ReLU to the output. The output is a $2 \times 2$ matrix with all pixel values $0$. So that should mean there is no edge in the picture whereas in actual case it has one. Where am I going wrong?
I assume that you would like to use convolution with padding with the same size of output matrix as this picture. You messed up calculations with convolution with "full padding". If we imagine these two matrices as windows that slide on each other, you can see that the filter is symmetrically inverted. I used a little bit different filter to show you in a better way how it works (I changed the last row to [-3, 0 3]).
Assuming these matrices:
You should add to your picture matrix two rows and columns of zeros:
Then you can start matrix multiplication, but notice that the filter is symmetrically inverted. The result shown as matrix $4 \times 4$ is the convolution with "full padding". The $2 \times 2$ matrix in the middle is a result of convolution with the "same padding", that you requested.
Some iterations later:
For convolution with the same size, the result will be the small $2 \times 2$ matrix in the middle.
After using the ReLU function, the result will be exactly the same.
So with using of your filter, the result would look like [[0,90], [0,90]].