LINEAR ALGEBRA · LINEAR MAPS · INTERMEDIATE

Rank–Nullity Theorem

A linear map can collapse some directions to zero and carry the others into its image. The Rank–Nullity Theorem says these two dimension counts account for every direction in the domain.

THEOREM STATEMENT

Domain dimension = nullity + rank

Let V be a finite-dimensional vector space over a field F, let W be a vector space over the same field, and let T: V → W be linear. The dimension of V is the sum of the dimension of the kernel and the dimension of the image of T.

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

The dimension of the image is the rank of T; the dimension of the kernel is the nullity of T. For an m-by-n matrix A representing T, this becomes:

n=rank⁡(A)+nullity⁡(A)n=\operatorname{rank}(A)+\operatorname{nullity}(A)
The domain dimension splits into nullity and rankA vector space V has a kernel part of dimension k that maps to zero, and a complementary part of dimension r that maps onto the image. Therefore dim V equals k plus r.Domain V · dimension nCodomain Wker(T)dimension kcomplementdimension rim(T)dimension rkernel directions are sent to 0T maps the remaining basis to a basis of im(T)n = nullity(T) + rank(T) = k + r
The kernel accounts for the directions lost by the map; the image accounts for the independent directions that remain. Together they account for the entire domain dimension.

Kernel, image, rank, and nullity

The kernel of T is the set of inputs mapped to the zero vector in W. It measures which domain directions disappear under the transformation:

ker⁡(T)={v∈V:T(v)=0}\ker(T)=\{v\in V:T(v)=0\}

The image is the set of all outputs the map can produce. For a linear map it is a subspace of W:

im⁡(T)={T(v):v∈V}\operatorname{im}(T)=\{T(v):v\in V\}

Rank counts independent output directions, not the total number of possible outputs. Nullity counts independent input directions that map to zero. Both are dimensions, so they are nonnegative integers. The theorem says rank and nullity partition the dimension of the input space V. It does not say that their sum equals dim W unless the dimensions happen to agree for other reasons.

For a matrix with n columns, each column represents the image of one standard basis vector. The rank is the number of pivot columns, while the nullity is the number of free variables in the homogeneous system Ax = 0. The theorem predicts that those counts add to n.

Proof using a basis of the kernel

The proof turns the definition of the kernel into a basis argument. Suppose dim V = n and the kernel has a basis containing k vectors. Extend that kernel basis to a basis of all of V by adding r vectors:

{u1,…,uk,v1,…,vr}is a basis of V\{u_1,\ldots,u_k,v_1,\ldots,v_r\}\quad\text{is a basis of }V
  1. 1
    Count the basis vectors in V.

    The extended list is a basis of V, so it has exactly n vectors. There are k kernel vectors and r additional vectors.

    n=k+rn=k+r
  2. 2
    Show that the added vectors span the image.

    Every vector x in V can be written as a combination of the chosen basis vectors. Applying T sends each uᵢ to zero because those vectors lie in ker(T). Therefore T(x) is a linear combination of T(v₁), …, T(vᵣ). These outputs span im(T).

  3. 3
    Show that the output vectors are independent.

    Suppose a linear combination of T(vⱼ) is zero. By linearity, T of the matching combination of vⱼ is zero, so that combination lies in ker(T). It can therefore be written using u₁, …, uₖ. The original extended list is a basis and hence independent, so every coefficient on the vⱼ must be zero.

  4. 4
    Identify the rank.

    The r vectors T(v₁), …, T(vᵣ) are both spanning and independent, so they form a basis of im(T). Thus rank(T) = r, while nullity(T) = k.

    dim⁡V=n=k+r=dim⁡ker⁡(T)+dim⁡im⁡(T)\dim V=n=k+r=\dim\ker(T)+\dim\operatorname{im}(T)

Every finite-dimensional vector space has a finite basis, and an independent set can be extended to a basis. Those standard basis facts are the only structural ingredients. Notice that the proof works even when W is infinite-dimensional: only the domain V must be finite-dimensional.

Worked example: find rank and nullity from a matrix

Consider the linear map T: ℝ³ → ℝ² represented by:

A=[120011]A=\begin{bmatrix}1&2&0\\0&1&1\end{bmatrix}

Row reduction gives pivots in the first and second columns, so rank(A) = 2. To find the kernel, solve Ax = 0 for x = (x, y, z):

