Phase 4 - Lesson 4.2

Linear Maps, Matrices, Rank, and the Null Space

How matrices represent linear transformations, and the rank-nullity theorem that governs solvability of linear systems.

⏱ 55 min● Intermediate🔗 Prereqs: 4.1
↖ Phase 4 hub
Builds on: Bases and dimension from 4.1.
Leads to: Eigenvalues (4.3) study maps from a space to itself; least squares (4.5) lives in the column space.

Learning Objectives

Click a status chip to cycle: Not started → In progress → Studied → Practiced → Needs review → Mastered.

Key Vocabulary

Linear map
A function \(T:V\to W\) with \(T(u+v)=Tu+Tv\) and \(T(cv)=cTv\).
Matrix representation
The array whose columns are the images \(T v_j\) of a basis, written in the target basis.
Null space
The kernel \(\ker T=\{v:Tv=0\}\); its dimension is the nullity.
Column space
The range \(\operatorname{col}(A)=\{Ax\}\); its dimension is the rank.
Rank
The dimension of the column space, equal to the dimension of the row space.
Invertible map
A bijective linear map; for square \(A\) equivalent to full rank and trivial null space.

Intuition & Motivation

Intuition
A linear map is a transformation that respects the grid: lines stay lines, the origin stays put, and parallel stays parallel. Once you fix bases, every such map is a matrix, and matrix multiplication is exactly ‘apply the map’. Two subspaces tell the whole story: the null space (what gets crushed to zero) and the column space (what outputs are reachable). The rank-nullity theorem says their dimensions must add up to the input dimension - every dimension of the domain is either flattened or preserved.

Maps become matrices

Fix a basis \((v_1,\dots,v_n)\) of the domain and \((w_1,\dots,w_m)\) of the target. A linear map \(T\) is determined by where it sends the basis vectors; the coordinates of \(Tv_j\) form the \(j\)-th column of its matrix \(A\). Then \(T x\) in coordinates is just \(Ax\).

The null space \(\ker A=\{x:Ax=0\}\) and column space \(\operatorname{col}(A)=\{Ax\}\) are subspaces. Their dimensions are the nullity and the rank.

Theorem - Rank–nullity
For \(A:\R^n\to\R^m\), \(\dim\ker A+\operatorname{rank}A=n\). Equivalently, nullity + rank = number of columns.
Proof
Take a basis \((u_1,\dots,u_k)\) of \(\ker A\) and extend it to a basis of the whole domain by adding \((x_1,\dots,x_{n-k})\). One shows the images \((Ax_1,\dots,Ax_{n-k})\) form a basis of the column space, so \(\operatorname{rank}A=n-k\), i.e. \(k+\operatorname{rank}=n\).
Worked Example - Null space and rank of a matrix
1
Let \(A=\begin{bmatrix}1&2&1\\2&4&3\end{bmatrix}\). Row-reduce: \(R_2\to R_2-2R_1\) gives \(\begin{bmatrix}1&2&1\\0&0&1\end{bmatrix}\).
2
Two nonzero pivot rows → \(\operatorname{rank}A=2\). Columns 1 and 3 are pivot columns.
3
Null space: from the reduced system \(x_3=0\) and \(x_1+2x_2=0\), so \(x=x_2(-2,1,0)\). Thus \(\ker A=\operatorname{span}\{(-2,1,0)\}\), nullity 1.
4
Check rank–nullity: \(2+1=3=n\). The map from \(\R^3\) to \(\R^2\) flattens one dimension.

Rank, invertibility, and solving \(Ax=b\)

The system \(Ax=b\) is solvable iff \(b\in\operatorname{col}(A)\). When solvable, the full solution set is a shifted copy of the null space: one particular solution plus \(\ker A\). For square \(A\), the following are equivalent: \(A\) invertible; \(\operatorname{rank}A=n\); \(\ker A=\{0\}\); \(\det A\neq 0\).

Interactive: how a matrix warps the plane

Drag the entries of the \(2\times2\) matrix and watch the unit square transform. When the columns become parallel the square collapses to a segment - rank drops to 1, the null space becomes nontrivial, and the map is no longer invertible.

