Linear transformations

A vector space has two native operations, addition and scaling. A linear transformation is exactly the kind of map between vector spaces that respects both — and that single requirement turns out to be extraordinarily rigid. Fix bases in the domain and codomain, and every linear transformation between finite-dimensional spaces collapses to multiplication by a matrix: an abstract map becomes a concrete grid of numbers you can compute with. Attached to every transformation are two subspaces worth knowing by heart, the kernel (what collapses to zero) and the range (everything reachable) — and the rank-nullity theorem ties their sizes together in one clean equation. This article builds the matrix representation from scratch, proves rank-nullity, and works two representative examples: one on ordinary column vectors, one on polynomials.

The core insight

A linear transformation is completely captured by its matrix in fixed bases, and the dimensions of its kernel and range always add up to the dimension of the domain.

The core idea

Definition. A map T:V→WT:V\to W between vector spaces over the same field is a linear transformation if it respects both vector-space operations at once, for every u,v∈V\mathbf u,\mathbf v\in V and scalars α,β\alpha,\beta:

T(αu+βv)=α T(u)+β T(v).T(\alpha\mathbf u+\beta\mathbf v)=\alpha\,T(\mathbf u)+\beta\,T(\mathbf v).

where: T(u)T(\mathbf u) and T(v)T(\mathbf v) are the images of u,v\mathbf u,\mathbf v under TT, and α,β\alpha,\beta range over the field (R\mathbb{R} throughout this article). Two facts drop straight out: T(0)=0T(\mathbf 0)=\mathbf 0 (set α=β=0\alpha=\beta=0), and TT is completely determined once you know what it does to a basis of VV — every other vector is a linear combination of basis vectors, and TT must respect that combination.

From map to matrix. Fix a basis {e1,…,en}\{\mathbf e_1,\dots,\mathbf e_n\} of VV and a basis {f1,…,fm}\{\mathbf f_1,\dots,\mathbf f_m\} of WW. Write each image T(ej)T(\mathbf e_j) as a combination of the fi\mathbf f_i's; the coefficients of T(ej)T(\mathbf e_j) become the jj-th column of an m×nm\times n matrix AA. Then for any x∈V\mathbf x\in V with coordinate vector [x][\mathbf x] in the e\mathbf e-basis, the coordinate vector of T(x)T(\mathbf x) in the f\mathbf f-basis is exactly A[x]A[\mathbf x] — matrix-vector multiplication is applying the transformation. This is why matrices and linear transformations are two views of the same object.

Kernel and range. Two subspaces are attached to every TT:

  • Kernel (null space): ker⁡T={v∈V:T(v)=0}\ker T=\{\mathbf v\in V : T(\mathbf v)=\mathbf 0\}, a subspace of VV. Under the matrix representation this is exactly the null space of AA, found by solving Ax=0A\mathbf x=\mathbf 0.
  • Range (image): im⁡T={T(v):v∈V}\operatorname{im}T=\{T(\mathbf v):\mathbf v\in V\}, a subspace of WW, spanned by the columns of AA; its dimension equals rank⁡(A)\operatorname{rank}(A).

The figure below shows the picture that ties these together: the domain splits, the kernel collapses to the zero vector, and the rest of the domain maps bijectively onto the range sitting inside the codomain.

Figure
A domain vector space split into the kernel and its complement, with the kernel collapsing to the zero vector and the complementary part mapping onto the range inside the codomain
Kernel collapses, the rest maps onto the range domain V ker T codomain W im T zero vector of W dim ker T + dim im T = dim V — the rank-nullity theorem

The rank-nullity theorem

Derivation AWhy dim(ker T) + dim(im T) = dim V

The goal is to prove, from the basis-extension idea a student already has for finding a basis of any subspace, that the dimension of the kernel and the dimension of the range of a linear transformation T:V→WT:V\to W always add up to the dimension of the domain VV, so that once you know two of the three dimensions the third is fixed automatically — this is the single most useful bookkeeping identity for checking any kernel or range computation.

Step 1. Choose a basis for the kernel. Let dim⁡V=n\dim V = n and dim⁡(ker⁡T)=k\dim(\ker T) = k, and pick a basis {u1,…,uk}\{\mathbf u_1,\dots,\mathbf u_k\} of ker⁡T⊆V\ker T\subseteq V. By definition T(ui)=0T(\mathbf u_i)=\mathbf 0 for each of these.

Step 2. Extend it to a basis of all of VV. Any basis of a subspace extends to a basis of the whole space, so add vectors {w1,…,wn−k}\{\mathbf w_1,\dots,\mathbf w_{n-k}\} so that {u1,…,uk,w1,…,wn−k}\{\mathbf u_1,\dots,\mathbf u_k,\mathbf w_1,\dots,\mathbf w_{n-k}\} is a basis of VV. There are exactly n−kn-k new vectors, since the full basis must have nn elements.

