Chapter 5 · Vector Spaces

5.4 Row Space, Column Space, Null Space and Rank

Every matrix carries three subspaces — $\operatorname{Row}A$, $\operatorname{Col}A$ and $\operatorname{Nul}A$ — and one row reduction finds bases for all of them. Their sizes obey $\operatorname{rank}A+\operatorname{nullity}A=n$.

A matrix $A$ is more than a table of numbers. Its columns span a subspace (the outputs $A\mathbf{x}$ can reach), its rows span another, and the solutions of $A\mathbf{x}=\mathbf{0}$ form a third. These three subspaces answer the two big questions about any linear system $A\mathbf{x}=\mathbf{b}$: does a solution exist? (is $\mathbf{b}$ among the reachable outputs?) and how many solutions are there? (how big is the set of inputs that $A$ sends to $\mathbf{0}$?).

The remarkable fact of this section is that a single row reduction to echelon form gives bases for all three subspaces at once, and that their dimensions are tied together by one simple equation, the Rank–Nullity Theorem. Engineers use it to count the independent loops in an electrical network, statisticians to count the parameters a data set can actually determine, and control engineers to decide whether a system can be steered wherever they want.

Three Subspaces of a Matrix

📘 Definition 5.7 — Row space, column space and null space
Let $A$ be an $m\times n$ matrix with columns $\mathbf{a}_1,\dots,\mathbf{a}_n$ in $\mathbb{R}^m$ and rows $\mathbf{r}_1,\dots,\mathbf{r}_m$ in $\mathbb{R}^n$.
  • The column space $\operatorname{Col}A=\operatorname{span}\{\mathbf{a}_1,\dots,\mathbf{a}_n\}=\{A\mathbf{x}:\mathbf{x}\in\mathbb{R}^n\}$, a subspace of $\mathbb{R}^m$.
  • The row space $\operatorname{Row}A=\operatorname{span}\{\mathbf{r}_1,\dots,\mathbf{r}_m\}$, a subspace of $\mathbb{R}^n$. (Equivalently, $\operatorname{Row}A=\operatorname{Col}A^{T}$.)
  • The null space $\operatorname{Nul}A=\{\mathbf{x}\in\mathbb{R}^n:A\mathbf{x}=\mathbf{0}\}$, a subspace of $\mathbb{R}^n$.

Notice where each space lives: $\operatorname{Col}A$ sits in the output space $\mathbb{R}^m$, while $\operatorname{Row}A$ and $\operatorname{Nul}A$ sit in the input space $\mathbb{R}^n$. Keeping track of this avoids many mistakes.

Throughout this section we use the $4\times5$ matrix $$A=\begin{bmatrix}1&2&0&1&0\\2&4&1&4&0\\-1&-2&1&1&1\\3&6&0&3&2\end{bmatrix}.$$ Row reduction gives $$A\xrightarrow{\substack{R_2\to R_2-2R_1\\R_3\to R_3+R_1\\R_4\to R_4-3R_1}}\begin{bmatrix}1&2&0&1&0\\0&0&1&2&0\\0&0&1&2&1\\0&0&0&0&2\end{bmatrix}\xrightarrow{R_3\to R_3-R_2}\begin{bmatrix}1&2&0&1&0\\0&0&1&2&0\\0&0&0&0&1\\0&0&0&0&2\end{bmatrix}\xrightarrow{R_4\to R_4-2R_3}\begin{bmatrix}1&2&0&1&0\\0&0&1&2&0\\0&0&0&0&1\\0&0&0&0&0\end{bmatrix}=R.$$ This $R$ is already the reduced echelon form. Its pivots are in columns 1, 3 and 5; $x_2$ and $x_4$ are free variables.

A basis for $\operatorname{Nul}A$

✏️ Example 1 — A basis for the null space
Find a basis for $\operatorname{Nul}A$ for the matrix $A$ above, and its dimension.
Equations $A\mathbf{x}=\mathbf{0}$ has the same solutions as $R\mathbf{x}=\mathbf{0}$: $$x_1+2x_2+x_4=0,\qquad x_3+2x_4=0,\qquad x_5=0 .$$
Parametric form Solve for the pivot variables in terms of the free ones: $x_1=-2x_2-x_4$, $x_3=-2x_4$, $x_5=0$. So $$\mathbf{x}=\begin{bmatrix}-2x_2-x_4\\x_2\\-2x_4\\x_4\\0\end{bmatrix}=x_2\begin{bmatrix}-2\\1\\0\\0\\0\end{bmatrix}+x_4\begin{bmatrix}-1\\0\\-2\\1\\0\end{bmatrix}.$$
Basis The two vectors span $\operatorname{Nul}A$, and they are independent automatically: in the free-variable positions (entries 2 and 4) they show $(1,0)$ and $(0,1)$. So $\{(-2,1,0,0,0),\ (-1,0,-2,1,0)\}$ is a basis and $\dim\operatorname{Nul}A=2$ — one vector per free variable.
Check $A(-2,1,0,0,0)=(-2+2,\ -4+4,\ 2-2,\ -6+6)=\mathbf{0}$ ✓ and $A(-1,0,-2,1,0)=(-1+1,\ -2-2+4,\ 1-2+1,\ -3+3)=\mathbf{0}$ ✓.

