concept / linear-algebra--rank-nullity-theorem
Next task →
University/Linear Algebra/Linear maps/Rank–nullity theorem
Vector spaces · Linear maps · Structure

Rank–nullity theorem

For a linear map T: V → W between finite-dimensional vector spaces, dim V = dim ker T + dim im T. The theorem is an exact dimension identity, proved by extending a basis of the kernel to a basis of the whole space.

35 sectionsfoundational90 minhand-authored · structural 68/100
Take assessment →
Mastery requires: derivation reproduced, from-scratch implementation committed, failure case explained, and assessment score ≥ 80%. Current state: not_started.

1. Concept overview

Let VV and WW be vector spaces over a field F\mathbb{F}, with VV finite-dimensional, and let T:V→WT:V\to W be linear. The kernel and image are

ker⁡T={v∈V:T(v)=0},im⁡T={T(v):v∈V}⊆W.\ker T=\{v\in V:T(v)=0\},\qquad \operatorname{im}T=\{T(v):v\in V\}\subseteq W.

Both are subspaces. Write nullity⁡(T)=dim⁡ker⁡T\operatorname{nullity}(T)=\dim\ker T and rank⁡(T)=dim⁡im⁡T\operatorname{rank}(T)=\dim\operatorname{im}T. The rank–nullity theorem states

dim⁡V=nullity⁡(T)+rank⁡(T).\boxed{\dim V=\operatorname{nullity}(T)+\operatorname{rank}(T).}

This is an identity, not an inequality or an approximation. It says that a linear map loses exactly as many dimensions as it collapses into its kernel and transports the rest isomorphically into its image.

2. Why this concept exists

Rank and nullity are separately easy to define but hard to interpret in isolation. A matrix can have large rank and large nullity at the same time — for example a 100×200100\times 200 matrix of rank 100100 has nullity 100100. The theorem supplies the missing bookkeeping: the domain dimension is partitioned between the directions the map kills and the directions it preserves.

It is also the reason Gaussian elimination gives a complete description of a linear system. The number of free variables is the nullity, the number of pivots is the rank, and their sum is the number of columns. Without the theorem, “count pivots” and “count free variables” would be two unrelated procedures rather than two halves of one statement.

3. Historical background

Rank–nullity is a standard theorem of finite-dimensional linear algebra. It appears in the modern form in standard texts such as Axler's Linear Algebra Done Right, Strang's Introduction to Linear Algebra, and Hoffman and Kunze's Linear Algebra. It does not have a single dramatic origin story, and it should not be attributed to a paper about optimization or PDE stability. The result is a consequence of the first isomorphism theorem for vector spaces, V/ker⁡T≅im⁡TV/\ker T\cong\operatorname{im}T, together with the dimension formula for quotients.

4. Fundamental problem

Given a linear map T:V→WT:V\to W, how much information about VV survives under TT, and how much is destroyed? Equivalently: if TT collapses some subspace to zero, what is the dimension of that subspace, and what is the dimension of the remaining image?

The naive answer “rank is the number of nonzero rows after elimination” computes one quantity but does not explain why the remaining dimensions must add up. The structural question is: can we choose a basis of VV in which TT has the block form

(Ir000),\begin{pmatrix}I_r&0\\0&0\end{pmatrix},

with r=rank⁡Tr=\operatorname{rank}T? Rank–nullity is the dimension count behind that normal form.

5. First-principles explanation

A linear map is determined by what it does to a basis. Suppose {v1,…,vk}\{v_1,\dots,v_k\} is a basis of ker⁡T\ker T. Extend it to a basis

{v1,…,vk,u1,…,un−k}\{v_1,\dots,v_k,u_1,\dots,u_{n-k}\}

of VV, where n=dim⁡Vn=\dim V. The kernel directions are exactly the ones that vanish. The claim is that the images T(u1),…,T(un−k)T(u_1),\dots,T(u_{n-k}) are a basis of im⁡T\operatorname{im}T. If true, the image has dimension n−kn-k, and the identity follows immediately.