Step 3. Show {T(w1),…,T(wn−k)}\{T(\mathbf w_1),\dots,T(\mathbf w_{n-k})\} spans im⁡T\operatorname{im}T. Any v∈V\mathbf v\in V is a combination v=∑ciui+∑djwj\mathbf v=\sum c_i\mathbf u_i+\sum d_j\mathbf w_j, so T(v)=∑ciT(ui)+∑djT(wj)=∑djT(wj)T(\mathbf v)=\sum c_i T(\mathbf u_i)+\sum d_j T(\mathbf w_j)=\sum d_j T(\mathbf w_j) because each T(ui)=0T(\mathbf u_i)=\mathbf 0. So every vector in im⁡T\operatorname{im}T is a combination of the T(wj)T(\mathbf w_j)'s — they span the range.

Step 4. Show the T(wj)T(\mathbf w_j)'s are independent, hence a basis of im⁡T\operatorname{im}T. Suppose ∑djT(wj)=0\sum d_j T(\mathbf w_j)=\mathbf 0. By linearity T(∑djwj)=0T\big(\sum d_j\mathbf w_j\big)=\mathbf 0, so ∑djwj∈ker⁡T\sum d_j\mathbf w_j\in\ker T, meaning it is some combination of the ui\mathbf u_i's. But the full set {ui,wj}\{\mathbf u_i,\mathbf w_j\} is a basis of VV, hence independent, so the only way a combination of the wj\mathbf w_j's alone can equal a combination of the ui\mathbf u_i's is if all coefficients are zero. So the T(wj)T(\mathbf w_j)'s are independent — a basis of im⁡T\operatorname{im}T with exactly n−kn-k elements.

Step 5. Read off the theorem. dim⁡(im⁡T)=n−k=dim⁡V−dim⁡(ker⁡T)\dim(\operatorname{im}T)=n-k=\dim V-\dim(\ker T), which rearranges to

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

Nullity plus rank equals the dimension of the domain — never the codomain, a common slip. For T:V→VT:V\to V with dim⁡V=n\dim V=n this immediately gives the invertibility chain: TT injective   ⟺  \iff ker⁡T={0}\ker T=\{\mathbf 0\}   ⟺  \iff rank⁡(A)=n\operatorname{rank}(A)=n   ⟺  \iff det⁡A≠0\det A\neq 0   ⟺  \iff TT surjective, all four conditions equivalent because nullity zero forces rank nn.

Worked example

Problem. Let T:R3→R2T:\mathbb{R}^3\to\mathbb{R}^2 be defined by T(x,y,z)=(x+2y−z, 2x+4y−2z)T(x,y,z)=(x+2y-z,\ 2x+4y-2z). Find its matrix (standard bases), determine ker⁡T\ker T and im⁡T\operatorname{im}T, and verify rank-nullity.

Step 1. Build the matrix. T(e1)=T(1,0,0)=(1,2)T(\mathbf e_1)=T(1,0,0)=(1,2), T(e2)=T(0,1,0)=(2,4)T(\mathbf e_2)=T(0,1,0)=(2,4), T(e3)=T(0,0,1)=(−1,−2)T(\mathbf e_3)=T(0,0,1)=(-1,-2), giving each image as a column:

A=(12−124−2).A=\begin{pmatrix}1&2&-1\\2&4&-2\end{pmatrix}.

Step 2. Solve Ax=0A\mathbf x=\mathbf 0 for the kernel. The two equations are x+2y−z=0x+2y-z=0 and 2x+4y−2z=02x+4y-2z=0; the second is exactly twice the first, so there is really one independent equation, x=z−2yx=z-2y. With y,zy,z free, the general solution is (z−2y, y, z)=y(−2,1,0)+z(1,0,1)(z-2y,\ y,\ z)=y(-2,1,0)+z(1,0,1), so

ker⁡T=span⁡{(−2,1,0),(1,0,1)},dim⁡(ker⁡T)=2\ker T=\operatorname{span}\{(-2,1,0),(1,0,1)\},\qquad \dim(\ker T)=2

(the two spanning vectors are independent, since neither is a scalar multiple of the other).

Step 3. Find the range as the column space of AA. The three columns (1,2),(2,4),(−1,−2)(1,2),(2,4),(-1,-2) are all scalar multiples of (1,2)(1,2), so im⁡T=span⁡{(1,2)}\operatorname{im}T=\operatorname{span}\{(1,2)\} and dim⁡(im⁡T)=1\dim(\operatorname{im}T)=1.