Bases for $\operatorname{Col}A$ and $\operatorname{Row}A$

Row operations change the columns of a matrix, so they generally change the column space. What they do not change is the set of linear relations among the columns: $A\mathbf{x}=\mathbf{0}$ and $R\mathbf{x}=\mathbf{0}$ have the same solutions. In $R$ the pivot columns are obviously independent and every other column is a combination of them; the same relations therefore hold among the columns of $A$. Rows behave differently: each row operation replaces rows by combinations of rows, so the row space never changes.

📐 Theorem 5.17 — Bases from the echelon form
Let $A$ be row equivalent to an echelon form $U$.
  1. The pivot columns of $A$ itself (the columns of $A$ in the positions where $U$ has pivots) form a basis of $\operatorname{Col}A$.
  2. $A$ and $U$ have the same row space, and the nonzero rows of $U$ form a basis of $\operatorname{Row}A$.
  3. Writing the solution of $A\mathbf{x}=\mathbf{0}$ in parametric vector form gives one vector per free variable, and these vectors form a basis of $\operatorname{Nul}A$.
✏️ Example 2 — Bases for the column space and the row space
For the same matrix $A$, find bases of $\operatorname{Col}A$ and $\operatorname{Row}A$.
Col A The pivots of $R$ are in columns 1, 3, 5, so take columns 1, 3, 5 of $A$: $$\operatorname{Col}A=\operatorname{span}\left\{\begin{bmatrix}1\\2\\-1\\3\end{bmatrix},\begin{bmatrix}0\\1\\1\\0\end{bmatrix},\begin{bmatrix}0\\0\\1\\2\end{bmatrix}\right\},\qquad\dim\operatorname{Col}A=3 .$$
Why not columns of $R$? Every column of $R$ has last entry $0$, so the columns of $R$ span a subspace of $\{(y_1,y_2,y_3,0)\}$. But column 5 of $A$ is $(0,0,1,2)$, with last entry $2$: $\operatorname{Col}R\ne\operatorname{Col}A$.
Row A The nonzero rows of $R$: $$\{(1,2,0,1,0),\ (0,0,1,2,0),\ (0,0,0,0,1)\},\qquad\dim\operatorname{Row}A=3 .$$ They are independent because each has a $1$ in a pivot position where the others have $0$.
Check The column relations of $R$ also hold in $A$: $\mathbf{a}_2=2\mathbf{a}_1$ and $\mathbf{a}_4=\mathbf{a}_1+2\mathbf{a}_3$. Indeed $(1,2,-1,3)+2(0,1,1,0)=(1,4,1,3)=\mathbf{a}_4$. ✓
⚠️ Common mistakes with the three subspaces

1. Taking columns of the echelon form for $\operatorname{Col}A$. The echelon form tells you which columns; the vectors must come from the original $A$.

2. Taking rows of $A$ for $\operatorname{Row}A$ without care. The nonzero rows of the echelon form are a safe basis. The rows of $A$ in the same positions need not be: a row swap may have moved them, and a zero row of $U$ can come from any row of $A$.

3. Mixing up where the spaces live. For a $4\times5$ matrix, $\operatorname{Col}A\subseteq\mathbb{R}^4$ but $\operatorname{Nul}A\subseteq\mathbb{R}^5$ and $\operatorname{Row}A\subseteq\mathbb{R}^5$.

Interactive 1 — One Row Reduction, Three Bases

Watch Gauss–Jordan elimination run one row operation at a time (exact fractions). The pivot columns are marked in the original $A$ on the left — those columns of $A$ are a basis of $\operatorname{Col}A$. The nonzero rows of the final matrix are a basis of $\operatorname{Row}A$, and each free column gives one basis vector of $\operatorname{Nul}A$. The bar at the bottom shows rank $+$ nullity $=$ number of columns.

step—
basis of $\operatorname{Col}A$—
basis of $\operatorname{Row}A$—
basis of $\operatorname{Nul}A$—

Rank and the Rank–Nullity Theorem

In the example, $\dim\operatorname{Col}A=\dim\operatorname{Row}A=3$. That is no coincidence: both equal the number of pivots. The pivots also decide the null space, since every column without a pivot gives a free variable.