Common Mistakes to Avoid
  • Confusing the null space (in the domain) with the column space (in the target).
  • Reading rank off the number of rows or columns rather than the number of pivots.
  • Assuming \(Ax=b\) always has a solution; it needs \(b\in\operatorname{col}(A)\).
  • Forgetting that a nontrivial null space means solutions are non-unique (a whole coset).
Quant Practitioner Tips
  • Row-reduce once: pivots give the rank, free columns give a null-space basis, both in one pass.
  • For a data matrix of asset returns, rank = number of independent factors; a low rank signals redundant/collinear assets.
  • Invertibility is an all-or-nothing property equivalent to full rank, trivial kernel, and nonzero determinant.

Practice this in the Euler Lab

Computational problems that exercise exactly this technique. Each opens in the Euler Lab with a Python workbench, a progressive hint ladder, and answer checking. Tier A/B run at full scale in the browser.

Warm-up:
#16 Power Digit Sum (1%, tier A) #30 Digit Fifth Powers (2%, tier A) #52 Permuted Multiples (2%, tier A) #33 Digit Cancelling Fractions (3%, tier A)

Applied:
#345 Matrix Sum (17%, tier B) #932 $2025$ (17%, tier B) #315 Digital Root Clocks (18%, tier B)

Challenge:
#666 Polymorphic Bacteria (41%, tier C) #157 Base-10 Diophantine Reciprocal (42%, tier C)

148 Project Euler problems in total are mapped to this lesson. Open the Euler Lab to filter them all.

Knowledge Check

Q1 Easy
For \(A:\R^5\to\R^3\) with \(\operatorname{rank}A=3\), the nullity is:
0
2
3
5
Q2 Medium
The system \(Ax=b\) has a solution if and only if:
\(b=0\)
\(A\) is square
\(b\in\operatorname{col}(A)\)
\(\det A\neq0\)
Q3 Medium
A square matrix has a nontrivial null space. Then it is:
Invertible
Not invertible (singular)
Symmetric
Orthogonal

Practical Exercise

Let \(A=\begin{bmatrix}1&1&2\\1&2&3\\2&3&5\end{bmatrix}\). Find \(\operatorname{rank}A\), a basis for \(\ker A\), and state whether \(A\) is invertible.

▶ Show full solution

Row-reduce: \(R_2\to R_2-R_1,\ R_3\to R_3-2R_1\) gives rows \((1,1,2),(0,1,1),(0,1,1)\); then \(R_3\to R_3-R_2\) gives a zero row. Two pivots, so \(\operatorname{rank}A=2\).

Back-substitute the reduced system \(x_1+x_2+2x_3=0,\ x_2+x_3=0\): \(x_2=-x_3\), \(x_1=-x_2-2x_3=-x_3\). So \(x=x_3(-1,-1,1)\) and \(\ker A=\operatorname{span}\{(-1,-1,1)\}\), nullity 1.

Since the rank is \(2\lt 3\) (equivalently the kernel is nontrivial and the third row is the sum of the first two), \(A\) is not invertible. Check: \(2+1=3=n\).

After the reveal, answer for yourself: The dependency row3 = row1 + row2 is exactly why the rank dropped and the determinant is zero.

Lesson Summary

Linear maps become matrices once bases are fixed; their behavior is captured by the null space (what collapses) and the column space (what is reachable). Rank-nullity, \(\dim\ker A+\operatorname{rank}A=n\), ties them together, and for square matrices full rank, trivial kernel, nonzero determinant, and invertibility are one and the same.

Formula Sheet Additions

Rank-nullity
\[\dim\ker A+\rank A=n\]
Every domain dimension is either flattened or preserved.

Retrieval Practice

Close the lesson and answer from memory before checking. This is deliberate, effortful recall - the single highest-yield study action.

▶ Show retrieval prompts & answers
Q: State the rank-nullity theorem.
A: For A:R^n→R^m, dim(ker A) + rank A = n (the number of columns).
Q: When is Ax=b solvable, and when is the solution unique?
A: Solvable iff b is in the column space; unique iff the null space is trivial (full column rank).

Completion Checklist

Confidence / mastery rating
Personal notes

Source References

This lesson synthesizes and paraphrases concepts from the sources below. No copyrighted text, problem sets, or solutions are reproduced. Return to the originals for full depth.