01.01.05 · foundations / linear-algebra

Linear transformation: kernel, image, rank-nullity

shipped3 tiersLean: partial

Anchor (Master): Apostol Calculus Vol. 2 Ch. 2; Axler — Linear Algebra Done Right Ch. 3; Mac Lane–Birkhoff Algebra Ch. V

Intuition [Beginner]

A linear transformation is a function between vector spaces that respects the two operations the spaces care about: adding two arrows and stretching one. Pick two arrows, add them, then apply the function — the result is the same as applying the function to each arrow first and adding afterwards. Stretch an arrow, apply the function — the result is the same as applying the function and then stretching by the same factor.

Two pieces of data determine the shape of a linear transformation. The kernel collects the arrows that get squashed to the origin: the function lands them all on top of zero. The image collects the arrows that the function actually reaches: it is the patch of the codomain the function paints over. Both pieces are themselves vector spaces.

The rank-nullity theorem balances a budget. Every dimension in the source space goes either into the kernel or into the image. If the source has 3 dimensions and the kernel grabs 1, the image gets the other 2.

Visual [Beginner]

The left panel is a three-dimensional source space with three arrows: two that the linear transformation will keep, and one (along a dashed line) that the transformation will squash to the origin. The right panel is the codomain. The two surviving arrows reach a tilted plane through the origin — the image. The squashed arrow lands at the origin.

A three-dimensional source space on the left with three basis arrows and a dashed kernel line; on the right, a tilted plane through the origin in the codomain spanned by the two arrows that survive the linear map, with the third arrow collapsed to the origin.

The dimensions on the left side add up. One dimension goes into the kernel and two dimensions go into the image: 1 plus 2 equals the source dimension 3.

Worked example [Beginner]

Work in three-dimensional coordinate space. Define a function that sends to .

Check linearity. For two inputs and , the function on the sum is

which equals . Stretching by a scalar behaves the same way: .

Find the kernel. The output is the origin when and . Solving gives and , so the kernel is the line of points of the form as ranges over the reals. The kernel has dimension 1.

Find the image. Pick coefficients and in the codomain. Setting shows the function reaches every output of the form . Reaching every instead asks for , and choosing instead and freely in the input shows every output is of the form . The image is the entire two-dimensional codomain. The image has dimension 2.

Add the dimensions: 1 plus 2 equals 3. The source has dimension 3. The budget balances.

What this tells us: the kernel records what the function loses, the image records what the function reaches, and their dimensions sum to the source dimension every time.

Check your understanding [Beginner]

Formal definition [Intermediate+]

Let and be vector spaces over a field .

A linear transformation from to is a function that satisfies the two preservation conditions

for all and . The two conditions combine into the single condition for all and . A linear transformation sends to because forces . Synonyms: linear map, vector-space homomorphism. The set of linear transformations is itself a vector space over , written or [quantum-well Linear map.md].

The kernel of is the subset

It is a subspace of : it contains , and the preservation conditions show whenever and [quantum-well Null space.md].

The image of is the subset

It is a subspace of : it contains , and shows the image is closed under linear combinations.

The rank of is and the nullity of is [quantum-well Rank of a matrix.md]. Both are non-negative integers when is finite-dimensional, in which case the image is a subspace of with dimension at most .

Examples. The differentiation operator on polynomials of degree at most is a linear transformation; its kernel is the constant polynomials (dimension 1), its image is all of (dimension ), and the source dimension is . The projection given by has kernel the -axis (dimension 1) and image the entire codomain (dimension 2). The zero map has kernel and image . The identity map has kernel and image .

Non-examples. The function is not a linear transformation because it sends the origin to a non-zero point. The function fails to preserve scalar multiplication because in general differs from . The function fails additivity, since but .

Counterexamples to common slips

  • A subset that contains and is closed under linear combinations is a subspace; however, the image of an arbitrary subset under need not equal unless is itself a subspace.
  • The kernel can be the whole source even when : the zero map has .
  • The image can be the whole codomain even when is not injective: a projection is surjective with non-zero kernel.
  • Rank-nullity uses on the left, not . Increasing the codomain does not change or , so the identity is robust under enlargement of .

Key theorem with proof [Intermediate+]