📘 Definition 5.8 — Rank and nullity
The rank of $A$ is $\operatorname{rank}A=\dim\operatorname{Col}A$. The nullity of $A$ is $\operatorname{nullity}A=\dim\operatorname{Nul}A$.
📐 Theorem 5.18 — The Rank–Nullity Theorem
For every $m\times n$ matrix $A$:
  1. $\dim\operatorname{Col}A=\dim\operatorname{Row}A=$ the number of pivot positions of $A$; consequently $\operatorname{rank}A^{T}=\operatorname{rank}A$.
  2. $$\operatorname{rank}A+\operatorname{nullity}A=n\quad(\text{the number of columns}).$$

Why. Each of the $n$ columns of the echelon form is either a pivot column or a free column. Pivot columns give the basis of $\operatorname{Col}A$, so there are $\operatorname{rank}A$ of them; free columns give the basis vectors of $\operatorname{Nul}A$, so there are $\operatorname{nullity}A$ of them. The nonzero rows of the echelon form are exactly the rows with a pivot. Since $\operatorname{Row}A=\operatorname{Col}A^{T}$, part 1 also says $A$ and $A^{T}$ have the same rank.

In words: "the dimension of what $A$ reaches, plus the dimension of what $A$ crushes to $\mathbf{0}$, equals the dimension of what goes in." For our $4\times5$ example: $3+2=5$. ✓ Note also that $\operatorname{rank}A\le\min(m,n)$, because there is at most one pivot in each row and each column.

✏️ Example 3 — Reasoning with the Rank–Nullity Theorem
(a) A $7\times9$ matrix $A$ has a $2$-dimensional null space. What is its rank, and is $A\mathbf{x}=\mathbf{b}$ consistent for every $\mathbf{b}$ in $\mathbb{R}^7$?
(b) Can a $6\times9$ matrix have nullity $2$?
(c) A $5\times3$ matrix has rank $3$. Describe $\operatorname{Nul}A$ and $\operatorname{Row}A$.
(a) $\operatorname{rank}A=9-2=7$. So $\operatorname{Col}A$ is a $7$-dimensional subspace of $\mathbb{R}^7$, which must be all of $\mathbb{R}^7$ (Theorem 5.16). Hence every $\mathbf{b}$ is in $\operatorname{Col}A$ and $A\mathbf{x}=\mathbf{b}$ is always consistent — with infinitely many solutions, because the nullity is $2\gt0$.
(b) Nullity $2$ would force $\operatorname{rank}A=9-2=7$. But a $6\times9$ matrix has only $6$ rows, so at most $6$ pivots. Impossible: every $6\times9$ matrix has nullity at least $3$.
(c) $\operatorname{nullity}A=3-3=0$, so $\operatorname{Nul}A=\{\mathbf{0}\}$ (the columns are independent). $\operatorname{Row}A$ is a $3$-dimensional subspace of $\mathbb{R}^3$, so $\operatorname{Row}A=\mathbb{R}^3$.

Solving $A\mathbf{x}=\mathbf{b}$: Existence and the Shape of the Solution Set

Because $A\mathbf{x}=x_1\mathbf{a}_1+\dots+x_n\mathbf{a}_n$, asking for a solution of $A\mathbf{x}=\mathbf{b}$ is asking for weights that build $\mathbf{b}$ from the columns. That is a question about $\operatorname{Col}A$. And if two vectors $\mathbf{p}$ and $\mathbf{y}$ both solve the system, then $A(\mathbf{y}-\mathbf{p})=\mathbf{b}-\mathbf{b}=\mathbf{0}$: they differ by a vector of $\operatorname{Nul}A$.

📐 Theorem 5.19 — Existence and structure of solutions
Let $A$ be an $m\times n$ matrix and $\mathbf{b}\in\mathbb{R}^m$.
  1. $A\mathbf{x}=\mathbf{b}$ is consistent if and only if $\mathbf{b}\in\operatorname{Col}A$.
  2. If $\mathbf{p}$ is any one (particular) solution, then the set of all solutions is $$\{\mathbf{p}+\mathbf{v}_h:\ \mathbf{v}_h\in\operatorname{Nul}A\}.$$ So a consistent system has a unique solution exactly when $\operatorname{Nul}A=\{\mathbf{0}\}$, and otherwise infinitely many.

Geometrically, the solution set of a consistent system is the null space shifted so that it passes through $\mathbf{p}$ — a line, plane, … parallel to $\operatorname{Nul}A$. Interactive 2 shows both halves of the theorem side by side.

