# How Does a Separable Filter Work?

I am new to signal processing, and was reading about filters. I came upon the sobel filter which has the following forms,

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?

It comes down to being able to do a separate 1-D filters in each direction (requiring $MN(P + Q)$ multiplies and adds), rather than a single 2-D convolution ($MNPQ$ multiplies and adds). Here the image is assumed to be $M \times N$ and the convolution kernel $P \times Q$.