Theorem (rank-nullity). Let be a linear transformation between vector spaces over , with finite-dimensional. Then

[textbooks-extra Calculus Vol.2 - Multi-Variable Calculus and Linear Algebra with Applications (Tom Apostol).pdf]

Proof. Let and pick a basis of . The kernel is a subspace of the finite-dimensional space , so by the dimension comparison from 01.01.04. Extend to a basis of , again by 01.01.04. The number is then . The plan is to show is a basis of , from which and the identity rearranges to the theorem.

Spanning. Let , so for some . Expand in the basis of :

with . Apply :

Each because , so

a linear combination of . Hence spans .

Linear independence. Suppose

for some . Pull the linear combination inside via linearity:

The vector therefore lies in , and so it is a linear combination of the basis of the kernel:

for some . Rearranging,

This is a linear-dependence relation among the basis of . Linear independence of that basis forces every coefficient to vanish, hence in particular . The list is therefore linearly independent in .

Combining the two parts, is a basis of , so . Since by construction of the basis of , the identity follows.

Corollary (injectivity / surjectivity in finite dimensions). Let be linear with finite. Then is injective if and only if is surjective if and only if is an isomorphism.

Proof. Injectivity is equivalent to , hence to . Surjectivity is equivalent to , hence to . Rank-nullity reads , so if and only if . Each of those is in turn equivalent to being a bijection (a linear bijection is automatically a linear isomorphism, since the inverse of a linear bijection is linear).

Bridge. Rank-nullity is the dimension-counting half of the first isomorphism theorem for vector spaces: the same kernel-image data, when read as a quotient instead of a sum, yields the canonical isomorphism . The first isomorphism theorem reappears in the tensor algebra strand at 03.01.04, where the universal property of the tensor product packages bilinear maps as linear maps modulo a kernel. The same identity feeds the Fredholm alternative in functional analysis (the bounded-operator extension is reached in 02.11.* once Banach-space machinery is in place), where dimension counting is replaced by index counting for compact perturbations of the identity. Putting these together, dimension is a conserved quantity through any linear map: the codomain is not where the action is; what matters is what the map kills and what the map hits, and the source dimension is split exactly between those two.

Exercises [Intermediate+]

Lean formalization [Intermediate+]

Mathlib models a linear transformation as LinearMap, the kernel as LinearMap.ker, the image as LinearMap.range, and the rank-nullity identity as LinearMap.finrank_range_add_finrank_ker. The companion file Codex.Foundations.LinearAlgebra.RankNullity records the statements used above and packages the rank-nullity identity in the Codex namespace.

[object Promise]

This unit is marked lean_status: partial because Mathlib supplies every named ingredient — LinearMap, LinearMap.ker, LinearMap.range, Module.finrank, and the identity LinearMap.finrank_range_add_finrank_ker — but the Codex-namespaced statement together with the two onward extensions (Fredholm-index identity for bounded operators, Euler-characteristic version for chain complexes) is not packaged as a single named module; the corresponding statement in the companion module is left as a sorry-gated alias.

Advanced results [Master]

First isomorphism theorem. For a linear transformation , the assignment is a well-defined linear isomorphism

The construction is functorial: a commutative square of linear maps induces a commutative square of induced maps on quotients and images. In categorical language, is an abelian category in which every morphism factors uniquely as an epimorphism (the canonical projection ) followed by a monomorphism (the inclusion ), with the middle term recording the canonical image.

Splitting in . Every short exact sequence of -vector spaces

splits. Concretely, picking a basis of and lifting each basis vector along yields a section with , hence . The corresponding statement in the category of finitely generated abelian groups is false: the sequence has no section, since has no copy inside . Splitting is therefore a feature of the field-coefficient case, not a feature of homological algebra in general.

Module-theoretic generalisation. Over a principal ideal domain , a linear map between free modules of finite rank still satisfies a rank identity: when both sides are finite. Over an arbitrary commutative ring, the equality fails, since rank fragments into multiple invariants — minimal-generator count, Krull dimension, projective dimension. Even the basic rank-nullity statement requires the source module to be free; the kernel of a map between free modules need not itself be free over a non-PID.

Banach-space generalisation: Fredholm operators and the index. For a bounded linear operator between Banach spaces with and both finite-dimensional and closed, the Fredholm index is