So the entire proof reduces to two checks: those images span the image, and they are linearly independent. Both use only linearity and the fact that the viv_i already span the kernel.

6. Prerequisite concepts

You need: (a) the definition of a vector space, subspace, span, linear independence and basis; (b) the fact that any linearly independent set in a finite-dimensional space can be extended to a basis; (c) the definition of a linear map, kernel and image; (d) the dimension of a subspace. Quotient spaces are optional: they give the shortest conceptual proof, but the basis-extension proof below avoids them.

7. Complete mathematical formulation

Theorem. Let VV be finite-dimensional and T:V→WT:V\to W linear. Then

dim⁡V=dim⁡ker⁡T+dim⁡im⁡T.\dim V=\dim\ker T+\dim\operatorname{im}T.

Equivalent matrix form. For A∈Fm×nA\in\mathbb{F}^{m\times n},

n=rank⁡(A)+nullity⁡(A),n=\operatorname{rank}(A)+\operatorname{nullity}(A),

where rank⁡(A)=dim⁡Col⁡(A)\operatorname{rank}(A)=\dim\operatorname{Col}(A) and nullity⁡(A)=dim⁡{x∈Fn:Ax=0}\operatorname{nullity}(A)=\dim\{x\in\mathbb{F}^n:Ax=0\}.

Consequences.

  • TT is injective iff ker⁡T={0}\ker T=\{0\} iff rank⁡T=dim⁡V\operatorname{rank}T=\dim V.
  • If dim⁡V=dim⁡W\dim V=\dim W and TT is injective, then TT is surjective (and hence invertible).
  • For an m×nm\times n matrix, rank⁡A≤min⁡(m,n)\operatorname{rank}A\le\min(m,n), so nullity⁡A≥n−m\operatorname{nullity}A\ge n-m when m<nm<n.

8. Notation dictionary

| Symbol | Meaning | Type | |---|---|---| | V,WV,W | vector spaces over a field F\mathbb{F} | spaces | | T:V→WT:V\to W | linear map | function | | ker⁡T\ker T | kernel {v:T(v)=0}\{v:T(v)=0\} | subspace of VV | | im⁡T\operatorname{im}T | image {T(v):v∈V}\{T(v):v\in V\} | subspace of WW | | dim⁡\dim | dimension over F\mathbb{F} | integer | | rank⁡T\operatorname{rank}T | dim⁡im⁡T\dim\operatorname{im}T | integer | | nullity⁡T\operatorname{nullity}T | dim⁡ker⁡T\dim\ker T | integer | | {vi}\{v_i\} | basis of the kernel | set of vectors | | {uj}\{u_j\} | extension vectors completing a basis of VV | set of vectors | | AA | matrix representing TT after choosing bases | matrix | | nn | dim⁡V\dim V (number of columns) | integer | | rr | rank⁡T\operatorname{rank}T | integer |

9. Step-by-step derivation

Step 1 — choose a kernel basis. Let k=dim⁡ker⁡Tk=\dim\ker T and choose a basis {v1,…,vk}\{v_1,\dots,v_k\} of ker⁡T\ker T. If k=0k=0, the kernel is {0}\{0\} and the argument below starts from the empty set.

Step 2 — extend to a basis of VV. The basis extension theorem gives vectors u1,…,un−ku_1,\dots,u_{n-k} such that {v1,…,vk,u1,…,un−k}\{v_1,\dots,v_k,u_1,\dots,u_{n-k}\} is a basis of VV, where n=dim⁡Vn=\dim V.

Step 3 — the images span. Any v∈Vv\in V has a unique expansion

v=∑i=1kaivi+∑j=1n−kbjuj.v=\sum_{i=1}^k a_i v_i+\sum_{j=1}^{n-k} b_j u_j.

Applying TT and using linearity plus T(vi)=0T(v_i)=0,

T(v)=∑j=1n−kbjT(uj).T(v)=\sum_{j=1}^{n-k} b_j T(u_j).

