4.7 Row Space, Column Space, and Null Space
Note
Think of a linear system as a black box:
We’re all familiar with matrices. Let’s formally define their row and column vectors.
For an \(m \times n\) matrix \(A\):
\[ A = \left[ \begin{array}{cccc}a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & & \vdots \\ a_{m1} & a_{m2} & \dots & a_{mn} \end{array} \right] \]
Row Vectors of \(A\) (in \(R^n\)):
\[ \begin{array}{l}{{\bf r}_{1}=[a_{11}\quad a_{12}\quad\cdots\quad a_{1n}]}\\ {{\bf r}_{2}=[a_{21}\quad a_{22}\quad\cdots\quad a_{2n}]}\\ {\vdots\qquad\vdots}\\ {{\bf r}_{m}=[a_{m1}\quad a_{m2}\quad\cdots\quad a_{mn}]}\end{array} \]
Column Vectors of \(A\) (in \(R^m\)):
\[ \mathbf{c}_{1} = \left[ \begin{array}{c}a_{11} \\ a_{21} \\ \vdots \\ a_{m1} \end{array} \right], \quad \mathbf{c}_{2} = \left[ \begin{array}{c}a_{12} \\ a_{22} \\ \vdots \\ a_{m2} \end{array} \right], \ldots , \quad \mathbf{c}_{n} = \left[ \begin{array}{c}a_{1n} \\ a_{2n} \\ \vdots \\ a_{mn} \end{array} \right] \]
Let \(A = \left[ \begin{array}{rrr}2 & 1 & 0 \\ 3 & -1 & 4 \end{array} \right]\).
These three vector spaces are fundamental to understanding matrix properties and linear systems.
Important
DEFINITION 2: Row Space, Column Space, and Null Space
If \(A\) is an \(m \times n\) matrix:
Note
ECE Perspective:
The column space directly tells us about the solvability of linear systems.
Recall that the matrix-vector product \(A\mathbf{x}\) can be expressed as a linear combination of the column vectors of \(A\):
\[ A\mathbf{x} = x_{1}\mathbf{c}_{1} + x_{2}\mathbf{c}_{2} + \dots + x_{n}\mathbf{c}_{n} \tag{1} \]
Thus, a linear system \(A\mathbf{x} = \mathbf{b}\) can be written as:
\[ x_{1}\mathbf{c}_{1} + x_{2}\mathbf{c}_{2} + \dots + x_{n}\mathbf{c}_{n} = \mathbf{b} \tag{2} \]
Important
THEOREM 4.7.1: A system of linear equations \(A\mathbf{x} = \mathbf{b}\) is consistent if and only if \(\mathbf{b}\) is in the column space of \(A\).
Tip
ECE Application: Reachability
b from Column SpaceLet’s explore if \(\mathbf{b}\) can be formed by column vectors of \(A\). Adjust the coefficients \(x_1, x_2, x_3\) to see if you can match the target vector \(\mathbf{b}\).
\[ A = {\left[\begin{array}{l l l}{-1}&{3}&{2}\\ {1}&{2}&{-3}\\ {2}&{1}&{-2}\end{array}\right]}, \quad \mathbf{b_{target}} = {\left[\begin{array}{l}{1}\\ {-9}\\ {-3}\end{array}\right]} \]
\[ \mathbf{x} = \left[ \begin{array}{l}x_{1} \\ x_{2} \\ x_{3} \end{array} \right] \implies A\mathbf{x} = x_{1}\mathbf{c}_{1} + x_{2}\mathbf{c}_{2} + x_{3}\mathbf{c}_{3} = \mathbf{b_{current}} \]
b from Column SpaceThe null space is crucial for understanding the structure of all solutions to \(A\mathbf{x} = \mathbf{b}\).
Note
THEOREM 4.7.2: If \(\mathbf{x}_{0}\) is any particular solution of a consistent linear system \(A\mathbf{x} = \mathbf{b}\), and if \(S = \{\mathbf{v}_{1}, \ldots , \mathbf{v}_{k}\}\) is a basis for the null space of \(A\), then every solution of \(A\mathbf{x} = \mathbf{b}\) can be expressed in the form:
\[ \mathbf{x} = \mathbf{x}_{0} + c_{1}\mathbf{v}_{1} + c_{2}\mathbf{v}_{2} + \dots + c_{k}\mathbf{v}_{k} \tag{3} \]
Conversely, for all choices of scalars \(c_{1}, \ldots , c_{k}\), the vector \(\mathbf{x}\) in this formula is a solution of \(A\mathbf{x} = \mathbf{b}\).
This means the general solution of \(A\mathbf{x} = \mathbf{b}\) is the sum of:
Geometrically, the solution set of \(A\mathbf{x} = \mathbf{b}\) is a translation of the null space of \(A\) by the vector \(\mathbf{x}_0\).
The solution set of \(A\mathbf{x} = \mathbf{b}\) is a translated version of the null space of \(A\).
Figure 4.7.1: The solution set of \(A\mathbf{x} = \mathbf{b}\) as a translation of the null space of \(A\).
Let \(A = [1 \quad -1]\). The homogeneous system \(A\mathbf{x} = \mathbf{0}\) is \(x_1 - x_2 = 0\), so \(x_1 = x_2\). The null space is the line \(y=x\) (i.e., \(\text{span}\{[1, 1]\}\)).
Consider \(A\mathbf{x} = \mathbf{b}\) with \(\mathbf{b} = [2]\). A particular solution is \(\mathbf{x}_0 = [2, 0]\) (since \(1(2) - 1(0) = 2\)). The general solution is \(\mathbf{x} = [2, 0] + c[1, 1]\).
Elementary Row Operations (EROs) are powerful, but they have different effects on our key spaces.
Important
THEOREM 4.7.3 & 4.7.4:
Why EROs don’t change Null Space:
Why EROs don’t change Row Space:
Warning
EROs DO change the Column Space of a matrix!
Consider: \[ A = {\left[ \begin{array}{l l}{1} & {3}\\ {2} & {6} \end{array} \right]} \quad \xrightarrow{R_2 \to R_2 - 2R_1} \quad B = {\left[ \begin{array}{l l}{1} & {3}\\ {0} & {0} \end{array} \right]} \]
These are different spaces!
The null space of \(A\) is the solution space of \(A\mathbf{x} = \mathbf{0}\).
Find a basis for the null space of the matrix:
\[ A = {\left[ \begin{array}{l l l l l l}{1} & {3} & {-2} & 0 & 2 & 0\\ {2} & {6} & {-5} & {-2} & 4 & {-3}\\ {0} & 0 & 5 & {10} & 0 & {15}\\ {2} & {6} & 0 & 8 & 4 & {18} \end{array} \right]} \]
Solution: We need to solve the homogeneous system \(A\mathbf{x} = \mathbf{0}\). (This involves reducing \(A\) to its row echelon form or reduced row echelon form, and then expressing the general solution in parametric vector form.)
After row reduction (as shown in Section 3.4), the general solution to \(A\mathbf{x} = \mathbf{0}\) is: \[ \mathbf{x} = \left[ \begin{array}{c}-3x_2 - 4x_4 - 2x_6 \\ x_2 \\ -2x_4 - 3x_6 \\ x_4 \\ x_5 \\ x_6 \end{array} \right] = x_2\left[ \begin{array}{c}-3 \\ 1 \\ 0 \\ 0 \\ 0 \\ 0 \end{array} \right] + x_4\left[ \begin{array}{c}-4 \\ 0 \\ -2 \\ 1 \\ 0 \\ 0 \end{array} \right] + x_6\left[ \begin{array}{c}-2 \\ 0 \\ -3 \\ 0 \\ 0 \\ 1 \end{array} \right] \]
Thus, a basis for the null space of \(A\) is:
\[ \mathbf{v}_{1} = \left[ \begin{array}{c} - 3 \\ 1 \\ 0 \\ 0 \\ 0 \\ 0 \end{array} \right], \quad \mathbf{v}_{2} = \left[ \begin{array}{c} - 4 \\ 0 \\ -2 \\ 1 \\ 0 \\ 0 \end{array} \right], \quad \mathbf{v}_{3} = \left[ \begin{array}{c} - 2 \\ 0 \\ -3 \\ 0 \\ 0 \\ 1 \end{array} \right] \]
When a matrix is in row echelon form, finding bases becomes simpler.
Important
THEOREM 4.7.5:
If a matrix \(R\) is in row echelon form:
Find bases for the row and column spaces of the matrix:
\[ R = {\left[ \begin{array}{l l l l l}{1} & {-2} & {5} & {0} & {3}\\ {0} & {1} & {3} & {0} & {0}\\ {0} & {0} & {0} & {1} & {0}\\ {0} & {0} & {0} & {0} & {0} \end{array} \right]} \]
Solution:
Basis for Row Space of \(R\): The nonzero row vectors are:
\(\mathbf{r}_{1} = [1\quad -2\quad 5\quad 0\quad 3]\)
\(\mathbf{r}_{2} = [0\quad 1\quad 3\quad 0\quad 0]\)
\(\mathbf{r}_{3} = [0\quad 0\quad 0\quad 1\quad 0]\)
These form a basis for \(\text{row}(R)\).
Basis for Column Space of \(R\): The leading 1’s are in columns 1, 2, and 4. The corresponding column vectors of \(R\) are:
\(\mathbf{c}_{1} = \left[ \begin{array}{c}1 \\ 0 \\ 0 \\ 0 \end{array} \right], \quad \mathbf{c}_{2} = \left[ \begin{array}{c} - 2 \\ 1 \\ 0 \\ 0 \end{array} \right], \quad \mathbf{c}_{4} = \left[ \begin{array}{c}0 \\ 0 \\ 1 \\ 0 \end{array} \right]\)
These form a basis for \(\text{col}(R)\).
Since EROs do not change the row space, we can find a basis for \(\text{row}(A)\) from its row echelon form.
Find a basis for the row space of the matrix:
\[ A = {\left[ \begin{array}{l l l l l l}{1} & {-3} & {4} & {-2} & {5} & {4}\\ {2} & {-6} & {9} & {-1} & {8} & {2}\\ {2} & {-6} & {9} & {-1} & {9} & {7}\\ {-1} & {3} & {-4} & {2} & {-5} & {-4} \end{array} \right]} \]
Solution: Reduce \(A\) to row echelon form \(R\):
\[ R = {\left[ \begin{array}{l l l l l l}{1} & {-3} & {4} & {-2} & {5} & {4}\\ {0} & {0} & {1} & {3} & {-2} & {-6}\\ {0} & {0} & {0} & {0} & {1} & {5}\\ {0} & {0} & {0} & {0} & {0} & {0} \end{array} \right]} \]
By Theorem 4.7.5, the nonzero row vectors of \(R\) form a basis for the row space of \(R\). Since \(\text{row}(A) = \text{row}(R)\), these vectors also form a basis for \(\text{row}(A)\):
\[ \begin{array}{r l}{\mathbf{r}_{1}=[1}&{{}-3\qquad4\quad-2\qquad5\quad4]}\\ {\mathbf{r}_{2}=[0\qquad0\qquad1\quad3\quad-2\quad-6]}\\ {\mathbf{r}_{3}=[0\qquad0\qquad0\qquad0\quad1\quad5]}\end{array} \]
This is trickier, as EROs change the column space itself. However, they preserve linear dependence relations between columns.
Important
THEOREM 4.7.6: If \(A\) and \(B\) are row equivalent matrices, then:
This theorem is key! It tells us that while the column vectors themselves change, their relationships (linear independence/dependence) do not.
Using matrix \(A\) from Example 6 and its RREF \(R\):
\[ A = {\left[ \begin{array}{r r r r r r}{\mathbf{c_1}} & {\mathbf{c_2}} & {\mathbf{c_3}} & {\mathbf{c_4}} & {\mathbf{c_5}} & {\mathbf{c_6}}\\ {1} & {-3} & {4} & {-2} & {5} & {4}\\ {2} & {-6} & {9} & {-1} & {8} & {2}\\ {2} & {-6} & {9} & {-1} & {9} & {7}\\ {-1} & {3} & {-4} & {2} & {-5} & {-4} \end{array} \right]} \quad \xrightarrow{\text{EROs}} \quad R={\left[\begin{array}{r r r r r r}{1}&{-3}&{4}&{-2}&{5}&{4}\\ {0}&{0}&{1}&{3}&{-2}&{-6}\\ {0}&{0}&{0}&{0}&{1}&{5}\\ {0}&{0}&{0}&{0}&{0}&{0}\end{array}\right]} \]
Thus, the basis for \(\text{col}(A)\) consists of:
\[ \mathbf{c}_{1}={\left[\begin{array}{l}{1}\\ {2}\\ {2}\\ {-1}\end{array}\right]},\quad\mathbf{c}_{3}={\left[\begin{array}{l}{4}\\ {9}\\ {9}\\ {-4}\end{array}\right]},\quad\mathbf{c}_{5}={\left[\begin{array}{l}{5}\\ {8}\\ {9}\\ {-5}\end{array}\right]} \]
Provide a matrix \(A\) and let Python find its RREF and identify a basis for its column space.
Enter your matrix \(A\) (e.g., [[1, 2, 3], [4, 5, 6], [7, 8, 9]]):
The problem of finding a basis for the subspace spanned by a set of vectors is equivalent to finding a basis for the column space of a matrix.
Problem: Given a set of vectors \(S = \{\mathbf{v}_{1}, \mathbf{v}_{2}, \ldots , \mathbf{v}_{k}\}\) in \(R^{n}\), find a subset of these vectors that forms a basis for \(\operatorname {span}(S)\).
Solution:
The following vectors span a subspace of \(R^{4}\). Find a subset of these vectors that forms a basis of this subspace.
\[ \begin{array}{r l} & {\mathbf{v}_{1} = (1,2,2, - 1),\qquad \mathbf{v}_{2} = (-3, - 6, - 6,3),}\\ & {\mathbf{v}_{3} = (4,9,9, - 4),\qquad \mathbf{v}_{4} = (-2, - 1, - 1,2),}\\ & {\mathbf{v}_{5} = (5,8,9, - 5),\qquad \mathbf{v}_{6} = (4,2,7, - 4)} \end{array} \]
Solution: If we write these vectors as columns, we get the matrix \(A\) from Example 7:
\[ A = [\mathbf{v}_{1} \quad \mathbf{v}_{2} \quad \mathbf{v}_{3} \quad \mathbf{v}_{4} \quad \mathbf{v}_{5} \quad \mathbf{v}_{6}] = {\left[ \begin{array}{r r r r r r}{1} & {-3} & {4} & {-2} & {5} & {4}\\ {2} & {-6} & {9} & {-1} & {8} & {2}\\ {2} & {-6} & {9} & {-1} & {9} & {7}\\ {-1} & {3} & {-4} & {2} & {-5} & {-4} \end{array} \right]} \]
From Example 7, the pivot columns in the RREF of \(A\) corresponded to columns 1, 3, and 5. Therefore, the vectors \(\mathbf{v}_{1}, \mathbf{v}_{3}\), and \(\mathbf{v}_{5}\) form a basis for \(\operatorname {span}\{\mathbf{v}_{1},\ldots,\mathbf{v}_{6}\}\).
Sometimes, we need a basis for the row space that consists entirely of row vectors from the original matrix \(A\).
Method:
Find a basis for the row space of \(A\) consisting entirely of row vectors from \(A\):
\[ A = {\left[ \begin{array}{l l l l l}{1} & {-2} & 0 & 0 & 3\\ 2 & {-5} & {-3} & {-2} & 6\\ 0 & 5 & {15} & {10} & 0\\ 2 & 6 & {18} & 8 & 6 \end{array} \right]} \]
Solution:
This problem combines finding a basis with expressing other vectors as linear combinations.
Problem: Given a set of vectors \(S = \{\mathbf{v}_{1}, \ldots , \mathbf{v}_{k}\}\), find a subset that forms a basis for \(\operatorname {span}(S)\), and express each vector not in that basis as a linear combination of the basis vectors.
\[ \begin{array}{c}{{\mathbf{v}_{1}=(1,-2,0,3),\quad\mathbf{v}_{2}=(2,-5,-3,6),}}\\ {{\mathbf{v}_{3}=(0,1,3,0),\quad\mathbf{v}_{4}=(2,-1,4,-7),\quad\mathbf{v}_{5}=(5,-8,1,2)}}\end{array} \]
Solution (a): 1. Form matrix \(A\) with vectors as columns: \[ A = \begin{array}{r}{\left[ \begin{array}{c c c c c}{1} & {2} & {0} & {2} & {5}\\ {-2} & {-5} & {1} & {-1} & {-8}\\ {0} & {-3} & {3} & {4} & {1}\\ {3} & {6} & {0} & {-7} & {2} \end{array} \right]}\\ {\uparrow \quad \uparrow \quad \uparrow \quad \uparrow \quad \uparrow}\\ {\mathbf{v}_{1}\quad \mathbf{v}_{2}\quad \mathbf{v}_{3}\quad \mathbf{v}_{4}\quad \mathbf{v}_{5}} \end{array} \]
Express each vector not in the basis as a linear combination of the basis vectors.
Solution (b): From the RREF \(R\) (columns \(\mathbf{w}_{1}, \ldots, \mathbf{w}_{5}\)):
\[ R = \begin{array}{r}{\left[ \begin{array}{c c c c c}{1} & {0} & {2} & {0} & {1}\\ {0} & {1} & {-1} & {0} & {1}\\ {0} & {0} & {0} & {1} & {1}\\ {0} & {0} & {0} & {0} & {0} \end{array} \right]}\\ {\uparrow \quad \uparrow \quad \uparrow \quad \uparrow \quad \uparrow \quad \uparrow}\\ {\mathbf{w}_{1}\quad \mathbf{w}_{2}\quad \mathbf{w}_{3}\quad \mathbf{w}_{4}\quad \mathbf{w}_{5}} \end{array} \]
The non-pivot columns are \(\mathbf{w}_3\) and \(\mathbf{w}_5\). We express them as linear combinations of the pivot columns \(\mathbf{w}_1, \mathbf{w}_2, \mathbf{w}_4\).
For \(\mathbf{w}_3\): The third column of \(R\) is \([2, -1, 0, 0]^T\). This means \(\mathbf{w}_3 = 2\mathbf{w}_1 - 1\mathbf{w}_2\). (Since \(\mathbf{w}_1 = [1,0,0,0]^T\) and \(\mathbf{w}_2 = [0,1,0,0]^T\)).
For \(\mathbf{w}_5\): The fifth column of \(R\) is \([1, 1, 1, 0]^T\). This means \(\mathbf{w}_5 = 1\mathbf{w}_1 + 1\mathbf{w}_2 + 1\mathbf{w}_4\). (Since \(\mathbf{w}_1 = [1,0,0,0]^T\), \(\mathbf{w}_2 = [0,1,0,0]^T\), and \(\mathbf{w}_4 = [0,0,1,0]^T\)).
These are the “dependency equations” in terms of the RREF columns.
Since the linear dependence relationships are preserved by EROs (Theorem 4.7.6), we can replace \(\mathbf{w}_i\) with \(\mathbf{v}_i\):
Tip
General Procedure for Basis and Linear Combinations:
These vector spaces are fundamental in State-Space Control Systems.
System Model: \[ \dot{\mathbf{x}}(t) = A\mathbf{x}(t) + B\mathbf{u}(t) \\ \mathbf{y}(t) = C\mathbf{x}(t) + D\mathbf{u}(t) \]
How the spaces apply:
What we’ve learned:
Key Relationships:
Important
Why this matters for ECE: - System Capabilities: \(\text{col}(A)\) defines what outputs/states your system can achieve. - System Blind Spots: \(\text{null}(A)\) reveals inputs that are ‘ignored’ or states that are ‘unobservable’. - Efficiency: Bases help identify the minimal set of independent components needed to describe a system’s behavior.
Tip
Think of it as diagnosing a circuit: - Can I get this specific output voltage (is it in the column space)? - What inputs cause no current flow (are they in the null space)? - What are the fundamental independent current/voltage loops (basis for row/column space)?