Skip to main content

Null Space - Solve Ax=0A\vec x = \vec 0

Previously we saw how to get echelon form, pivot/free column vectors of a matrix say AA.
Now let's find x\vec{x} that solves Ax=0A\vec{x}=\vec{0}

(say) A=[122200240000]A=\begin{bmatrix} \fbox{1} & 2 & 2 & 2\\ 0 & 0 & \fbox{2} & 4\\ 0 & 0 & 0 & 0\\ \end{bmatrix}
Note that we can get free columns by a linear combination of pivot columns.
So we are free to scale our free columns.
So consider,

A=[1λ122λ220λ102λ240λ100λ20] and λiR i={1,2}A'=\begin{bmatrix} \fbox{1} & \lambda_1*2 & 2 & \lambda_2*2\\ 0 & \lambda_1*0 & \fbox{2} & \lambda_2*4\\ 0 & \lambda_1*0 & 0 & \lambda_2*0\\ \end{bmatrix} \text{ and } \lambda_i\in\mathbb{R}\ \forall i=\{1,2\}
info

Because free columns are the linear combination of pivot columns, we can say that the Null space we get by Ax=0A\vec {x}=\vec{0} is the same Null space we get by Ax=0A'\vec{x}=\vec{0}

So now we will find solution for Ax=0A'\vec{x}=\vec{0}

Ax=[1λ122λ220λ102λ240λ100λ20][x1x2x3x4]=[000]A'\vec{x}= \begin{bmatrix} \fbox{1} & \lambda_1*2 & 2 & \lambda_2*2\\ 0 & \lambda_1*0 & \fbox{2} & \lambda_2*4\\ 0 & \lambda_1*0 & 0 & \lambda_2*0\\ \end{bmatrix} \begin{bmatrix} x_1\\x_2\\x_3\\x_4\\ \end{bmatrix} = \begin{bmatrix} 0\\0\\0\\ \end{bmatrix}

Let's see 22 approaches to achieve it.

Approach 1

note

So we have system of equation:

x1+2λ1x2+2x3+2λ2x4=00+0+2x3+4λ2x4=00+0+0+0=0\begin{matrix} x_1 & + & 2\lambda_1x_2 & + & 2x_3 & + & 2\lambda_2x_4 & = & 0 \\ 0 & + & 0 & + & 2x_3 & + & 4\lambda_2x_4 & = & 0 \\ 0 & + & 0 & + & 0 & + & 0 & = & 0 \\ \end{matrix}

We are free to choose λ1\lambda_1 and λ2\lambda_2 so let λ1=1x2\lambda_1=\frac{1}{x_2}, λ2=0\lambda_2=0
Then our system of equation becomes:

x1+2+2x3+0=00+0+2x3+0=00+0+0+0=0\begin{matrix} x_1 & + & 2 & + & 2x_3 & + & 0 & = & 0 \\ 0 & + & 0 & + & 2x_3 & + & 0 & = & 0 \\ 0 & + & 0 & + & 0 & + & 0 & = & 0 \\ \end{matrix}
x=[2100]\Rightarrow x= \begin{bmatrix} -2\\1\\0\\0\\ \end{bmatrix}

Now let's set λ1,λ2\lambda_1,\lambda_2 some different value to get x2,x4x_2,x_4
let λ1=0\lambda_1=0, λ2=1x4\lambda_2=\frac{1}{x_4}
So we have system of equation:

x1+0+2x3+2=00+0+2x3+4=00+0+0+0=0\begin{matrix} x_1 & + & 0 & + & 2x_3 & + & 2 & = & 0 \\ 0 & + & 0 & + & 2x_3 & + & 4 & = & 0 \\ 0 & + & 0 & + & 0 & + & 0 & = & 0 \\ \end{matrix}
x=[2021]\Rightarrow x= \begin{bmatrix} 2\\0\\-2\\1\\ \end{bmatrix}

Approach 2

note
Ax=[1λ122λ220λ102λ240λ100λ20][x1x2x3x4]=[000]A'\vec{x}= \begin{bmatrix} \fbox{1} & \lambda_1*2 & 2 & \lambda_2*2\\ 0 & \lambda_1*0 & \fbox{2} & \lambda_2*4\\ 0 & \lambda_1*0 & 0 & \lambda_2*0\\ \end{bmatrix} \begin{bmatrix} x_1\\x_2\\x_3\\x_4\\ \end{bmatrix} = \begin{bmatrix} 0\\0\\0\\ \end{bmatrix}

We can write it as.

Ax=[122200240000][x1λ1x2x3λ2x4]=[000]A'\vec{x}= \begin{bmatrix} \fbox{1} & 2 & 2 & 2\\ 0 & 0 & \fbox{2} & 4\\ 0 & 0 & 0 & 0\\ \end{bmatrix} \begin{bmatrix} x_1\\ \lambda_1*x_2\\x_3\\ \lambda_2*x_4\\ \end{bmatrix} = \begin{bmatrix} 0\\0\\0\\ \end{bmatrix}

We are free to choose λ1\lambda_1 and λ2\lambda_2 so let λ1=1x2\lambda_1=\frac{1}{x_2}, λ2=0\lambda_2=0
By solving it we get

x=[2100]\Rightarrow x= \begin{bmatrix} -2\\1\\0\\0\\ \end{bmatrix}

By choosing λ1=0\lambda_1=0, λ2=1x4\lambda_2=\frac{1}{x_4}

We get x=[2021]\Rightarrow x= \begin{bmatrix} 2\\0\\-2\\1\\ \end{bmatrix}

So we have two special solution.

info

They are special solution because we crafted those solution in such a way that, in one solution we didn't consider free vector c4c_4 but consider c2c_2, and in another solution we didn't consider c2c_2 but consider c4c_4.

We can get all the possible x\vec{x} that solves Ax=0A'\vec{x}=0 by taking linear combinations of those possible solutions.
So,

x=α[2100]+β[2021];α,βRx=\alpha \begin{bmatrix} -2\\1\\0\\0\\ \end{bmatrix} + \beta \begin{bmatrix} 2\\0\\-2\\1\\ \end{bmatrix};\quad \alpha,\beta\in\mathbb{R}

Now we got the Null Space of matrix AA it's a plane passing through [2100]\begin{bmatrix} -2\\1\\0\\0\\ \end{bmatrix} and [2021]\begin{bmatrix} 2\\0\\-2\\1\\ \end{bmatrix}

info

Null Space is the linear combination of all special solutions.

But how many special solutions are there?

Say there are kk dependent column vectors in our matrix AA, then as we discussed we craft these special solution such that we consider one dependent vector at a time.
So # special solution = # dependent column vector
remember Rank(A) = # pivot columns

Say that shape of our matrix is m×nm\times n, so we have nn column vectors in Rm\mathbb{R}^m, and say Rank of the matrix is rr, then

info

# special solution = # dependent column vector = nrn-r

Then the Null space of AA is linear combinations of these nrn-r special solution.

info

For a matrix ARm×nA\in\mathbb{R}^{m\times n} with Rank(A)=r\text{Rank}(A)=r, Null Space is a vector space in Rnr\mathbb{R}^{n-r}