✏️ Example 4 — Is $\mathbf{b}$ in the column space?
Let $B=\begin{bmatrix}1&-1&2\\2&1&1\\3&0&3\end{bmatrix}$. Find a condition on $\mathbf{b}=(b_1,b_2,b_3)$ for $\mathbf{b}\in\operatorname{Col}B$, and decide whether $(3,0,3)$ and $(1,1,1)$ belong to $\operatorname{Col}B$.
Augment $$\left[\begin{array}{ccc|c}1&-1&2&b_1\\2&1&1&b_2\\3&0&3&b_3\end{array}\right]\xrightarrow{\substack{R_2\to R_2-2R_1\\R_3\to R_3-3R_1}}\left[\begin{array}{ccc|c}1&-1&2&b_1\\0&3&-3&b_2-2b_1\\0&3&-3&b_3-3b_1\end{array}\right]\xrightarrow{R_3\to R_3-R_2}\left[\begin{array}{ccc|c}1&-1&2&b_1\\0&3&-3&b_2-2b_1\\0&0&0&b_3-b_1-b_2\end{array}\right].$$
Condition The system is consistent exactly when the last row is $0=0$: $$\mathbf{b}\in\operatorname{Col}B\iff b_3=b_1+b_2 .$$ So $\operatorname{Col}B$ is the plane $b_1+b_2-b_3=0$ in $\mathbb{R}^3$ (rank $2$), spanned by the pivot columns $(1,2,3)$ and $(-1,1,0)$.
Test $(3,0,3)$: $3+0=3$ ✓, so it is in $\operatorname{Col}B$. $(1,1,1)$: $1+1=2\ne1$, so it is not, and $B\mathbf{x}=(1,1,1)$ has no solution.
✏️ Example 5 — Particular solution plus null space
Solve $B\mathbf{x}=(3,0,3)$ for the matrix $B$ of Example 4, and write the answer as $\mathbf{p}+\mathbf{v}_h$.
Reduce $$\left[\begin{array}{ccc|c}1&-1&2&3\\2&1&1&0\\3&0&3&3\end{array}\right]\to\left[\begin{array}{ccc|c}1&-1&2&3\\0&3&-3&-6\\0&0&0&0\end{array}\right]\xrightarrow{R_2\to\tfrac13R_2}\left[\begin{array}{ccc|c}1&-1&2&3\\0&1&-1&-2\\0&0&0&0\end{array}\right]\xrightarrow{R_1\to R_1+R_2}\left[\begin{array}{ccc|c}1&0&1&1\\0&1&-1&-2\\0&0&0&0\end{array}\right].$$
Parametrise $x_3=t$ is free; $x_1=1-t$, $x_2=-2+t$: $$\mathbf{x}=\underbrace{\begin{bmatrix}1\\-2\\0\end{bmatrix}}_{\mathbf{p}}+t\underbrace{\begin{bmatrix}-1\\1\\1\end{bmatrix}}_{\in\operatorname{Nul}B},\qquad t\in\mathbb{R}.$$
Check $B\mathbf{p}=(1+2,\ 2-2,\ 3)=(3,0,3)$ ✓ and $B(-1,1,1)=(-1-1+2,\ -2+1+1,\ -3+0+3)=\mathbf{0}$ ✓. The solution set is a line through $\mathbf{p}$ parallel to the line $\operatorname{Nul}B$; rank $2$ + nullity $1$ = $3$.
Interactive 2 — Is $\mathbf{b}$ Reachable? Column Space and Solution Set

Right: the output plane. The columns $\mathbf{a}_1,\mathbf{a}_2$ of a $2\times2$ matrix span $\operatorname{Col}A$ (blue): a line when the rank is $1$, the whole plane when the rank is $2$. Drag $\mathbf{b}$ (it snaps to a half-unit grid) or press Play. Left: the input plane, with $\operatorname{Nul}A$ dashed and the full solution set of $A\mathbf{x}=\mathbf{b}$ in green — empty when $\mathbf{b}\notin\operatorname{Col}A$, otherwise $\operatorname{Nul}A$ shifted through a particular solution.

input space: solutions $\mathbf{x}$
output space: $\operatorname{Col}A$ and $\mathbf{b}$
$\mathbf{b}$—
$\mathbf{b}\in\operatorname{Col}A$?—
rank + nullity—
solutions of $A\mathbf{x}=\mathbf{b}$—

The Invertible Matrix Theorem, Extended

For a square matrix the ideas of this chapter join the list of equivalent conditions for invertibility met in Chapters 2 and 3.

