maths2u
Tier
⌕ Search ⌘K
Theorem

The rank–nullity theorem

T-015Home MU-103Threads structure
Statement

Let \( F \) be a field, let \( V \) and \( W \) be vector spaces over \( F \), and let \( T : V \to W \) be a linear map. Suppose \( V \) is finite-dimensional, say \( \dim V = n \). Then the image \( \operatorname{im} T = \{ T(v) : v \in V \} \) and the kernel \( \ker T = \{ v \in V : T(v) = 0 \} \) are subspaces (of \( W \) and \( V \) respectively), both are finite-dimensional, and \[ \operatorname{rank} T + \operatorname{null} T = \dim V, \] where \( \operatorname{rank} T := \dim \operatorname{im} T \) and \( \operatorname{null} T := \dim \ker T \). No hypothesis is needed on \( W \): it may be infinite-dimensional, and the field \( F \) is arbitrary.

Why it matters

The rank–nullity theorem is the fundamental conservation law of linear algebra: a linear map cannot simultaneously collapse a large subspace to zero and have a large image. Every dimension of the domain is accounted for — it is either "killed" (contributes to the kernel) or "survives" (contributes to the image). This single identity governs the solvability of linear systems: for an \( m \times n \) matrix \( A \), the solution space of \( Ax = 0 \) has dimension exactly \( n - \operatorname{rank} A \), which is why the number of free parameters in Gaussian elimination is forced, not accidental.

It is also the prototype of a far-reaching pattern. It is the dimension-counting shadow of the first isomorphism theorem \( V / \ker T \cong \operatorname{im} T \), and its descendants include the additivity of dimension along exact sequences, the Euler characteristic of a chain complex, and the index of a Fredholm operator. Learning to argue "count what dies, count what survives, and the totals must match" is one of the most transferable habits in pure mathematics.

Hypotheses
Hypothesis.\( T \) is linear. Drop this and both sides lose meaning: for \( f : \mathbb{R} \to \mathbb{R} \), \( f(x) = x^2 \), the preimage of \( 0 \) is \( \{0\} \) but the image \( [0,\infty) \) is not a subspace, so "rank" and "nullity" are undefined. Linearity is what makes kernel and image subspaces at all.
Hypothesis.\( V \) is finite-dimensional. Drop this and the identity becomes vacuous or false-in-spirit: the left-shift \( L : (a_1, a_2, a_3, \dots) \mapsto (a_2, a_3, \dots) \) on the space of all real sequences is surjective with one-dimensional kernel — "\( \infty = \infty + 1 \)" carries no information, and the useful corollary (injective \( \iff \) surjective for maps of a space to itself) genuinely fails: \( L \) is surjective but not injective.
Hypothesis.\( V \) and \( W \) are over the same field \( F \). Rank and nullity are dimensions over \( F \); if one views \( \mathbb{C} \) as a real vector space, the map \( z \mapsto \bar{z} \) is \( \mathbb{R} \)-linear (rank 2, nullity 0 over \( \mathbb{R} \), domain dimension 2 — fine) but not \( \mathbb{C} \)-linear, and mixing the two scalar fields in one count produces nonsense such as "rank 1 + nullity 0 = 2". Always fix the field before counting.
Proof

Write \( n = \dim V \), \( k = \operatorname{null} T \), and let the strategy be: build a basis of \( V \) adapted to \( \ker T \), and show its "non-kernel part" maps to a basis of \( \operatorname{im} T \).