This integer is invariant under norm-continuous deformation of within the class of Fredholm operators, and additive under composition: . The finite-dimensional rank-nullity identity is the special case in which both and are finite-dimensional, where regardless of . The Atiyah-Singer index theorem (1968) computes for an elliptic operator on a closed manifold from purely topological data of the symbol [Atiyah, M. F. & Singer, I. M. — The index of elliptic operators I].

Cohomological generalisation: Euler characteristic of a complex. For a finite-dimensional chain complex of -vector spaces with , repeated application of rank-nullity gives the identity

where . The alternating sum is the Euler characteristic, and the identity is the homological-algebra incarnation of dimension as a conserved quantity.

Synthesis. Three threads weave together. The first is dimension as conservation: rank-nullity transports the source dimension across the map, splitting it between the lost part (kernel) and the reached part (image). The second is coordinate-free factorisation: every linear map factors canonically as a quotient followed by an inclusion, and the middle object is intrinsic to the map. The third is invariance under deformation: in the Banach-space setting, and each fluctuate under perturbation but their difference is rigid. Putting these together, the central insight is that the codomain is not where the action is. What matters is what the map kills and what the map hits, and the source dimension is split exactly between those two — finite-dimensionally by the integer identity, infinite-dimensionally by the index, cohomologically by the Euler characteristic.

Full proof set [Master]

Rank-nullity, redone in the universal-property style. Let be a linear transformation with finite-dimensional. The exact sequence

where is the inclusion, is a short exact sequence of -vector spaces. The Splitting Lemma in exhibits as -vector spaces. Taking dimensions of both sides gives . The basis-extension argument used in the Intermediate proof is the explicit splitting: the extended basis realises , and restricts to an isomorphism between the second summand and .

First isomorphism theorem in detail. The map is well-defined because when . Linearity carries over from . The map is injective because forces , hence , hence . The map is surjective because every element of is for some . Hence is an isomorphism. Combining with the dimension formula from 01.01.04 recovers rank-nullity from the isomorphism.

