Lecture 18: Null Spaces
This lecture covers Section 4.2 (Part I). We introduce the concept of the null space of a matrix, prove that it forms a subspace, and develop a systematic method for finding a spanning set for it.
The Null Space
Definition: Let \(A\) be an \(m \times n\) matrix. The null space of \(A\), denoted \(\text{Nul}\, A\), is the set of all solutions of the homogeneous equation \(A\mathbf{x} = \mathbf{0}\), i.e.
\[\text{Nul}\, A = \{\mathbf{x} \mid \mathbf{x} \in \mathbb{R}^n \text{ and } A\mathbf{x} = \mathbf{0}\}.\]In other words, \(\text{Nul}\, A\) consists of every vector in \(\mathbb{R}^n\) that \(A\) maps to the zero vector. To check whether a specific vector belongs to \(\text{Nul}\, A\), we simply multiply and see if the result is \(\mathbf{0}\).
Example 1: Checking Membership in the Null Space
Let \[A = \begin{bmatrix} 1 & -2 & 4 \\ 3 & 7 & 0 \end{bmatrix} \quad \text{and} \quad \mathbf{u} = \begin{bmatrix} 6 \\ 1 \\ -1 \end{bmatrix}.\] Is \(\mathbf{u} \in \text{Nul}\, A\)?
Solution: We test whether \(A\mathbf{u} = \mathbf{0}\). Notice that
\[A\mathbf{u} = \begin{bmatrix} 1 & -2 & 4 \\ 3 & 7 & 0 \end{bmatrix} \begin{bmatrix} 6 \\ 1 \\ -1 \end{bmatrix} = \begin{bmatrix} 1\cdot6 + (-2)\cdot1 + 4\cdot(-1) \\ 3\cdot6 + 7\cdot1 + 0\cdot(-1) \end{bmatrix} = \begin{bmatrix} 0 \\ 25 \end{bmatrix} \neq \mathbf{0}.\]Since \(A\mathbf{u} \neq \mathbf{0}\), we conclude that \(\mathbf{u} \notin \text{Nul}\, A\).
The Null Space Is a Subspace
Theorem: The null space of an \(m \times n\) matrix \(A\) is a subspace of \(\mathbb{R}^n\). Equivalently, the set of all solutions to a homogeneous system \(A\mathbf{x} = \mathbf{0}\) of \(m\) equations in \(n\) unknowns is a subspace of \(\mathbb{R}^n\).
Warning: The theorem requires the equations to be homogeneous (i.e. there is no constant term). If a constant term is present, the zero vector \(\mathbf{0}\) will not satisfy the system, violating the requirement that every subspace contain \(\mathbf{0}\).
We now verify that \(\text{Nul}\, A\) satisfies the three conditions for a subspace.
Proof that \(\text{Nul}\, A\) is a subspace:
- Contains the zero vector: Since \(A\) has \(n\) columns, we have \(\text{Nul}\, A \subseteq \mathbb{R}^n\). Furthermore, \(A\mathbf{0} = \mathbf{0}\), so \(\mathbf{0} \in \text{Nul}\, A\).
- Closed under addition: Suppose \(\mathbf{u}, \mathbf{v} \in \text{Nul}\, A\), so \(A\mathbf{u} = \mathbf{0}\) and \(A\mathbf{v} = \mathbf{0}\). Then, \[A(\mathbf{u} + \mathbf{v}) = A\mathbf{u} + A\mathbf{v} = \mathbf{0} + \mathbf{0} = \mathbf{0},\] and so \(\mathbf{u} + \mathbf{v} \in \text{Nul}\, A\).
- Closed under scalar multiplication: For any scalar \(c\): \[A(c\mathbf{u}) = c(A\mathbf{u}) = c\mathbf{0} = \mathbf{0},\] and so \(c\mathbf{u} \in \text{Nul}\, A\). \(\blacksquare\)
Finding a Spanning Set for the Null Space
To find a spanning set for \(\text{Nul}\, A\), we solve the homogeneous system \(A\mathbf{x} = \mathbf{0}\) by row reducing the augmented matrix \([A \mid \mathbf{0}]\), identifying the free variables, and expressing each basic variable in terms of the free variables. The resulting parametric vectors form a spanning set.
Example 2: Spanning Set for \(\text{Nul}\, A\) — Two Variables
Find a spanning set for \(\text{Nul}\, A\) where \[A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 5 & 7 \end{bmatrix}.\]
Solution: We row reduce the augmented matrix \([A \mid \mathbf{0}]\):
\[\begin{bmatrix} 1 & 2 & 3 & 0 \\ 2 & 5 & 7 & 0 \end{bmatrix} \xrightarrow{r_2 \to r_2 - 2r_1} \begin{bmatrix} 1 & 2 & 3 & 0 \\ 0 & 1 & 1 & 0 \end{bmatrix} \xrightarrow{r_1 \to r_1 - 2r_2} \begin{bmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 1 & 0 \end{bmatrix}.\]The pivot columns are columns 1 and 2, and so \(x_3\) is the only free variable. We also have that \(x_1 + x_3 = 0\) and \(x_2 + x_3 = 0\). Therefore, \(x_1 = -x_3\) and \(x_2 = -x_3\). Writing the general solution in parametric vector form, we see that
\[\begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = x_3 \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix}.\]Therefore, a spanning set for \(\text{Nul}\, A\) is \(\left\{ \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} \right\}\).
Example 3: Spanning Set for \(\text{Nul}\, A\) — Two Free Variables
Find a spanning set for \(\text{Nul}\, A\) where \[A = \begin{bmatrix} 2 & 4 & 3 & 9 \\ 4 & 8 & 7 & 13 \end{bmatrix}.\]
Solution: We row reduce \([A \mid \mathbf{0}]\):
\[\begin{align*}\begin{bmatrix} 2 & 4 & 3 & 9 & 0 \\ 4 & 8 & 7 & 13 & 0 \end{bmatrix} &\xrightarrow{r_2 \to r_2 - 2r_1} \begin{bmatrix} 2 & 4 & 3 & 9 & 0 \\ 0 & 0 & 1 & -5 & 0 \end{bmatrix}\\ &\xrightarrow{r_1 \to r_1 - 3r_2} \begin{bmatrix} 2 & 4 & 0 & 24 & 0 \\ 0 & 0 & 1 & -5 & 0 \end{bmatrix}\\ &\xrightarrow{r_1 \to \frac{r_1}{2}} \begin{bmatrix} 1 & 2 & 0 & 12 & 0 \\ 0 & 0 & 1 & -5 & 0 \end{bmatrix}.\end{align*}\]Columns 1 and 3 contain pivots, and so \(x_2\) and \(x_4\) are free variables. We also have that \(x_1 = -2x_2 - 12x_4\) and \(x_3 = 5x_4\). In parametric vector form, we have that
\[\begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} = x_2 \begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix} + x_4 \begin{bmatrix} -12 \\ 0 \\ 5 \\ 1 \end{bmatrix}.\]Therefore, a spanning set for \(\text{Nul}\, A\) is \(\left\{ \begin{bmatrix} -2 \\ 1 \\ 0 \\ 0 \end{bmatrix},\ \begin{bmatrix} -12 \\ 0 \\ 5 \\ 1 \end{bmatrix} \right\}\).
Example 4: Spanning Set for \(\text{Nul}\, A\) — Three Free Variables
Find a spanning set for \(\text{Nul}\, A\) where \[A = \begin{bmatrix} 1 & 3 & 0 & 2 & 5 \\ 2 & 6 & 1 & 7 & 13 \\ 0 & 0 & 0 & 0 & 0 \end{bmatrix}.\]
Solution: We row reduce \([A \mid \mathbf{0}]\):
\[\begin{bmatrix} 1 & 3 & 0 & 2 & 5 & 0 \\ 2 & 6 & 1 & 7 & 13 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{bmatrix} \xrightarrow{r_2 \to r_2 - 2r_1} \begin{bmatrix} 1 & 3 & 0 & 2 & 5 & 0 \\ 0 & 0 & 1 & 3 & 3 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{bmatrix}.\]Columns 1 and 3 contain pivots, and so \(x_2\), \(x_4\), and \(x_5\) are free variables. We also have that \[x_1 = -3x_2 - 2x_4 - 5x_5 \quad \text{and} \quad x_3 = -3x_4 - 3x_5.\] In parametric vector form, we get that
\[\begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \\ x_5 \end{bmatrix} = x_2 \begin{bmatrix} -3 \\ 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} + x_4 \begin{bmatrix} -2 \\ 0 \\ -3 \\ 1 \\ 0 \end{bmatrix} + x_5 \begin{bmatrix} -5 \\ 0 \\ -3 \\ 0 \\ 1 \end{bmatrix}.\]Therefore, a spanning set for \(\text{Nul}\, A\) is \(\left\{ \begin{bmatrix} -3 \\ 1 \\ 0 \\ 0 \\ 0 \end{bmatrix},\ \begin{bmatrix} -2 \\ 0 \\ -3 \\ 1 \\ 0 \end{bmatrix},\ \begin{bmatrix} -5 \\ 0 \\ -3 \\ 0 \\ 1 \end{bmatrix} \right\}\).
Important: The number of vectors in a spanning set for \(\text{Nul}\, A\) equals the number of free variables in the equation \(A\mathbf{x} = \mathbf{0}\). This is determined by the number of non-pivot columns in the reduced row echelon form of \(A\).
The Homogeneous Requirement
The aforementioned theorem relies critically on the system being homogeneous. The following example shows what can go wrong when a constant term is present.
Example 5: A Set That Is Not a Subspace
Let \[W = \left\{ \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} \;\middle|\; x_1 + 3 = x_2 - 7x_3 \right\}.\] Is \(W\) a subspace of \(\mathbb{R}^3\)?
Solution: Clearly \(W \subseteq \mathbb{R}^3\). However, we check whether \(\mathbf{0} \in W\). Substituting \(x_1 = x_2 = x_3 = 0\) yields \(0 + 3 = 0 - 7\cdot 0\), i.e. \(3 = 0\), which is not true. Therefore, \(\mathbf{0} \notin W\), and \(W\) is not a subspace of \(\mathbb{R}^3\).
The underlying equation can be rewritten as \(x_1 - x_2 + 7x_3 = -3\), which is not homogeneous (the constant \(-3\) on the right-hand side prevents the zero vector from being a solution).
Warning: If the defining condition for a set involves a nonzero constant term, the set cannot be a subspace. If instead the condition in example 5 were \(x_1 = x_2 - 7x_3\) (i.e. \(x_1 - x_2 + 7x_3 = 0\)), the set would be a subspace of \(\mathbb{R}^3\), as the equation is homogeneous and therefore describes a null space.