1
\( \ker T \) is a subspace of \( V \); choose a basis \( u_1, \dots, u_k \) of \( \ker T \), where \( k = \operatorname{null} T \le n \).
Kernel of a linear map is a subspace (closed under addition and scalar multiplication since \( T(av + bw) = aT(v) + bT(w) = 0 \)); every subspace of a finite-dimensional space is finite-dimensional and has a basis, with dimension at most \( \dim V \). If \( k = 0 \) take the empty basis. A
2
Extend to a basis \( \mathcal{B} = \{ u_1, \dots, u_k, v_1, \dots, v_r \} \) of \( V \), so that \( k + r = n \).
Basis-extension lemma (a consequence of the Steinitz exchange lemma): any linearly independent subset of a finite-dimensional space extends to a basis. The count \( k + r = n \) holds because all bases of \( V \) have exactly \( n \) elements (invariance of dimension, again by Steinitz exchange). A
3
Claim: \( \{ T(v_1), \dots, T(v_r) \} \) spans \( \operatorname{im} T \). Indeed if \( w \in \operatorname{im} T \), write \( w = T(v) \) and expand \( v = \sum_{i=1}^{k} a_i u_i + \sum_{j=1}^{r} b_j v_j \); then \[ w = T(v) = \sum_{i=1}^{k} a_i \, T(u_i) + \sum_{j=1}^{r} b_j \, T(v_j) = \sum_{j=1}^{r} b_j \, T(v_j), \] since \( T(u_i) = 0 \) for every \( i \).
Expansion exists because \( \mathcal{B} \) spans \( V \); the middle equality is linearity of \( T \) applied to a finite sum; the last equality uses \( u_i \in \ker T \). This is the first half of the key idea: kernel directions contribute nothing to the image. B
4
Claim: \( T(v_1), \dots, T(v_r) \) are linearly independent in \( W \). Suppose \( \sum_{j=1}^{r} c_j \, T(v_j) = 0 \) with \( c_j \in F \). By linearity, \[ T\left( \sum_{j=1}^{r} c_j v_j \right) = 0, \qquad \text{so} \qquad \sum_{j=1}^{r} c_j v_j \in \ker T. \]
Linearity of \( T \) pulls the sum inside; membership in the kernel is exactly the statement that \( T \) of the vector is zero. This is the second half of the key idea: a relation among the images forces the combination back into the kernel. B
5
Since \( u_1, \dots, u_k \) is a basis of \( \ker T \), there exist \( d_1, \dots, d_k \in F \) with \[ \sum_{j=1}^{r} c_j v_j = \sum_{i=1}^{k} d_i u_i, \qquad \text{hence} \qquad \sum_{i=1}^{k} d_i u_i \; - \; \sum_{j=1}^{r} c_j v_j = 0. \] Because \( \mathcal{B} = \{u_1, \dots, u_k, v_1, \dots, v_r\} \) is linearly independent, every coefficient vanishes: \( d_1 = \dots = d_k = 0 \) and \( c_1 = \dots = c_r = 0 \).
The expansion uses that \( \{u_i\} \) spans \( \ker T \); the conclusion is the definition of linear independence of \( \mathcal{B} \), applied to a single relation in which the \( u_i \) and \( v_j \) appear together. This step is where extending a basis of the kernel (rather than picking any basis of \( V \)) earns its keep: the relation mixes both blocks and independence of the full list kills it. In the degenerate cases \( k = 0 \) or \( r = 0 \) the empty sums cause no difficulty. C
6
Therefore \( \{ T(v_1), \dots, T(v_r) \} \) is a basis of \( \operatorname{im} T \), so \( \operatorname{im} T \) is finite-dimensional with \[ \operatorname{rank} T = r = n - k = \dim V - \operatorname{null} T. \]
A spanning, linearly independent set is a basis by definition; the independent list \( T(v_1), \dots, T(v_r) \) has exactly \( r \) distinct members (repeats would violate independence). Rearranging gives \( \operatorname{rank} T + \operatorname{null} T = \dim V \). \( \blacksquare \) A
Result
\[ \operatorname{rank} T + \operatorname{null} T = \dim V \qquad \text{for every linear } T : V \to W, \ \dim V \lt \infty. \]

Reading. A linear map splits the dimension of its domain into two exact parts: the dimensions that get crushed to zero (nullity) and the dimensions that survive into the image (rank). Nothing is lost and nothing is created — the books always balance.

