Convolution Operation on 2-d

When we apply the kernel on the 30*30 image, each and every pixel is changed. How?

Assume the kernel is 3*3 matrix

Do we keep kernel in such a way that each pixel is placed in the center ??

In that case, for the top most pixel in the input matrix, who can be the neighbours?

Please explain?

Hi Jay,
For this, you can use padding of 1 on each side to slide your 3*3 kernel so that each pixel is centered once.