So {T(u1),…,T(un−k)}\{T(u_1),\dots,T(u_{n-k})\} spans im⁡T\operatorname{im}T.

Step 4 — the images are independent. Suppose

∑j=1n−kcjT(uj)=0.\sum_{j=1}^{n-k} c_j T(u_j)=0.

Then T(∑jcjuj)=0T\bigl(\sum_j c_j u_j\bigr)=0, so ∑jcjuj∈ker⁡T\sum_j c_j u_j\in\ker T. Because the viv_i span the kernel, there are scalars did_i with

∑jcjuj=∑idivi.\sum_j c_j u_j=\sum_i d_i v_i.

Rearrange: ∑jcjuj−∑idivi=0\sum_j c_j u_j-\sum_i d_i v_i=0. The set {vi}∪{uj}\{v_i\}\cup\{u_j\} is a basis of VV, hence linearly independent, so every cj=0c_j=0 (and every di=0d_i=0). Therefore the T(uj)T(u_j) are linearly independent.

Step 5 — count dimensions. Steps 3 and 4 show that {T(u1),…,T(un−k)}\{T(u_1),\dots,T(u_{n-k})\} is a basis of im⁡T\operatorname{im}T. Hence

rank⁡T=n−k=n−nullity⁡T,\operatorname{rank}T=n-k=n-\operatorname{nullity}T,

which is the theorem.

10. Proofs and proof intuition

The derivation above is a complete proof; this section records the two facts it uses and the quotient-space alternative.

Fact 1 (basis extension). If SS is a linearly independent subset of a finite-dimensional vector space VV, then SS can be extended to a basis of VV. Proof sketch. Repeatedly add a vector outside the current span until the span is all of VV; finite dimension guarantees termination.

