Comprehensive Guide on Null Space in Linear Algebra
Start your free 7-days trial now!
Null space
The null space, or the kernel, of an $m\times{n}$ matrix $\boldsymbol{A}$ is defined as follows:
In words, we can interpret $\mathrm{nullspace}(\boldsymbol{A})$ as either:
the solution set of the homogeneous systemlink of equations $\boldsymbol{Ax}=\boldsymbol{0}$.
the set of all vectors $\boldsymbol{x}$ in $\mathbb{R}^n$ that are mapped to the zero vector of $\mathbb{R}^m$ through a linear transformation $\boldsymbol{x}↦\boldsymbol{Ax}$.
Checking if a vector belongs to a null space
Consider the following matrix and vector:
Show that $\boldsymbol{v}$ is in the null space of $\boldsymbol{A}$, that is, $\boldsymbol{v}\in{\mathrm{nullspace}(\boldsymbol{A})}$.
Solution. To show that $\boldsymbol{v}$ is in the null space of $\boldsymbol{A}$, we must show that the matrix-vector product $\boldsymbol{Av}$ is equal to the zero vector $\boldsymbol{0}$ like so:
Therefore, $\boldsymbol{v}$ is in the null space of $\boldsymbol{A}$.
Finding the null space of a matrix (1)
Consider the same matrix:
Find the null space of $\boldsymbol{A}$, that is, $\mathrm{nullspace}(\boldsymbol{A})$.
Solution. The null space of $\boldsymbol{A}$ is the set of all vectors $\boldsymbol{x}$ such that $\boldsymbol{Ax}=\boldsymbol{0}$. Let's find the solutions to the homogeneous system:
We reduce the coefficient matrix to the row echelon form:
Since we have all zeroes for the last row, this system has infinitely many solutions. Let $x_2=t$ where $t$ is any real number. Substituting $x_2=t$ into the first row gives:
Therefore, the solution set can be described by:
Plugging in any real value for $t$ will give us a solution to the homogenous system, which again implies that there are infinitely many solutions. The null space of $\boldsymbol{A}$ is:
For instance, when $t=1$, we get the following particular solution:
This is a particular element of our null space.
Finding the null space of a matrix (2)
Consider the following matrix:
Find the null space of $\boldsymbol{A}$.
Solution. The null space is the set of vectors $\boldsymbol{x}$ that satisfy $\boldsymbol{Ax}=\boldsymbol{0}$ so let's solve the following:
The reduced row echelon form of the coefficient matrix is:
Because $x_1=x_2=0$, we have that $\boldsymbol{x}$ must be the zero vector. Therefore, the null space of $\boldsymbol{A}$ is a set containing just the zero vector:
Finding a spanning set for the null space of a matrix
Find a spanning set for the null space of the following matrix:
Solution. Let's first find the null space of $\boldsymbol{A}$. The row echelon form of matrix $\boldsymbol{A}$ is:
We have that $x_1$, $x_2$ and $x_3$ are basic variableslink while $x_4$ and $x_5$ are free variableslink. Let $x_4=r$ and $x_5=t$ where $r$ and $t$ are scalars. The solution can now be expressed as:
The solution is any linear combination of the two vectors. Therefore, the null space of $\boldsymbol{A}$ is:
Null space containing only the zero vector
The null space of matrix $\boldsymbol{A}$ contains only the zero vector if and only if the column vectors $\boldsymbol{A}$ are linearly independentlink.
Proof. We know from theoremlink that the homogeneous system $\boldsymbol{Ax}=\boldsymbol{0}$ can be written as:
If the null space of matrix $\boldsymbol{A}$ contains only the zero vector, then the only solution to the above homogenous system is the zero vector, that is, $x_1=x_2=\cdots=x_n=0$. By definitionlink, the column vectors $\boldsymbol{v}_1$, $\boldsymbol{v}_2$, $\cdots$, $\boldsymbol{v}_n$ must be linearly independent.
Let's now prove the converse, that is, if the column vectors $\boldsymbol{A}$ are linearly independent, then the null space of matrix $\boldsymbol{A}$ contains only the zero vector. The logic is exactly the same except that we perform \eqref{eq:ryOQasK21UKM6MeuStk} in reverse.
This completes the proof.
Square matrix with a null space containing only the zero vector is invertible
The null space of a square matrix $\boldsymbol{A}$ contains only the zero vector if and only if $\boldsymbol{A}$ is invertible.
Proof. Suppose the null space of a square matrix $\boldsymbol{A}$ contains only the zero vector. By definition of null space, this means that the homogeneous linear system $\boldsymbol{Ax}=\boldsymbol{0}$ only has the trivial solution, that is, $\boldsymbol{x}$ is equal to the zero vector. By theoremlink, we have that $\boldsymbol{A}$ is invertible.
Let's now prove the converse - the flow is essentially the same. Suppose $\boldsymbol{A}$ is invertible. By theoremlink, this means that the only solution to the homogeneous linear system $\boldsymbol{Ax}=\boldsymbol{0}$ is $\boldsymbol{x}=\boldsymbol{0}$. Therefore, the null space of $\boldsymbol{A}$ only contains the zero vector.
The next theorem is extremely important in linear algebra because it connects the key concepts of invertibility, null space and linear independence.
Relationship between invertibility, null space and linear independence
Let $\boldsymbol{A}$ be a square matrix. The following statements are equivalent:
$\boldsymbol{A}$ is invertible.
The null space of $\boldsymbol{A}$ contains only the zero vector.
The column vectors of $\boldsymbol{A}$ are linearly independent.
Proof. We have already proven $(1)\Longleftrightarrow(2)$ and $(2)\Longleftrightarrow(3)$ in theoremlink and theoremlink respectively. This implies that $(1)\Longleftrightarrow(3)$. This completes the proof.
The next theorem will be useful for future proofs.
Magnitude of a product of an invertible matrix and a vector is greater than 0
If $\boldsymbol{P}$ is an invertible $n\times{n}$ matrix and $\boldsymbol{x}$ is any vector in $\mathbb{R}^n$, then:
Proof. By definitionlink, the magnitude of a vector is non-negative. Therefore, it suffices to show that $\Vert\boldsymbol{Px}\Vert\ne0$ or $\boldsymbol{Px}\ne\boldsymbol{0}$. By theoremlink, since $\boldsymbol{P}$ is invertible, the only solution to the homogeneous system $\boldsymbol{Px}=\boldsymbol{0}$ is the trivial solution of $\boldsymbol{x}=0$. However, $\boldsymbol{x}$ cannot be the zero vector by assumption, which means that $\boldsymbol{Px}\ne\boldsymbol{0}$. Therefore, $\Vert\boldsymbol{Px}\Vert\ne0$. This completes the proof.
The next theorem explains why the name "null space" is appropriate.
Null space is a subspace
The null space of an $m\times{n}$ matrix $\boldsymbol{A}$ is a subspace of $\mathbb{R}^n$.
Proof. By definitionlink, the null space is defined as the set of vectors $\boldsymbol{x}$ such that:
Since $\boldsymbol{A}$ is an $m\times{n}$ matrix, we have that $\boldsymbol{x}\in\mathbb{R}^n$ for the matrix-vector multiplication to be valid. Therefore, the null space is a subset of $\mathbb{R}^n$.
To show that $\boldsymbol{A}$ is a subspace of $\mathbb{R}^n$, we need to show that $\boldsymbol{A}$ is closed under addition and scalar multiplication.
Let vectors $\boldsymbol{v},\boldsymbol{w}\in{\mathrm{nullspace}(\boldsymbol{A})}$, which means that:
Let's check if $\boldsymbol{v}+\boldsymbol{w}$ is contained in $\mathrm{nullspace}(\boldsymbol{A})$ like so:
Substituting \eqref{eq:lKwphhXfFzNwK3ogtBX} into \eqref{eq:OS3qOe4sECZzULgwfqe} gives:
Therefore, we have that $\boldsymbol{v}+\boldsymbol{w} \in\mathrm{nullspace}(\boldsymbol{A})$. This means that the null space of $\boldsymbol{A}$ is closed under addition.
Next, let's check if the null space is closed under scalar multiplication. Suppose vector $\boldsymbol{v}\in \mathrm{nullspace}(\boldsymbol{A})$ and $k$ is a scalar. Since $\boldsymbol{v}$ is in the null space of $\boldsymbol{A}$, we have that $\boldsymbol{Av}=\boldsymbol{0}$. We now show $k\boldsymbol{v}\in \mathrm{nullspace}(\boldsymbol{A})$ like so:
Because $k\boldsymbol{v}$ is also contained in the null space of $\boldsymbol{A}$, we have that $\boldsymbol{A}$ is closed under scalar multiplication.
Because the null space of $\boldsymbol{A}$ is closed under addition and scalar multiplication, we conclude that the null space is a subspace of $\mathbb{R}^n$ by definitionlink. This completes the proof.