Scope. Applies to any linear map out of a finite-dimensional vector space over any field, with an arbitrary (possibly infinite-dimensional) codomain over the same field. For an \( m \times n \) matrix \( A \) over \( F \) it reads \( \operatorname{rank} A + \dim \{ x : Ax = 0 \} = n \) (the number of columns). It fails, as an informative statement, for infinite-dimensional domains.

Corollaries & converses
  • Injectivity–surjectivity dichotomy. If \( \dim V = \dim W \lt \infty \) and \( T : V \to W \) is linear, then \( T \) injective \( \iff \) \( T \) surjective \( \iff \) \( T \) bijective. (Injective means \( \operatorname{null} T = 0 \), so \( \operatorname{rank} T = \dim W \), so surjective; and conversely.)
  • Rank bound. \( \operatorname{rank} T \le \min(\dim V, \dim W) \): the theorem gives \( \operatorname{rank} T \le \dim V \), and \( \operatorname{im} T \subseteq W \) gives the other bound.
  • Solution spaces. For \( A \in F^{m \times n} \), the solution set of \( Ax = 0 \) has dimension \( n - \operatorname{rank} A \); a consistent system \( Ax = b \) has solution set an affine translate of it, of the same dimension.
  • No injections downward, no surjections upward. If \( \dim V \gt \dim W \) no linear \( T : V \to W \) is injective; if \( \dim V \lt \dim W \) none is surjective.
  • Converse (realisability). The numerical converse holds: for any \( r, k \ge 0 \) with \( r + k = n \) and any \( W \) with \( \dim W \ge r \), there is a linear \( T : V \to W \) with rank \( r \) and nullity \( k \) (send \( r \) basis vectors to independent targets and the rest to \( 0 \)). But the dichotomy corollary has no infinite-dimensional analogue: the left shift on sequence space is surjective, not injective; the right shift is injective, not surjective.
Fails without
  • Without finite-dimensionality of \( V \): let \( D : \mathbb{R}[x] \to \mathbb{R}[x] \) be differentiation, \( D(p) = p' \). Then \( D \) is surjective (every polynomial has a polynomial antiderivative) and \( \ker D \) is the one-dimensional space of constants. Any attempted identity "\( \operatorname{rank} + \operatorname{null} = \dim \)" degenerates to \( \infty + 1 = \infty \); worse, the corollary "injective \( \iff \) surjective on a space mapped to itself" is outright false here.
  • Without finite-dimensionality, second failure mode: the right shift \( R : (a_1, a_2, \dots) \mapsto (0, a_1, a_2, \dots) \) on the sequence space \( \mathbb{R}^{\mathbb{N}} \) is injective (\( \operatorname{null} R = 0 \)) but not surjective — its image has, informally, "codimension 1". In finite dimensions nullity \( 0 \) forces the image to have the full dimension of the domain; infinite dimension breaks that rigidity.
  • Without linearity: \( f : \mathbb{R}^2 \to \mathbb{R}^2 \), \( f(x,y) = (x^2 - y^2, \, 2xy) \) (the squaring map of \( \mathbb{C} \)). The zero set of \( f \) is \( \{(0,0)\} \) and \( f \) is surjective, yet \( f \) is 2-to-1 away from the origin: "trivial kernel" does not imply injectivity, and no dimension count of the sort survives. Kernel–image bookkeeping is a strictly linear phenomenon.
Common errors
  • Using \( \dim W \) instead of \( \dim V \). The theorem counts the domain: for a \( 3 \times 5 \) matrix, rank + nullity \( = 5 \) (columns), not \( 3 \). The codomain's dimension only supplies the bound \( \operatorname{rank} \le \dim W \).
  • Believing \( V = \ker T \oplus \operatorname{im} T \) when \( T : V \to V \). The dimensions add up, but the subspaces need not be complementary: for \( T = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} \) on \( F^2 \), \( \ker T = \operatorname{im} T = \operatorname{span}(e_1) \). The proof produces a complement of \( \ker T \) inside \( V \), and that complement merely maps isomorphically onto \( \operatorname{im} T \) — the image itself lives wherever it likes.
  • Concluding injectivity from "kernel is small" for nonlinear maps. \( \ker \) detects injectivity only for linear (more generally, group-homomorphic) maps.
  • Applying the injective \( \iff \) surjective corollary when \( \dim V \ne \dim W \), or in infinite dimensions. Both hypotheses are essential (shift operators, differentiation).
  • Row rank vs. column confusion. Students who compute rank by row reduction sometimes then write rank + nullity \( = m \) for an \( m \times n \) matrix. Row rank equals column rank, but the nullity count is against the number of variables, \( n \).
