I am new to signal processing, and was reading about filters. I came upon the Sobel filter which has the following forms,
$\textbf{G}_x = \begin{bmatrix}+1 & 0 & -1\\+2 & 0 & -2\\+1 & 0 & -1 \end{bmatrix} * \textbf{A}$ and $\textbf{G}_y = \begin{bmatrix}+1 & +2 & +1\\0 & 0 & 0\\-1 & -2 & -1 \end{bmatrix} * \textbf{A}$
From what I understand to apply this filter to a 2-d signal, place the filter's center on the correct point and multiply the coefficients with the signal at the points of overlap and add them together. So for the following example signal, applying the horizontal sobel filter from above would give:
Signal Output (edges are left alone)
|100|100|100|100| |100| 100| 100|100|
| 10| 10| 10| 10| | 10| 360| 360| 10|
| 10| 10| 10| 10| | 10|-360|-360| 10|
|100|100|100|100| |100| 100| 100|100|
Separable filters are more computationally efficient and the Sobel filter is one of them. My problem is I can't figure out how the separable filter is applied. So, what I want to ask is how would the Sobel filter be applied separably?
$$\begin{bmatrix}1 & 2 & 1\\0 & 0 & 0\\-1 & -2 & -1\end{bmatrix} = \begin{bmatrix}1\\0\\-1\end{bmatrix}\begin{bmatrix}1 & 2 & 1\end{bmatrix} = \begin{bmatrix}1\\1\end{bmatrix} * \begin{bmatrix}1\\-1\end{bmatrix} \begin{bmatrix}1 & 1\end{bmatrix} * \begin{bmatrix}1 & 1\end{bmatrix}$$