x+2y=0,y+z=0x+2y=0,\qquad y+z=0

Let y = t. Then x = −2t and z = −t, so every kernel vector is a multiple of (−2, 1, −1). The kernel has one basis vector and nullity(A) = 1. The theorem checks the result:

3⏟dim⁡R3=2⏟rank⁡(A)+1⏟nullity⁡(A)\underbrace{3}_{\dim\mathbb{R}^3}=\underbrace{2}_{\operatorname{rank}(A)}+\underbrace{1}_{\operatorname{nullity}(A)}

This also illustrates the pivot/free-variable version: there are two pivot variables and one free variable among the three input coordinates. The free parameter describes the one-dimensional kernel.

Example: a map with no information loss

If T: ℝ² → ℝ³ is represented by a matrix whose two columns are independent, then rank(T) = 2. Since the domain dimension is 2, nullity(T) = 0. The kernel contains only the zero vector, so T is injective.

dim⁡ker⁡(T)=0⟺T is injective\dim\ker(T)=0\quad\Longleftrightarrow\quad T\text{ is injective}

Example: a map that reaches all of its codomain

For a linear map T: ℝ³ → ℝ² with rank 2, the image has dimension 2, which equals the codomain dimension. Therefore the image is all of ℝ² and T is surjective. Rank–Nullity then forces nullity 1.

For finite-dimensional spaces, this gives practical tests: injectivity means nullity zero; surjectivity onto W means rank equals dim W. If dim V = dim W, either condition implies the other.

Applications and useful consequences

Count free variables

For Ax = 0 with n unknowns, the number of independent free parameters is n − rank(A).

Test injectivity

A finite-dimensional linear map is one-to-one exactly when its kernel is {0}, or equivalently when its nullity is zero.

Test surjectivity

A map onto W has rank dim W. The image must contain enough independent vectors to span the codomain.

Compare dimensions

If dim V exceeds dim W, no linear map V → W can be injective: rank is at most dim W, leaving positive nullity.

For an m-by-n matrix, rank is at most min(m,n). The theorem therefore implies nullity is at least n − m when n > m. A homogeneous system with more unknowns than equations must have a nonzero solution. This statement concerns linear equations; it does not guarantee a nonzero solution to a nonhomogeneous system Ax = b.

Another consequence is the dimension formula for a linear map restricted to a subspace U: apply the theorem to T|U. It gives dim U = dim(U ∩ ker T) + dim T(U). This is useful when studying intersections, projections, and constrained transformations.

Assumptions and common mistakes

  • Finite-dimensional domain: the standard finite integer equation assumes V has finite dimension. Infinite-dimensional versions require more careful treatment of cardinal dimensions.
  • Linearity: T must preserve addition and scalar multiplication. The identity does not generally hold for arbitrary nonlinear functions.
  • Use the domain dimension: the left side is dim V, not automatically dim W. In matrix language, use the number of columns.
  • Rank is image dimension: it is the number of pivots after row reduction, not the number of nonzero entries or nonzero rows before reduction.
  • Nullity is kernel dimension: it is the number of free variables in Ax = 0 after reduction, not the number of zero rows.
  • Rank need not equal codomain dimension: that equality holds only when the map is onto.

Rank–Nullity Theorem FAQs

What is the Rank–Nullity Theorem formula?

For a linear map T from finite-dimensional V, dim(V) = dim(ker T) + dim(im T). Equivalently, domain dimension equals nullity plus rank.

What do rank and nullity mean?

Rank is the dimension of the image, the set of outputs T can produce. Nullity is the dimension of the kernel, the inputs sent to zero.

How do I use rank–nullity for a matrix?

If A has n columns, compute its rank by row reduction, then use nullity(A) = n − rank(A). The number of columns is the dimension of the domain.

When is a linear map injective?

For a finite-dimensional domain, T is injective exactly when ker(T) contains only zero, which is equivalent to nullity(T) = 0 and rank(T) = dim(V).

Does the codomain need to be finite-dimensional?

No. The theorem needs a finite-dimensional domain. The image is a subspace of the codomain and has dimension at most dim(V), even if the codomain is infinite-dimensional.

Does rank–nullity apply to nonhomogeneous systems?

The theorem describes the linear map and its homogeneous kernel. It helps determine whether Ax = b is solvable, but it does not say every right-hand side b has a solution.