Discussion

The cleanest modern way to see the theorem is through the first isomorphism theorem: any linear \( T : V \to W \) induces an isomorphism \( \bar{T} : V / \ker T \to \operatorname{im} T \), \( \bar{T}(v + \ker T) = T(v) \). Granting the quotient-dimension formula \( \dim (V/U) = \dim V - \dim U \) for subspaces \( U \) of a finite-dimensional \( V \), rank–nullity drops out immediately. The hands-on basis-extension proof given above is essentially a proof of that quotient formula in disguise: the vectors \( v_1, \dots, v_r \) project to a basis of \( V / \ker T \). Both proofs are worth internalising — the first generalises to modules and groups, the second is the one you actually compute with.

Historically the result descends from James Joseph Sylvester's work on matrices in the 1880s; his 1884 "law of nullity" states that for square matrices \( \operatorname{null}(AB) \le \operatorname{null} A + \operatorname{null} B \), and the modern rank inequalities of Sylvester and Frobenius are all rank–nullity in various costumes (see Problem 5). The abstract vector-space formulation is a child of the 20th century, crystallising with the axiomatisation of linear algebra by Peano, Weyl, and ultimately the textbook tradition following van der Waerden and Halmos.

The theorem is best remembered as an exactness statement: the sequence \( 0 \to \ker T \to V \to \operatorname{im} T \to 0 \) is a short exact sequence of vector spaces, and dimension is additive on short exact sequences. That single sentence is the germ of homological algebra. For a chain complex, iterating rank–nullity over all the maps shows that the alternating sum of the dimensions of the chain spaces equals the alternating sum of the dimensions of the homology spaces — the invariance of the Euler characteristic. What began as bookkeeping for one linear map becomes the reason a polyhedron's \( V - E + F \) does not depend on the triangulation.

In infinite dimensions the correct heir is not the naive identity but the theory of Fredholm operators: a bounded operator \( T \) between Banach spaces is Fredholm when \( \ker T \) and \( \operatorname{coker} T = W / \operatorname{im} T \) are both finite-dimensional, and its index \( \operatorname{ind} T = \dim \ker T - \dim \operatorname{coker} T \) is the surviving finite quantity. Rank–nullity is precisely the statement that for \( T : V \to W \) with \( \dim V, \dim W \lt \infty \), \( \operatorname{ind} T = \dim V - \dim W \) — the index depends only on the spaces, not on the map. That rigidity (invariance of the index under perturbation) persists for Fredholm operators and culminates in the Atiyah–Singer index theorem, which computes analytic indices by topology. The left and right shifts, which broke the naive theorem above, are Fredholm of index \( +1 \) and \( -1 \): the failure was not lawless, it was measuring something.

Common misconceptions. The theorem does not say the kernel and image are complementary subspaces (they generally are not, and for \( T: V \to W \) with \( V \neq W \) they do not even inhabit the same space); it does not constrain \( \dim W \) at all beyond \( \operatorname{rank} T \le \dim W \); and "nullity" is the dimension of the kernel, not the number of zero rows in an echelon form of a matrix (though for an \( m \times n \) matrix the two are related: zero rows count \( m - \operatorname{rank} \), nullity is \( n - \operatorname{rank} \)).