📐 Theorem 5.20 — The Invertible Matrix Theorem (continued)
Let $A$ be an $n\times n$ matrix. The following statements are equivalent — either all true or all false:
  1. $A$ is invertible.
  2. $\det A\ne0$.
  3. $A$ is row equivalent to $I_n$.
  4. $A\mathbf{x}=\mathbf{b}$ has exactly one solution for every $\mathbf{b}$ in $\mathbb{R}^n$.
  5. The columns of $A$ form a basis of $\mathbb{R}^n$.
  6. $\operatorname{Col}A=\mathbb{R}^n$.
  7. $\operatorname{rank}A=n$.
  8. $\operatorname{Nul}A=\{\mathbf{0}\}$.
  9. $\operatorname{nullity}A=0$.
  10. The rows of $A$ form a basis of $\mathbb{R}^n$ ($\operatorname{Row}A=\mathbb{R}^n$).

The Rank–Nullity Theorem is what links items 7 and 9: for a square matrix, $\operatorname{rank}A=n$ and $\operatorname{nullity}A=0$ are the same statement. In particular, for square matrices only, "the columns span" and "the columns are independent" stand or fall together.

✏️ Example 6 — Deciding invertibility through rank
Is $C=\begin{bmatrix}1&2&3\\2&5&7\\1&1&2\end{bmatrix}$ invertible? Find $\operatorname{rank}C$, $\operatorname{nullity}C$ and a nonzero vector in $\operatorname{Nul}C$ if there is one.
Reduce $$C\xrightarrow{\substack{R_2\to R_2-2R_1\\R_3\to R_3-R_1}}\begin{bmatrix}1&2&3\\0&1&1\\0&-1&-1\end{bmatrix}\xrightarrow{R_3\to R_3+R_2}\begin{bmatrix}1&2&3\\0&1&1\\0&0&0\end{bmatrix}\xrightarrow{R_1\to R_1-2R_2}\begin{bmatrix}1&0&1\\0&1&1\\0&0&0\end{bmatrix}.$$
Rank Two pivots: $\operatorname{rank}C=2\lt3$, so by Theorem 5.20 $C$ is not invertible (and $\det C=0$). Nullity $=3-2=1$.
Null vector $x_3=t$ free, $x_1=-t$, $x_2=-t$: $\operatorname{Nul}C=\operatorname{span}\{(-1,-1,1)\}$.
Check $C(-1,-1,1)=(-1-2+3,\ -2-5+7,\ -1-1+2)=\mathbf{0}$ ✓ — so column 3 equals column 1 + column 2, and the columns cannot be a basis of $\mathbb{R}^3$.

Exercises

I
For each matrix, find bases of $\operatorname{Row}A$, $\operatorname{Col}A$ and $\operatorname{Nul}A$, and state $\operatorname{rank}A$ and $\operatorname{nullity}A$. Check that rank + nullity = number of columns.
  • 1 $\begin{bmatrix}1&2\\3&6\end{bmatrix}$
  • 2 $\begin{bmatrix}1&0&-1\\2&1&0\\3&1&-1\end{bmatrix}$
  • 3 $\begin{bmatrix}1&3&1&2\\2&6&3&7\end{bmatrix}$
  • 4 $\begin{bmatrix}1&2&0&-1\\2&4&1&1\\3&6&1&0\end{bmatrix}$
  • 5 $\begin{bmatrix}1&-2&0&3&1\\2&-4&1&4&0\\0&0&1&-2&-2\end{bmatrix}$
  • 6 $\begin{bmatrix}2&4&-2\\1&3&1\\0&1&2\\1&1&-3\end{bmatrix}$