Splitting Lemma in . For a short exact sequence of -vector spaces, pick a basis of . For each , choose a preimage with (possible because is surjective). Define on the basis by and extend linearly. Then on the basis, hence on all of by linearity. The pair realises : every decomposes as , with the first term in and the second in , and the decomposition is unique because (apply to both sides). The choice of basis of uses the existence of a basis for any vector space (Hamel basis in the infinite-dimensional case, by Zorn's lemma; finite basis in the finite-dimensional case).

Failure of splitting outside . The short exact sequence of abelian groups

does not split. A section would have to send the non-zero element to some with , while also satisfying and the linearity condition in , hence in , hence . The two conditions are inconsistent. The obstruction is that contains 2-torsion that cannot absorb. This is the prototype obstruction in the functor of homological algebra: , and the non-zero class records the non-splitting sequence.

Fredholm-index invariance under compact perturbation. Stated without proof: if is Fredholm and is compact (norm-limit of finite-rank operators), then is Fredholm and . The proof uses the parametrix construction — there exists with and for compact — together with the fact that has finite-dimensional kernel and cokernel for any compact , so its index is zero. Composition and additivity of the index then close the argument [Atiyah, M. F. & Singer, I. M. — The index of elliptic operators I].

Euler-characteristic identity for chain complexes. Let be a finite-dimensional chain complex with . Define , , and . Apply rank-nullity to :

Take the alternating sum . Reindex the second sum by to obtain , so

The Euler characteristic of the complex equals the Euler characteristic of its cohomology.

Connections [Master]

  • Subspace, basis, dimension 01.01.04 — supplies the basis-extension lemma and the dimension formula that the rank-nullity proof and the first isomorphism theorem both consume. Without 01.01.04, rank-nullity has no statement; with it, the proof reduces to a one-paragraph basis-tracking argument.

  • Tensor algebra 03.01.04 — the universal property of the tensor product is, structurally, a rank-nullity statement: bilinear maps correspond to linear maps via passing through the kernel of the canonical bilinear factorisation. The same first-isomorphism-theorem identification underlies the universal property and the dimension count that connects multilinear algebra to the present unit.

  • Vector bundle 03.05.02 — a morphism of vector bundles over a fixed base has fibrewise kernels and images, and the rank-nullity identity holds in each fibre. When has constant rank, the kernel and image are themselves vector subbundles, generalising the linear-algebra picture to a parameterised family. The constant-rank hypothesis is essential: a non-constant-rank morphism has fibrewise kernels of jumping dimension, so the family of kernels is not a subbundle.

  • Differential forms 03.04.01 — the exterior derivative on a manifold is a linear map between infinite-dimensional vector spaces with . The cohomology from 03.04.06 is the rank-nullity bookkeeping at level ; the Betti numbers are the dimension counts the present unit's framework records.

  • Bilinear and quadratic forms 01.01.15 — a bilinear form packages into a linear map given by . The kernel of that linear map is the radical of the form, and its image lies in . Rank-nullity computes , which is the dimension half of Sylvester's law of inertia.

Historical & philosophical context [Master]

Hermann Grassmann gave the first systematic algebraic treatment of linear maps between extension systems in Die lineale Ausdehnungslehre (1844, Otto Wigand, Leipzig), introducing the dimension-tracking that the modern statement formalises. The vocabulary "rank" entered the literature through James Joseph Sylvester's 1851 paper On the relation between the minor determinants of linearly equivalent quadratic functions (Philosophical Magazine), where rank named the size of the largest non-vanishing minor of a matrix; the connection to dimension of the column space crystallised over the next half century. Georg Frobenius gave the modern matrix-rank framework in his 1877 memoir Über das Pfaffsche Problem (J. reine angew. Math. 82) [textbooks-extra Calculus Vol.2 - Multi-Variable Calculus and Linear Algebra with Applications (Tom Apostol).pdf].

The rank-nullity theorem in its abstract vector-space form is part of Emmy Noether's homological program of the 1920s and 1930s. Noether's three isomorphism theorems for modules — published in Ideale und Verbände in den allgemeinen abstrakten Theorien (lectures at Göttingen, 1927–1928) and codified in van der Waerden's Moderne Algebra (1930) — gave the unified statement of which the vector-space rank-nullity is the field-coefficient case. The Atiyah-Singer index theorem (M. F. Atiyah and I. M. Singer, "The index of elliptic operators I", Annals of Mathematics 87 (1968), 484–530) extended the integer rank-nullity to a topological identity for elliptic operators on closed manifolds. Saunders Mac Lane and Garrett Birkhoff's Algebra (Macmillan, 1967) presented the unified module-theoretic version that subsumes rank-nullity, the first isomorphism theorem, and the structure theorem for finitely generated modules over a PID under a single categorical heading.

Bibliography [Master]

  • Grassmann, H., Die lineale Ausdehnungslehre, ein neuer Zweig der Mathematik, Otto Wigand, Leipzig, 1844.
  • Sylvester, J. J., "On the relation between the minor determinants of linearly equivalent quadratic functions", Philosophical Magazine (4) 1 (1851), 295–305.
  • Frobenius, G., "Über das Pfaffsche Problem", Journal für die reine und angewandte Mathematik 82 (1877), 230–315.
  • Noether, E., "Ideale und Verbände in den allgemeinen abstrakten Theorien", lectures at Göttingen, 1927–1928; published in Mathematische Annalen 96 (1927), 26–61.
  • van der Waerden, B. L., Moderne Algebra, Springer, 1930.
  • Apostol, T. M., Calculus, Vol. 2: Multi-Variable Calculus and Linear Algebra with Applications, 2nd ed., John Wiley & Sons, 1969. Ch. 2 §2.2–§2.7.
  • Mac Lane, S. & Birkhoff, G., Algebra, Macmillan, 1967. Ch. V.
  • Atiyah, M. F. & Singer, I. M., "The index of elliptic operators I", Annals of Mathematics 87 (1968), 484–530.
  • Axler, S., Linear Algebra Done Right, 3rd ed., Springer, 2015. Ch. 3.
  • Hoffman, K. & Kunze, R., Linear Algebra, Prentice-Hall, 2nd ed., 1971. Ch. 3.

Autonomous production unit. Successor to subspace-basis-dimension; load-bearing for tensor algebra, vector bundle morphisms, de Rham cohomology, and the Fredholm index in functional analysis.