Step 4. Check rank-nullity: dim⁡(ker⁡T)+dim⁡(im⁡T)=2+1=3=dim⁡R3\dim(\ker T)+\dim(\operatorname{im}T)=2+1=3=\dim\mathbb{R}^3. Confirmed — ker⁡T\ker T is the plane through the origin spanned by (−2,1,0)(-2,1,0) and (1,0,1)(1,0,1), and im⁡T\operatorname{im}T is the line spanned by (1,2)(1,2).

Competitive stretch

The same tools handle transformations on function spaces, not just Rn\mathbb{R}^n. Let T:P2→P2T:P_2\to P_2 be T(p(x))=p′(x)+p(0)T(p(x))=p'(x)+p(0) (differentiate, then add back the constant term), with basis {1,x,x2}\{1,x,x^2\}. Compute T(1)=0+1=1T(1)=0+1=1, T(x)=1+0=1T(x)=1+0=1, T(x2)=2x+0=2xT(x^2)=2x+0=2x, giving columns (1,0,0),(1,0,0),(0,2,0)(1,0,0),(1,0,0),(0,2,0) and matrix A=(110002000)A=\begin{pmatrix}1&1&0\\0&0&2\\0&0&0\end{pmatrix}. Its determinant is 00, so TT is not invertible: columns 1 and 2 are identical, rank⁡(A)=2\operatorname{rank}(A)=2, and rank-nullity forces dim⁡(ker⁡T)=3−2=1\dim(\ker T)=3-2=1. Indeed T(1−x)=(0+1)−(1+0)=0T(1-x)=(0+1)-(1+0)=0, so 1−x1-x lies in ker⁡T\ker T.

Common traps

  • Checking linearity only on addition or only on scalar multiplication — both must hold together; a shifted map like T(x)=x+1T(x)=x+1 is affine, not linear, and fails because T(0)≠0T(\mathbf 0)\neq\mathbf 0.
  • Building the matrix with each T(ej)T(\mathbf e_j) as a row instead of a column — the column-per-basis-vector rule is fixed, not a convention to guess.
  • Assuming ker⁡T={0}\ker T=\{\mathbf 0\} for any "reasonable-looking" map without solving Ax=0A\mathbf x=\mathbf 0 explicitly; nontrivial kernels are common whenever the codomain is smaller than the domain, or when the map genuinely loses information (like differentiation killing constants).
  • Writing rank-nullity with dim⁡W\dim W on the right — the identity always uses dim⁡V\dim V, the domain.

Ask the tutor: want to work through more transformations — rotations, projections, or maps on polynomial spaces — and see how each one's matrix representation connects back to rank-nullity? Ask the AI tutor for guided practice.

Why does the matrix use columns for T of e sub j and not rows?

Because matrix-vector multiplication is defined to match it: if AA's jj-th column is T(ej)T(\mathbf e_j), then A[x]A[\mathbf x] for x=∑xjej\mathbf x=\sum x_j\mathbf e_j works out to ∑xj (column j)=∑xjT(ej)=T(x)\sum x_j\,(\text{column }j)=\sum x_j T(\mathbf e_j)=T(\mathbf x) by linearity. Put the images in rows instead and the multiplication no longer reproduces TT; the column convention is what makes "matrix times coordinate vector" mean "apply the transformation."

Does rank-nullity work for transformations between spaces of different dimension, like R cubed to R squared?

Yes — the theorem only ever refers to dim⁡V\dim V, the domain, regardless of what the codomain looks like. In the worked example, T:R3→R2T:\mathbb{R}^3\to\mathbb{R}^2 still satisfies dim⁡(ker⁡T)+dim⁡(im⁡T)=dim⁡R3=3\dim(\ker T)+\dim(\operatorname{im}T)=\dim\mathbb{R}^3=3, even though the codomain has dimension 2. The only real constraint the codomain imposes is that dim⁡(im⁡T)\dim(\operatorname{im}T) can never exceed dim⁡W\dim W, since the range is a subspace of WW.

If a transformation's matrix has determinant zero, does that always mean the kernel is nontrivial?

Only when the transformation is between spaces of the same dimension, T:V→VT:V\to V, where the matrix is square and det⁡A\det A is even defined. There, det⁡A=0\det A=0 exactly means AA is singular, so rank <n< n, and rank-nullity forces dim⁡(ker⁡T)>0\dim(\ker T)>0. For a non-square matrix, like the 2×32\times 3 case in the worked example, determinant is not defined at all — you must fall back on solving Ax=0A\mathbf x=\mathbf 0 or comparing rank to dim⁡V\dim V directly.

Before this

Where this leads