Worked examples

Example 1 (differentiation on polynomials of bounded degree). Let \( P_3 = \{ p \in \mathbb{R}[x] : \deg p \le 3 \} \), a vector space with basis \( 1, x, x^2, x^3 \), so \( \dim P_3 = 4 \). Let \( D : P_3 \to P_3 \) be \( D(p) = p' \). Find the rank and nullity of \( D \) and a basis of \( \operatorname{im} D \).

1
\( \ker D = \{ p \in P_3 : p' = 0 \} = \{ \text{constant polynomials} \} = \operatorname{span}(1) \), so \( \operatorname{null} D = 1 \).
A polynomial with identically zero derivative over \( \mathbb{R} \) is constant (compare coefficients: if \( p = a_0 + a_1 x + a_2 x^2 + a_3 x^3 \) then \( p' = a_1 + 2a_2 x + 3a_3 x^2 = 0 \) forces \( a_1 = a_2 = a_3 = 0 \)). A
2
By rank–nullity, \( \operatorname{rank} D = \dim P_3 - \operatorname{null} D = 4 - 1 = 3 \).
Direct application of the theorem with \( \dim V = 4 \), \( k = 1 \). B
3
Since \( \operatorname{im} D \subseteq P_2 = \operatorname{span}(1, x, x^2) \) and \( \dim P_2 = 3 = \operatorname{rank} D \), we conclude \( \operatorname{im} D = P_2 \), with basis \( \{1, x, x^2\} \).
Differentiating drops degree, so the image sits inside \( P_2 \); a subspace of dimension equal to that of the ambient space is the whole space. Note the economy: no need to exhibit antiderivatives — the dimension count does the surjectivity argument for us. B
\[ \operatorname{null} D = 1, \qquad \operatorname{rank} D = 3, \qquad \operatorname{im} D = P_2 . \]

Reading. Differentiation on cubics kills exactly the constants and reaches exactly the quadratics; rank–nullity converts one easy computation (the kernel) into a surjectivity theorem for free.

Scope. The same argument gives \( \operatorname{im} D = P_{n-1} \) on \( P_n \) for every \( n \ge 1 \).

Example 2 (kernel of an explicit matrix map). Let \( T : \mathbb{R}^4 \to \mathbb{R}^3 \) be given by the matrix \[ A = \begin{pmatrix} 1 & 2 & 0 & 1 \\ 2 & 4 & 1 & 3 \\ 1 & 2 & 1 & 2 \end{pmatrix}. \] Find \( \operatorname{rank} T \), \( \operatorname{null} T \), and a basis of \( \ker T \).

1
Row reduce: \( R_2 \mapsto R_2 - 2R_1 \), \( R_3 \mapsto R_3 - R_1 \) give \[ \begin{pmatrix} 1 & 2 & 0 & 1 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 \end{pmatrix}, \] then \( R_3 \mapsto R_3 - R_2 \) gives the echelon form \[ \begin{pmatrix} 1 & 2 & 0 & 1 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 \end{pmatrix}. \]
Elementary row operations preserve the row space and the solution set of \( Ax = 0 \); the echelon form has pivots in columns 1 and 3. A
2
Two pivots, so \( \operatorname{rank} T = 2 \). By rank–nullity, \( \operatorname{null} T = 4 - 2 = 2 \).
Rank equals the number of pivots (dimension of the column space); the theorem is applied with \( \dim V = 4 \) — the number of columns, since the domain is \( \mathbb{R}^4 \). B
3
Free variables \( x_2 = s \), \( x_4 = t \). Back-substitution: \( x_3 = -t \), \( x_1 = -2s - t \), so \[ \ker T = \left\{ s \begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \end{pmatrix} + t \begin{pmatrix} -1 \\ 0 \\ -1 \\ 1 \end{pmatrix} : s, t \in \mathbb{R} \right\}. \]
Solving the echelon system; the two displayed vectors are linearly independent (look at coordinates 2 and 4), and rank–nullity certifies that two independent kernel vectors are all of \( \ker T \) — no solutions have been missed. B
\[ \operatorname{rank} T = 2, \quad \operatorname{null} T = 2, \quad \ker T = \operatorname{span}\left( (-2,1,0,0)^{\mathsf{T}}, \; (-1,0,-1,1)^{\mathsf{T}} \right). \]

Reading. The theorem is used here as a completeness check: once the nullity is known to be \( 4 - 2 = 2 \), finding two independent solutions of \( Ax = 0 \) proves we have a basis of the whole kernel.

Scope. This is the standard workflow for any homogeneous system over any field: pivots give rank, rank–nullity gives the number of basis solutions to look for.

Problems
  1. Let \( T : \mathbb{R}^3 \to \mathbb{R}^2 \), \( T(x, y, z) = (x + y, \; y + z) \). Compute \( \operatorname{rank} T \) and \( \operatorname{null} T \), and decide whether \( T \) is surjective.
    Solution The matrix of \( T \) is \( \begin{pmatrix} 1 & 1 & 0 \\ 0 & 1 & 1 \end{pmatrix} \), already in echelon form with pivots in columns 1 and 2, so \( \operatorname{rank} T = 2 \). By rank–nullity, \( \operatorname{null} T = 3 - 2 = 1 \); explicitly \( \ker T = \operatorname{span}(1, -1, 1) \), since \( x + y = 0 \) and \( y + z = 0 \) give \( x = -y = z \). Since \( \operatorname{rank} T = 2 = \dim \mathbb{R}^2 \), the image is all of \( \mathbb{R}^2 \): \( T \) is surjective. It is not injective, as the nonzero kernel shows.
  2. Let \( \operatorname{tr} : M_n(F) \to F \) be the trace, \( \operatorname{tr}(A) = \sum_{i=1}^{n} a_{ii} \), on the space of \( n \times n \) matrices over a field \( F \). Show \( \operatorname{tr} \) is linear and compute the dimension of the space of trace-zero matrices.
    Solution Linearity: \( \operatorname{tr}(\lambda A + \mu B) = \sum_i (\lambda a_{ii} + \mu b_{ii}) = \lambda \operatorname{tr} A + \mu \operatorname{tr} B \). The trace is not the zero map (e.g. \( \operatorname{tr}(E_{11}) = 1 \), where \( E_{11} \) is the matrix unit), so its image is a nonzero subspace of the one-dimensional space \( F \), hence \( \operatorname{rank}(\operatorname{tr}) = 1 \). Since \( \dim M_n(F) = n^2 \), rank–nullity gives \[ \dim \{ A : \operatorname{tr} A = 0 \} = \operatorname{null}(\operatorname{tr}) = n^2 - 1. \] (For \( F = \mathbb{R} \) or \( \mathbb{C} \) this space is the Lie algebra \( \mathfrak{sl}_n \).)
  3. Let \( V \) be finite-dimensional and \( T : V \to V \) linear. Prove that \( T \) is injective if and only if \( T \) is surjective. Then give an explicit example showing both implications fail when \( V \) is infinite-dimensional.
    Solution Injective \( \Rightarrow \) surjective: injectivity of a linear map means \( \ker T = \{0\} \) (if \( T(v) = T(w) \) then \( T(v - w) = 0 \)), so \( \operatorname{null} T = 0 \) and rank–nullity gives \( \operatorname{rank} T = \dim V \). Thus \( \operatorname{im} T \) is a subspace of \( V \) of full dimension, hence \( \operatorname{im} T = V \) (a proper subspace of a finite-dimensional space has strictly smaller dimension, since a basis of the subspace could otherwise be a basis of the whole space). Surjective \( \Rightarrow \) injective: \( \operatorname{rank} T = \dim V \) forces \( \operatorname{null} T = 0 \), and a linear map with zero kernel is injective. Infinite-dimensional failure: on \( V = \mathbb{R}[x] \), the map \( p \mapsto x\,p \) is injective but not surjective (nothing maps to \( 1 \)), while differentiation \( p \mapsto p' \) is surjective but not injective (constants die).
  4. Let \( V \) be finite-dimensional and \( T : V \to V \) linear with \( T^2 = 0 \). Prove that \( \operatorname{rank} T \le \frac{1}{2} \dim V \). Deduce that there is no linear map \( T : \mathbb{R}^5 \to \mathbb{R}^5 \) with \( \operatorname{im} T = \ker T \), but exhibit one on \( \mathbb{R}^4 \).
    Solution \( T^2 = 0 \) means \( T(T(v)) = 0 \) for all \( v \), i.e. \( \operatorname{im} T \subseteq \ker T \). Taking dimensions, \( \operatorname{rank} T \le \operatorname{null} T \). Rank–nullity gives \( \operatorname{null} T = \dim V - \operatorname{rank} T \), so \( \operatorname{rank} T \le \dim V - \operatorname{rank} T \), i.e. \( 2 \operatorname{rank} T \le \dim V \), as required. If \( \operatorname{im} T = \ker T \) then \( \operatorname{rank} T = \operatorname{null} T \), so rank–nullity reads \( 2 \operatorname{rank} T = \dim V \): the dimension must be even, ruling out \( \mathbb{R}^5 \). On \( \mathbb{R}^4 \) take \( T(e_1) = T(e_2) = 0 \), \( T(e_3) = e_1 \), \( T(e_4) = e_2 \); then \( \ker T = \operatorname{span}(e_1, e_2) \) (the matrix has two pivot columns, so nullity \( = 4 - 2 = 2 \), and \( e_1, e_2 \) are visibly in the kernel) and \( \operatorname{im} T = \operatorname{span}(e_1, e_2) \) as well, so \( \operatorname{im} T = \ker T \).
  5. (Sylvester's rank inequality.) Let \( U, V, W \) be finite-dimensional, and let \( T : U \to V \) and \( S : V \to W \) be linear. Prove \[ \operatorname{rank}(S T) \ \ge \ \operatorname{rank} S + \operatorname{rank} T - \dim V. \]
    Solution Let \( S' : \operatorname{im} T \to W \) be the restriction of \( S \) to the subspace \( \operatorname{im} T \subseteq V \); it is linear, its domain has dimension \( \operatorname{rank} T \), and its image is \( S(\operatorname{im} T) = \operatorname{im}(ST) \). Its kernel is \( \ker S' = \ker S \cap \operatorname{im} T \). Applying rank–nullity to \( S' \): \[ \operatorname{rank} T = \dim \operatorname{im}(ST) + \dim ( \ker S \cap \operatorname{im} T ) = \operatorname{rank}(ST) + \dim( \ker S \cap \operatorname{im} T ). \] Now \( \ker S \cap \operatorname{im} T \subseteq \ker S \), so \( \dim(\ker S \cap \operatorname{im} T) \le \operatorname{null} S \), and rank–nullity applied to \( S \) itself gives \( \operatorname{null} S = \dim V - \operatorname{rank} S \). Combining, \[ \operatorname{rank}(ST) = \operatorname{rank} T - \dim(\ker S \cap \operatorname{im} T) \ \ge \ \operatorname{rank} T - ( \dim V - \operatorname{rank} S ) = \operatorname{rank} S + \operatorname{rank} T - \dim V, \] which is the claim. (Equality holds exactly when \( \ker S \subseteq \operatorname{im} T \).) Note the theorem was used twice: once for the restricted map \( S' \), once for \( S \).