Sobel and Prewitt operators decomposition
The part:
\begin{bmatrix} 
1\\
1\\
1
\end{bmatrix}
acts on vertical pixels 
\begin{bmatrix} 
x_{1,\cdot}\\
x_{2,\cdot}\\
x_{3,\cdot}
\end{bmatrix}
as a weighted sum with equal weights, and if divided by $3$ like a 3-point average $(x_{1,\cdot}+x_{2,\cdot}+x_{3,\cdot})/3$.

Then, 
\begin{bmatrix}
+1 &amp; 0 &amp; -1
\end{bmatrix}
acts on a row of horizontal pixels 
\begin{bmatrix}
x_{\cdot,1}&amp;
x_{\cdot,2}&amp;
x_{\cdot,3}
\end{bmatrix}
like the discrete 3-point derivative: $(x_{\cdot,1}-x_{\cdot,3})/2$ up to the $2$ factor. Here, up to a global $6$ factor, it acts like a smoother vertically combined with a gradient horizontally. The same reasoning works when you switch directions. This notion relates to the separability of a 2D mask into the product of two 1D operators.

Additional sources:


What's logic behind the constuction of Sobel's filter in image processing?
How to find out if a transform matrix is separable?