# Finding basis for Null Space of matrix

$A = \begin{bmatrix}1&1&1&-1&0\\1&0&1&0&1\\0&0&1&0&0\\2&0&3&0&2\end{bmatrix}$

Find a basis for the row space, column space, and null space.

I think the first two parts are easy. First;

$rref(A) = \begin{bmatrix}1&0&0&0&1\\0&1&0&-1&-1\\0&0&1&0&0\\0&0&0&0&0\end{bmatrix}$

So my row space is just the 3 pivot rows of $rref(A)$, and the column space, the corresponding columns of $A$.

I'm a little murky on the null space. I know it's the set of all vectors $x$ which satisfy $Ax = 0$. Since I have 5 columns;

$\begin{bmatrix}1&1&1&-1&0\\1&0&1&0&1\\0&0&1&0&0\\2&0&3&0&2\end{bmatrix}\begin{pmatrix}x_1\\x_2\\x_3\\x_4\\x_5\end{pmatrix} = 0$

And I can find a solution, $x = (1, 0, 0, 1, -1)^t$.

However I notice that A has rank of 3, with 5 columns, and I think this means I have to find two solutions for x (due to rank-nullity theorem).

Am I on the right track, and is there a good strategy for finding these solutions easily?

$x$ satisfies $Ax=0$ if and only if it satisfies $rref(A) x = 0$. [You could do it your way by looking at $Ax=0$, but it is much easier if you use the RREF.]

Writing out the last expression gives you three equations. \begin{align} x_1+x_5 &= 0\\ x_2 - x_4 - x_5 &= 0\\ x_3 &= 0 \end{align} So, any solution is of the form $$\begin{bmatrix}x_1 \\ x_2 \\ 0 \\ x_1+x_2 \\ -x_1\end{bmatrix} = x_1 \begin{bmatrix}1 \\ 0 \\ 0 \\ 1 \\ -1\end{bmatrix} + x_2 \begin{bmatrix}0 \\ 1 \\ 0 \\ 1 \\ 0\end{bmatrix}.$$

• Fantastic! This is exactly the kind of thing I was looking for. Thank you very much :) – KookieMonster Feb 5 '17 at 4:03

$$x_1+x_5=0\\ x_2-x_4-x_5=0\\ x_3=0$$ From the first equation: $x_5=-x_1$.

Substituting into the second equation: $x_1=x_4-x_2$.

Conclusion: you can choose $x_2$ and $x_4$ freely and then $x_1$, $x_3$ and $x_5$ are determined.

In other words the solution set of $$\begin{bmatrix}1&1&1&-1&0\\1&0&1&0&1\\0&0&1&0&0\\2&0&3&0&2\end{bmatrix}\begin{pmatrix}x_1\\x_2\\x_3\\x_4\\x_5\end{pmatrix} = 0$$ is $$\{(x_1,x_2,x_3,x_4,x_5)\in\mathbb{R}^5:x_3=0,x_1=x_4-x_2,x_5=-x_1,x_2\in\mathbb{R},x_4\in\mathbb{R}\}$$ The choice $x_2=0$, $x_4=1$ gives the vector $x$ you found.

The choice $x_2=1$, $x_4=1$ gives the vector $y=(0,1,0,1,0)^t$ which is clearly linearly independent to $x$.