Fact 2 (first isomorphism theorem). The map Tˉ:V/ker⁡T→im⁡T\bar T:V/\ker T\to\operatorname{im}T, Tˉ(v+ker⁡T)=T(v)\bar T(v+\ker T)=T(v), is a well-defined linear isomorphism. Well-defined: if v+ker⁡T=v′+ker⁡Tv+\ker T=v'+\ker T, then v−v′∈ker⁡Tv-v'\in\ker T, so T(v)=T(v′)T(v)=T(v'). Injective: Tˉ(v+ker⁡T)=0\bar T(v+\ker T)=0 implies v∈ker⁡Tv\in\ker T. Surjective: every element of im⁡T\operatorname{im}T is T(v)=Tˉ(v+ker⁡T)T(v)=\bar T(v+\ker T).

Quotient dimension formula. For a subspace U⊆VU\subseteq V, dim⁡(V/U)=dim⁡V−dim⁡U\dim(V/U)=\dim V-\dim U. Therefore

dim⁡V=dim⁡ker⁡T+dim⁡(V/ker⁡T)=dim⁡ker⁡T+dim⁡im⁡T.\dim V=\dim\ker T+\dim(V/\ker T)=\dim\ker T+\dim\operatorname{im}T.

Both proofs are exact and hold over any field.

11. Geometric interpretation

Think of TT as a projection followed by an isomorphism. The kernel is the subspace that is flattened to the origin. The image is the subspace that survives. Rank–nullity says the dimension of the domain is the dimension of the flattened part plus the dimension of the surviving part.

In R3\mathbb{R}^3, the map T(x,y,z)=(x,y,0)T(x,y,z)=(x,y,0) flattens the zz-axis to the origin and keeps the xyxy-plane. The kernel is the zz-axis (dimension 1), the image is the xyxy-plane (dimension 2), and 3=1+23=1+2. A rank-1 map such as T(x,y,z)=(x,0,0)T(x,y,z)=(x,0,0) flattens a whole plane (dimension 2) and keeps one line (dimension 1), and again 3=2+13=2+1. The theorem is dimension conservation under a linear map.

13. Numerical worked example

Example 1 (a rank-deficient matrix). Let

A=(123246).A=\begin{pmatrix}1&2&3\\2&4&6\end{pmatrix}.

The second row is twice the first, so rank⁡A=1\operatorname{rank}A=1. The domain has dimension n=3n=3, so the nullity must be 3−1=23-1=2. Solving Ax=0Ax=0 gives the single equation x1+2x2+3x3=0x_1+2x_2+3x_3=0, whose solution set is

x=s(−210)+t(−301).x=s\begin{pmatrix}-2\\1\\0\end{pmatrix}+t\begin{pmatrix}-3\\0\\1\end{pmatrix}.

The two vectors are independent, so the nullity is indeed 2. Check: 1+2=31+2=3.

Example 2 (a linear map on R3\mathbb{R}^3). T(x,y,z)=(x,y,0)T(x,y,z)=(x,y,0) has kernel {(0,0,z)}\{(0,0,z)\} and image {(x,y,0)}\{(x,y,0)\}, so nullity =1=1, rank =2=2, and 1+2=31+2=3.

Example 3 (full rank). T(x,y)=(x+y,x−y)T(x,y)=(x+y,x-y) on R2\mathbb{R}^2 has kernel {0}\{0\} (if x+y=0x+y=0 and x−y=0x-y=0, then x=y=0x=y=0) and image R2\mathbb{R}^2, so 2=0+22=0+2.

14. Real-world analogy

A hotel with nn rooms sends guests through a check-in process. Some guests are turned away at the door (the kernel); the rest are assigned rooms (the image). Rank–nullity says the number of rooms in the hotel equals the number turned away plus the number successfully housed, provided the assignment is linear and every successfully housed guest occupies a distinct room. The analogy breaks if the process is nonlinear, which is exactly why the theorem requires linearity.

15. Algorithm pseudocode

algorithm RankNullity(A, tol):
    # A is m x n
    compute a rank-revealing decomposition (SVD or QR with pivoting)
    r <- number of singular values greater than tol
    nullity <- n - r
    return (r, nullity)

algorithm NullspaceBasis(A, tol):
    U, S, V^T <- SVD(A)
    r <- count(S > tol)
    return the last n - r columns of V   # rows r..n-1 of V^T, transposed

Gaussian elimination gives the same information: rr is the number of pivots, n−rn-r is the number of free variables. The SVD version is numerically more reliable when the matrix is nearly rank-deficient.

16. Implementation from scratch

import numpy as np

def rank_nullity(A, tol=1e-9):
    """Return (rank, nullity) of an m x n matrix using its singular values."""
    A = np.asarray(A, dtype=float)
    if A.ndim != 2:
        raise ValueError("A must be two-dimensional")
    s = np.linalg.svd(A, compute_uv=False)
    rank = int(np.sum(s > tol))
    return rank, A.shape[1] - rank

def nullspace_basis(A, tol=1e-9):
    """Return an n x (n-rank) matrix whose columns span ker(A)."""
    A = np.asarray(A, dtype=float)
    _, s, vt = np.linalg.svd(A, full_matrices=True)
    rank = int(np.sum(s > tol))
    return vt[rank:].T

A = np.array([[1.0, 2.0, 3.0],
              [2.0, 4.0, 6.0]])
rank, nullity = rank_nullity(A)
assert (rank, nullity) == (1, 2)
N = nullspace_basis(A)
assert N.shape == (3, 2)
assert np.allclose(A @ N, 0.0, atol=1e-10)
print("rank", rank, "nullity", nullity)
print("kernel basis columns:\n", N)

The assertion AN=0A N=0 is the real test: it checks that the computed basis vectors actually lie in the kernel, not merely that the dimensions add up.

17. Professional library implementation

import numpy as np
from scipy.linalg import null_space

A = np.array([[1.0, 2.0, 3.0],
              [2.0, 4.0, 6.0]])
rank = np.linalg.matrix_rank(A)          # 1
N = null_space(A)                         # shape (3, 2)
print(rank, N.shape, np.linalg.norm(A @ N))

numpy.linalg.matrix_rank uses an SVD with a tolerance derived from the largest singular value; scipy.linalg.null_space does the same and returns an orthonormal basis. Both are preferable to counting nonzero rows after floating-point elimination, which can misclassify tiny pivots.

18. Code walkthrough

Scratch version. np.linalg.svd(A, compute_uv=False) returns the singular values in descending order. The number greater than tol is the numerical rank. The nullity is the number of columns minus that rank, which is exactly the theorem. nullspace_basis keeps the right singular vectors corresponding to the zero singular values; those vectors span the kernel.

Library version. matrix_rank and null_space hide the same SVD but choose a tolerance automatically. The library is convenient, but you should still verify AN≈0A N\approx 0 and check that NN has the predicted number of columns. A dimension check alone can pass while the basis is wrong.

20. Time complexity

Computing an SVD of an m×nm\times n matrix costs O(mnmin⁡(m,n))O(mn\min(m,n)) floating-point operations; for square n×nn\times n matrices this is O(n3)O(n^3). Gaussian elimination to row-echelon form costs O(mn2)O(mn^2) when m≥nm\ge n. The rank–nullity identity itself is O(1)O(1) once the rank is known; the cost is entirely in computing the rank reliably.

21. Space complexity

A dense SVD requires O(mn)O(mn) storage for the matrix plus O(min⁡(m,n)2)O(\min(m,n)^2) for the singular vectors if they are formed. Computing only singular values can use less. For very large sparse matrices, iterative methods (Lanczos, randomized SVD) approximate the leading singular values and avoid forming the full decomposition.

22. Experimental demonstration

Generate random m×nm\times n matrices with m<nm<n, compute the numerical rank, and verify that rank⁡+nullity⁡=n\operatorname{rank}+\operatorname{nullity}=n for every trial. Then construct a matrix with a known rank by multiplying an m×rm\times r matrix by an r×nr\times n matrix; check that the computed rank is rr when the factors are well conditioned. Finally, add noise of increasing scale and observe the numerical rank increase — this shows that rank is not a stable function of floating-point data.

24. Limitations

  • The theorem requires VV to be finite-dimensional. For infinite-dimensional spaces, cardinal arithmetic replaces subtraction and the simple identity can fail.
  • It is an identity about dimensions, not about specific bases; it does not tell you which vectors are in the kernel.
  • Numerical rank depends on a tolerance. A matrix that is mathematically rank 1 but has floating-point noise of size 10−1210^{-12} will be reported as higher rank if the tolerance is too small.
  • The theorem says nothing about the condition number. A full-rank matrix can still be nearly singular and numerically unstable to invert.

25. Failure scenarios

  1. Using the wrong dimension. Rank–nullity uses the number of columns (the domain dimension), not the number of rows. For a 2×32\times 3 matrix, rank + nullity = 3, not 2.
  2. Counting zero rows. A zero row after elimination indicates a dependency among rows, but the nullity is the number of free variables (non-pivot columns), not the number of zero rows in general.
  3. Ignoring tolerance. Treating every singular value below machine epsilon as nonzero overstates the rank and understates the nullity.
  4. Assuming rank = min(m,n). That is the maximum possible rank, not the actual rank.
  5. Confusing kernel with image. They live in different spaces (ker⁡T⊆V\ker T\subseteq V, im⁡T⊆W\operatorname{im}T\subseteq W) and generally have different dimensions.

26. Common misconceptions

  • “Rank–nullity says rank equals nullity.” No: it says their sum equals dim⁡V\dim V.
  • “Nullity is the number of zero eigenvalues.” For a square matrix, the nullity is the geometric multiplicity of the eigenvalue 0, which can be smaller than the algebraic multiplicity. It is not simply the count of zero eigenvalues.
  • “A square matrix with determinant zero has nullity 1.” It has nullity at least 1; a 3×33\times3 zero matrix has nullity 3.
  • “The theorem applies to any function.” It requires a linear map between vector spaces. For nonlinear maps, the dimensions of level sets and images need not add up.
  • “Rank is always obvious from the shape.” Shape gives only the upper bound min⁡(m,n)\min(m,n).

27. Alternative approaches

  • Gaussian elimination / RREF: gives rank and a nullspace basis directly, and is the standard hand-computation method. Less numerically stable than SVD for rank decisions.
  • QR with column pivoting: exposes rank and an orthonormal basis of the column space; cheaper than SVD for some problems.
  • SVD: most reliable for numerical rank and nullspace, at higher cost.
  • Randomized SVD: approximates the leading singular values for very large matrices.
  • The quotient-space proof: shortest conceptual proof, but requires quotient spaces.

29. Research applications

  • Low-rank approximation: if AA has rank r≪min⁡(m,n)r\ll\min(m,n), it can be stored and multiplied using O(r(m+n))O(r(m+n)) parameters instead of O(mn)O(mn). This is the basis of LoRA and many compression methods.
  • Control theory: controllability and observability are rank conditions on matrices built from AA and BB or CC.
  • Coding theory: the dimension of a linear code is the rank of its generator matrix; the nullity of the parity-check matrix gives the number of independent parity constraints.
  • Numerical linear algebra: rank-revealing factorizations decide when a matrix is effectively singular.
  • Representation theory: dimension counting for kernels and images underlies exact sequences.

30. Important research papers

This is textbook material rather than a research result, so no research paper is cited here. The theorem is proved in:

  • S. Axler, Linear Algebra Done Right, Springer. Chapter 3.
  • G. Strang, Introduction to Linear Algebra, Wellesley-Cambridge Press. Chapter 3.
  • K. Hoffman and R. Kunze, Linear Algebra, Prentice Hall. Chapter 3.

No citation is invented to make the page look more research-oriented.

31. Further reading

  • Axler, Linear Algebra Done Right — the basis-extension proof and the quotient-space proof.
  • Strang, Introduction to Linear Algebra — the matrix version with elimination and free variables.
  • Hoffman and Kunze, Linear Algebra — the coordinate-free treatment.
  • Any standard abstract algebra text for the first isomorphism theorem, of which rank–nullity is the vector-space case.

32. Practical exercises

  1. For A=(123246)A=\begin{pmatrix}1&2&3\\2&4&6\end{pmatrix}, compute the rank, a basis of the column space, and a basis of the nullspace by hand. Verify rank + nullity = 3.
  2. For B=(102013115)B=\begin{pmatrix}1&0&2\\0&1&3\\1&1&5\end{pmatrix}, show that the third row is the sum of the first two, find the nullity, and exhibit a nonzero kernel vector.
  3. Prove that a linear map T:V→WT:V\to W with dim⁡V=dim⁡W\dim V=\dim W is injective if and only if it is surjective.
  4. Give an example of a 3×33\times3 matrix with rank 2 and nullity 1, and another with rank 1 and nullity 2.
  5. Explain why a 4×64\times 6 matrix must have nullity at least 2.
  6. Implement rank_nullity and test it on the matrices above. Then add noise of size 10−610^{-6} and explain why the numerical rank may change.

Answer sketches.

  1. AA has rank⁡1\operatorname{rank}1: the second row is twice the first. A column-space basis is {(1,2)⊤}\{(1,2)^\top\}. The kernel is x1+2x2+3x3=0x_1+2x_2+3x_3=0, with basis (−2,1,0)⊤,(−3,0,1)⊤(-2,1,0)^\top,(-3,0,1)^\top. Then 1+2=31+2=3.
  2. BB has third row == first ++ second, so rank⁡B=2\operatorname{rank}B=2 and nullity =1=1. A kernel vector is (2,3,−1)⊤(2,3,-1)^\top: each row gives 2+0−2=02+0-2=0 or 0+3−3=00+3-3=0.
  3. If TT is injective then ker⁡T={0}\ker T=\{0\}, so nullity 00 and rank =dim⁡V=dim⁡W=\dim V=\dim W, hence TT is surjective. Conversely, if TT is surjective then rank =dim⁡W=dim⁡V=\dim W=\dim V, so nullity 00 and TT is injective.
  4. diag⁡(1,1,0)\operatorname{diag}(1,1,0) has rank 2, nullity 1. diag⁡(1,0,0)\operatorname{diag}(1,0,0) has rank 1, nullity 2.
  5. A 4×64\times6 matrix has rank at most 4, so nullity =6−rank⁡≥2=6-\operatorname{rank}\ge2.
  6. Adding 10−610^{-6} noise typically makes small singular values nonzero. With an absolute tolerance of 10−910^{-9} the numerical rank rises and the numerical nullity falls; the correct tolerance scales with σmax⁡\sigma_{\max} and the expected noise level.

33. Debugging challenges

  • Your code reports rank 2 for a matrix whose second row is exactly twice the first. Check whether you are counting singular values with a tolerance that is too small relative to the matrix scale.
  • Your nullspace matrix has the right shape but ANA N is not zero. Check whether you transposed the right singular vectors correctly; the nullspace is spanned by the last rows of V⊤V^\top, i.e. the last columns of VV.
  • Rank + nullity does not equal the number of columns. You are probably using the number of rows, or computing nullity as m - rank.
  • A square matrix has determinant zero but matrix_rank returns full rank. The matrix may be ill-conditioned rather than exactly singular; inspect the singular values before trusting the determinant.

34. Advanced exercises

  1. Prove the quotient-space version of rank–nullity without using the basis-extension theorem.
  2. Show that for A∈Fm×nA\in\mathbb{F}^{m\times n}, rank⁡A=rank⁡A⊤\operatorname{rank}A=\operatorname{rank}A^\top. Use the theorem to relate the nullity of AA and the left nullspace of AA.
  3. Derive the rank–nullity theorem for the adjoint map T∗:W∗→V∗T^\ast:W^\ast\to V^\ast and explain why the dimensions match.
  4. For a block matrix (AB0C)\begin{pmatrix}A&B\\0&C\end{pmatrix}, express the rank in terms of the ranks of AA and CC and the coupling BB. When is the rank exactly rank⁡A+rank⁡C\operatorname{rank}A+\operatorname{rank}C?
  5. Show that the set of rank-≤r\le r matrices is a variety defined by the vanishing of all (r+1)×(r+1)(r+1)\times(r+1) minors, and connect this to the dimension count.

35. Interview questions

  • State the rank–nullity theorem precisely, including the finite-dimensional hypothesis.
  • Prove it by extending a basis of the kernel.
  • Why does the theorem use the number of columns rather than the number of rows for a matrix?
  • What is the relationship between nullity and the number of free variables in Gaussian elimination?
  • Give a linear map with rank 2 and nullity 3. What are the domain and image dimensions?
  • Why is numerical rank tolerance-dependent, and how does the SVD help?
  • What happens to the theorem for infinite-dimensional spaces?

36. Research questions

  • How should rank be defined for matrices over rings rather than fields, and which dimension identities survive?
  • What is the stable rank, and why is it a better numerical proxy than exact rank for random matrices?
  • How do rank-revealing factorizations trade accuracy against cost for sparse matrices?
  • Can the dimension identity be generalized to linear operators on infinite-dimensional Hilbert spaces using Fredholm index theory? (The index is dim⁡ker⁡T−dim⁡coker⁡T\dim\ker T-\dim\operatorname{coker}T, not a simple sum.)

37. Mastery assessment

To demonstrate mastery: (1) state the theorem with its hypotheses; (2) reproduce the basis-extension proof without notes; (3) compute rank and nullity for two concrete matrices and exhibit a kernel basis; (4) explain why rank + nullity uses the number of columns; (5) identify one numerical pitfall. A repository and GPU experiment are not required for this foundational theorem; the evidence is a correct proof and correct hand computations.

39. Completion criteria

All of: theorem stated correctly; proof reproduced; at least three concrete examples computed by hand; code run and checked against the examples; one failure mode (tolerance or wrong dimension) explained. No assessment score is claimed until the linked assessment is actually taken.