Check: the reduced echelon form and rank of each exercise matrix (exact fractions)
1 $R=\begin{bmatrix}1&2\\0&0\end{bmatrix}$ ($R_2\to R_2-3R_1$). Row: $\{(1,2)\}$. Col: $\{(1,3)\}$ (column 1 of $A$). Nul: $x_1=-2x_2$, basis $\{(-2,1)\}$. Rank $1$, nullity $1$; $1+1=2$ ✓.
2 $R=\begin{bmatrix}1&0&-1\\0&1&2\\0&0&0\end{bmatrix}$ (row 3 = row 1 + row 2). Row: $\{(1,0,-1),(0,1,2)\}$. Col: $\{(1,2,3),(0,1,1)\}$. Nul: $x_1=x_3$, $x_2=-2x_3$, basis $\{(1,-2,1)\}$. Rank $2$, nullity $1$; $2+1=3$ ✓.
3 $\begin{bmatrix}1&3&1&2\\0&0&1&3\end{bmatrix}$ after $R_2\to R_2-2R_1$, then $R_1\to R_1-R_2$: $R=\begin{bmatrix}1&3&0&-1\\0&0&1&3\end{bmatrix}$. Row: $\{(1,3,0,-1),(0,0,1,3)\}$. Col: columns 1, 3 of $A$: $\{(1,2),(1,3)\}$ — so $\operatorname{Col}A=\mathbb{R}^2$. Nul: $x_1=-3x_2+x_4$, $x_3=-3x_4$, basis $\{(-3,1,0,0),(1,0,-3,1)\}$. Rank $2$, nullity $2$; $2+2=4$ ✓.
4 Row 3 = row 1 + row 2; $R=\begin{bmatrix}1&2&0&-1\\0&0&1&3\\0&0&0&0\end{bmatrix}$. Row: $\{(1,2,0,-1),(0,0,1,3)\}$. Col: columns 1, 3: $\{(1,2,3),(0,1,1)\}$. Nul: $\{(-2,1,0,0),(1,0,-3,1)\}$. Rank $2$, nullity $2$; $2+2=4$ ✓.
5 Row 3 = row 2 − 2·row 1; $R=\begin{bmatrix}1&-2&0&3&1\\0&0&1&-2&-2\\0&0&0&0&0\end{bmatrix}$. Row: $\{(1,-2,0,3,1),(0,0,1,-2,-2)\}$. Col: columns 1, 3: $\{(1,2,0),(0,1,1)\}$. Nul (free $x_2,x_4,x_5$): $\{(2,1,0,0,0),\ (-3,0,2,1,0),\ (-1,0,2,0,1)\}$. Rank $2$, nullity $3$; $2+3=5$ ✓.
6 $R=\begin{bmatrix}1&0&-5\\0&1&2\\0&0&0\\0&0&0\end{bmatrix}$. Row: $\{(1,0,-5),(0,1,2)\}$. Col: columns 1, 2: $\{(2,1,0,1),(4,3,1,1)\}$. Nul: $x_1=5x_3$, $x_2=-2x_3$, basis $\{(5,-2,1)\}$. Rank $2$, nullity $1$; $2+1=3$ ✓. (Check: $5(2,1,0,1)-2(4,3,1,1)+(-2,1,2,-3)=\mathbf{0}$.)
II
Reasoning with rank and nullity (no row reduction needed).
  • 1 $A$ is $5\times7$ with rank $4$. Find $\operatorname{nullity}A$, $\dim\operatorname{Row}A$ and $\dim\operatorname{Col}A$.
  • 2 $A$ is $4\times6$ with a $3$-dimensional null space. Find $\operatorname{rank}A$.
  • 3 Can a $4\times7$ matrix have a $2$-dimensional null space?
  • 4 Can a $6\times4$ matrix have rank $5$?
  • 5 Explain why a homogeneous system of $3$ equations in $5$ unknowns always has a solution set of dimension at least $2$.
  • 6 $A$ is $6\times8$ and $A\mathbf{x}=\mathbf{b}$ is consistent for every $\mathbf{b}\in\mathbb{R}^6$. Find $\operatorname{nullity}A$.
  • 7 $A$ is $7\times5$ with linearly independent columns. Find $\operatorname{rank}A$, $\operatorname{nullity}A$ and describe $\operatorname{Row}A$.
  • 8 $A$ is $4\times9$ with rank $3$. Find $\operatorname{rank}A^{T}$ and $\operatorname{nullity}A^{T}$.
1 $\operatorname{nullity}A=7-4=3$; $\dim\operatorname{Row}A=\dim\operatorname{Col}A=\operatorname{rank}A=4$.
2 $\operatorname{rank}A=6-3=3$.
3 It would need rank $7-2=5$, but $4$ rows allow at most $4$ pivots. No; the nullity is always at least $3$.
4 No: $\operatorname{rank}A\le\min(6,4)=4$ (at most one pivot per column).
5 The coefficient matrix is $3\times5$, so its rank is at most $3$ and its nullity is $5-\operatorname{rank}\ge5-3=2$. The solution set is $\operatorname{Nul}A$, of dimension at least $2$.
6 $\operatorname{Col}A=\mathbb{R}^6$, so $\operatorname{rank}A=6$ and $\operatorname{nullity}A=8-6=2$.
7 Independent columns mean $\operatorname{Nul}A=\{\mathbf{0}\}$: nullity $0$, rank $5-0=5$. $\operatorname{Row}A$ is a $5$-dimensional subspace of $\mathbb{R}^5$, so $\operatorname{Row}A=\mathbb{R}^5$.
8 $\operatorname{rank}A^{T}=\operatorname{rank}A=3$. $A^{T}$ is $9\times4$, so $\operatorname{nullity}A^{T}=4-3=1$.
III
Consistency and the structure of solutions.
  • 1 Let $A=\begin{bmatrix}1&2\\2&5\\3&7\end{bmatrix}$. Is $\mathbf{b}=(4,9,13)$ in $\operatorname{Col}A$? If so, write it as a combination of the columns.
  • 2 For the same $A$, is $(1,0,0)$ in $\operatorname{Col}A$?
  • 3 Let $A=\begin{bmatrix}1&2&-1\\2&4&-2\\1&3&0\end{bmatrix}$. Find the condition on $b_1,b_2,b_3$ for $A\mathbf{x}=\mathbf{b}$ to be consistent, and describe $\operatorname{Col}A$ geometrically.
  • 4 For the matrix of part 3, solve $A\mathbf{x}=(1,2,4)$ and write the solution as $\mathbf{p}+\mathbf{v}_h$.
  • 5 Write the general solution of the single equation $x_1+2x_2-x_3+x_4=3$ in $\mathbb{R}^4$ as a particular solution plus a combination of a basis of the null space.
  • 6 $\mathbf{p}=(1,1,1)$ solves $A\mathbf{x}=\mathbf{b}$ and $\operatorname{Nul}A=\operatorname{span}\{(1,-1,0)\}$. Describe all solutions. Is $(3,-1,1)$ a solution? Is $(2,1,1)$?
