# Null Space

Like Row Space and Column Space, Null Space is another fundamental space in a matrix, being the set of all vectors which end up as zero when the transformation is applied to them.

In cases where the transformation does not flatten all of space into a lower dimension, the null space will just contain the zero vector, since the only thing that can get transformed to zero is the zero vector itself.

In other cases, there is an interesting compliment going on between both the Column Space, the Row Space and the Null Space.

Consider the same case above where space was squished on to a plane.

You can imagine that on every point of this plane, there was once a whole line full of vectors sticking out perpendicular to the plane that got squashed down to a single point. But there is a special line sticking out from the origin of all vectors that got squashed down on to the origin, or the zero vector. In this case, that line is the set of all vectors that ended up on the zero vector under the transformation, so it is the Null Space.

(Astute readers might instantly recognize that this line is the surface normal to the plane in both directions)

Now on to actually computing the Null Space. What we are after is a solution to the system of equations, some valid values for $x,y,z$, such that any linear combination of the vector made up of $x,y,z$ gets squished down to the zero vector.

To do that, we can just use Elementary Row Operations to get the matrix into a form that is a little easier to work with, and then try and solve for those values from there.

Now, recall that our original matrix row-reduces as follows:

$\left[\begin{array}{ccc}1& 2& 3\\ 2& 2& 2\\ -1& 0& 1\end{array}\right]$~$\left[\begin{array}{ccc}0& 0& 0\\ 2& 1& 0\\ 0& 2& 4\end{array}\right]$

And recall that we are trying to solve the system when the result is the zero vector

$\left[\begin{array}{ccc}0& 0& 0\\ 2& 1& 0\\ 0& 2& 4\end{array}\right]$$\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$$\left[\begin{array}{c}0\\ 0\\ 0\end{array}\right]$

Now, how do we solve for $x,y,z$, from here? One thing to pay attention to are what we call basic variables and free variables. A basic variable has a leading entry, whereas a free variable does not.

So in this case, our basic variables are $x$ and$y$ since we have a 2 in the first column of the second row and a 2 in the second column of the third row.$z$ is not a leading column, so it is a free variable.

In order to solve the system, we can rephrase the two basic variables in terms of the free variable:

$2y+4z=0$$y=-2z$

And solving for $x$...

$2x+y=0$$2x-2z=0$$-2z=-2x$$x=z$

Now that we have a solution for $x,y$ in terms of $z$, we can express it as a vector like this:

$\left[\begin{array}{c}z\\ -2z\\ z\end{array}\right]$

Or more specifically:

$\left[\begin{array}{c}1\\ -2\\ 1\end{array}\right]$$z$

Thus, the vector $\left[\begin{array}{c}1\\ -2\\ 1\end{array}\right]$ is the basis for the Null Space of the transformation. You will also notice that this is the exact same vector we found earlier as the normal vector to the plane.