# Prewitt operator and central difference?

When taking the gradient of an image one can do $I * \begin{bmatrix}+1 \ 0 \ -1\end{bmatrix}$ (x direction).

As I understand this is basically applying central differences in the x direction, $\delta_h[f](x) = f(x+\tfrac12h)-f(x-\tfrac12h)$. But since the gradient is a vector of the derivatives and $f'(x) \approx \frac{\delta_h[f](x)}{h}$ shouldn't it be $I * \frac{1}{2} \begin{bmatrix}+1 \ 0 \ -1\end{bmatrix}$?

And what about the the Prewitt operator $\begin{bmatrix}+1 \ 0 \ -1 \\+ 1 \ 0 \ -1 \\ +1 \ 0 \ -1\end{bmatrix}$ (x direction)? As I understand there's some relation to finite differences as well, but how does having a 3x3 kernel affect this relation?

Yes, the $1/2$ factor correction could be present, so that the magnitudes between a) the continuous derivative and b) the approximated gradient remain consistent in some way: a (continuous) line with a unit slope will have its discretized version get a unit gradient with the $1/2$ factor.