1 Solve $c_1(1,2,3)+c_2(2,5,7)=(4,9,13)$: from the first two entries $c_1+2c_2=4$, $2c_1+5c_2=9$, so $c_2=1$, $c_1=2$; the third entry: $3(2)+7(1)=13$ ✓. Yes: $\mathbf{b}=2\mathbf{a}_1+\mathbf{a}_2$.
2 $c_1+2c_2=1$, $2c_1+5c_2=0$ give $c_2=-2$, $c_1=5$, but then $3(5)+7(-2)=1\ne0$. No — the augmented matrix has rank $3$ while $A$ has rank $2$.
3 Row reduce $[A\,|\,\mathbf{b}]$: $R_2\to R_2-2R_1$ gives the row $(0,0,0\,|\,b_2-2b_1)$; $R_3\to R_3-R_1$ gives $(0,1,1\,|\,b_3-b_1)$. Consistent $\iff b_2=2b_1$. $\operatorname{Col}A$ is the plane $2b_1-b_2=0$ through the origin, spanned by $(1,2,1)$ and $(2,4,3)$ (rank $2$).
4 $2(1)-2=0$, so it is consistent. $[A\,|\,\mathbf{b}]\sim\left[\begin{array}{ccc|c}1&0&-3&-5\\0&1&1&3\\0&0&0&0\end{array}\right]$, so $x_1=-5+3t$, $x_2=3-t$, $x_3=t$: $$\mathbf{x}=(-5,3,0)+t(3,-1,1).$$ Check: $A(-5,3,0)=(1,2,4)$ ✓, $A(3,-1,1)=\mathbf{0}$ ✓.
5 $x_1=3-2x_2+x_3-x_4$ with $x_2,x_3,x_4$ free: $$\mathbf{x}=(3,0,0,0)+s(-2,1,0,0)+t(1,0,1,0)+u(-1,0,0,1).$$ The solution set is a $3$-dimensional "hyperplane" parallel to $\operatorname{Nul}A$ (rank $1$ + nullity $3$ = $4$).
6 All solutions: $\mathbf{x}=(1,1,1)+t(1,-1,0)$. $(3,-1,1)-(1,1,1)=(2,-2,0)=2(1,-1,0)\in\operatorname{Nul}A$, so yes. $(2,1,1)-(1,1,1)=(1,0,0)$ is not a multiple of $(1,-1,0)$, so no.
IV
Invertibility, and an application to networks.
  • 1 $A$ is $5\times5$ and $\operatorname{Nul}A=\{\mathbf{0}\}$. Is $A\mathbf{x}=\mathbf{b}$ solvable for every $\mathbf{b}\in\mathbb{R}^5$? Explain.
  • 2 $A$ is $4\times4$ with rank $3$. Is $A$ invertible? What is $\det A$?
  • 3 Use rank to show that the rows of a square matrix are linearly independent if and only if its columns are.
  • 4 Electrical network. A circuit has $4$ junctions (nodes) and $5$ wires (edges) with chosen directions $e_1:1\to2$, $e_2:2\to3$, $e_3:3\to1$, $e_4:3\to4$, $e_5:4\to1$. Its incidence matrix (entry $-1$ if the wire leaves the node, $+1$ if it enters) is $$A=\begin{bmatrix}-1&0&1&0&1\\1&-1&0&0&0\\0&1&-1&-1&0\\0&0&0&1&-1\end{bmatrix}.$$ Find $\operatorname{rank}A$ and $\operatorname{nullity}A$.
  • 5 For the network of part 4, a vector $\mathbf{x}$ of wire currents (in amperes) with $A\mathbf{x}=\mathbf{0}$ satisfies Kirchhoff's current law (no charge builds up at any node). Find a basis of $\operatorname{Nul}A$ and interpret each basis vector as a loop in the circuit.
  • 6 For the same $A$, show that $\mathbf{b}\in\operatorname{Col}A$ forces $b_1+b_2+b_3+b_4=0$, and explain this physically if $b_i$ is the current supplied to node $i$ from outside.
1 Yes. Nullity $0$ gives rank $5$, so $\operatorname{Col}A=\mathbb{R}^5$; by Theorem 5.20, $A$ is invertible and each system has exactly one solution.
2 Rank $3\lt4$, so $A$ is not invertible and $\det A=0$.
3 For $n\times n$ $A$: rows independent $\iff\dim\operatorname{Row}A=n\iff\operatorname{rank}A=n$ (Theorem 5.18) $\iff\dim\operatorname{Col}A=n\iff$ columns independent.
4 Row reduction gives $\begin{bmatrix}1&0&-1&0&-1\\0&1&-1&0&-1\\0&0&0&1&-1\\0&0&0&0&0\end{bmatrix}$: $\operatorname{rank}A=3$ (one less than the number of nodes, because the rows add up to the zero row) and $\operatorname{nullity}A=5-3=2$.
5 Free variables $x_3,x_5$: $x_1=x_3+x_5$, $x_2=x_3+x_5$, $x_4=x_5$. Basis $\{(1,1,1,0,0),\ (1,1,0,1,1)\}$. The first is $1$ A around the loop $1\to2\to3\to1$ (wires $e_1,e_2,e_3$); the second is $1$ A around $1\to2\to3\to4\to1$ (wires $e_1,e_2,e_4,e_5$). Every current pattern obeying Kirchhoff's law is a combination of these two loop currents; the nullity, $2$, is the number of independent loops ($\text{edges}-\text{nodes}+1=5-4+1$).
6 Each column of $A$ has one $-1$ and one $+1$, so every column has entries summing to $0$, and so does every combination $A\mathbf{x}$. Hence $b_1+b_2+b_3+b_4=0$ for every $\mathbf{b}\in\operatorname{Col}A$. (Conversely, these $\mathbf{b}$ form a $3$-dimensional subspace, which equals $\operatorname{Col}A$ since the rank is $3$.) Physically: current fed into the network must equal current taken out — charge is conserved.
🔬 Research–Teaching NexusResearch-tutored · optional, about 30 minutes

Research question. How many independent flow measurements does a water-distribution network need before every pipe flow is known?

Why it matters. City water utilities, district-heating companies and power-grid operators model their networks with incidence matrices. Flows that conserve water at every junction form $\operatorname{Nul}A$; its dimension (the number of independent loops) tells engineers how many extra flow meters are needed, and the Rank–Nullity Theorem gives that number without solving anything.

What to do.

  1. Sample case: a small district network has $6$ junctions and $8$ pipes, oriented $1\to2$, $2\to3$, $3\to6$, $6\to5$, $5\to4$, $4\to1$, $2\to5$, $1\to5$. Write its $6\times8$ incidence matrix $A$.
  2. Compute $\operatorname{rank}A$ (by hand, a spreadsheet, or Python with sympy.Matrix(A).rank()) and use the Rank–Nullity Theorem to get the number of independent loops.
  3. Find a basis of $\operatorname{Nul}A$ and draw each basis vector as a loop on a sketch of the network.
  4. Explain why $\operatorname{rank}A$ is always (number of junctions) $-1$ for a connected network, and deduce the formula loops $=$ pipes $-$ junctions $+1$.

Tools: Pencil and paper, spreadsheet or Python (sympy)

Hand in: A half-page report with the matrix, its rank and nullity, a labelled sketch of the loops, and one sentence on how many flow meters (beyond junction balances) the utility needs.

Going further. Find a published map of a real district network (many cities publish simplified ones) and estimate its number of loops. Look up how the same count appears in Euler's formula for planar graphs.

Instructor note: $\operatorname{rank}A=5$, $\operatorname{nullity}A=3=8-6+1$; one null-space basis is $(1,1,1,1,1,1,0,0)$ (the outer loop), $(0,-1,-1,-1,0,0,1,0)$ and $(-1,-1,-1,-1,0,0,0,1)$; the left null space of $A$ is spanned by $(1,1,1,1,1,1)$ (total supply $=0$). Students should see that three measured loop flows determine every pipe flow.

🧪 Self-check quiz

0/5 correct

Q1. A $4\times6$ matrix has rank $4$. Its nullity is

Q2. A basis for $\operatorname{Col}A$ is given by

Q3. The system $A\mathbf{x}=\mathbf{b}$ is consistent exactly when

Q4. A $3\times5$ matrix $A$ has rank $2$. Then $\operatorname{rank}A^{T}$ is

Q5. If two solutions of $A\mathbf{x}=\mathbf{b}$ are $\mathbf{p}$ and $\mathbf{q}$, then $\mathbf{q}-\mathbf{p}$ lies in