Skip to main content

Linear Transformations

Imagine you could describe every rotation, every stretch, every shadow-casting projection, and every reflection with a single, unified idea — and then compute all of them by multiplying a grid of numbers. That is exactly what a linear transformation is. It is the bridge that connects the geometry you can see (spinning a picture, squashing a shape, projecting a 3D scene onto a flat screen) with the algebra you can calculate (matrix multiplication). Once you understand this bridge, matrices stop being mysterious tables of numbers and become verbs: things that do something to space.

Linear transformations are the beating heart of linear algebra. They explain why matrices multiply the strange way they do, they power computer graphics and machine learning, and they give you the vocabulary — kernel, image, rank — to describe exactly what a transformation keeps and what it destroys. This page teaches you not just the definitions, but why they are the "right" definitions.

Learning Objectives

  • Define a linear transformation via the two axioms: preserving addition and preserving scalar multiplication.
  • Explain and prove why every linear transformation between finite-dimensional spaces is represented by a matrix.
  • Compute the matrix of a transformation by tracking where basis vectors go.
  • Find and interpret the kernel (null space) and image (range) of a transformation.
  • Build and apply the standard matrices for rotations, projections, reflections, and scalings.
  • Connect the Rank–Nullity theorem to injectivity, surjectivity, and invertibility.

Quick Answer

A linear transformation TT is a function between vector spaces that satisfies two rules: T(u+v)=T(u)+T(v)T(u + v) = T(u) + T(v) (it preserves addition) and T(cv)=cT(v)T(cv) = c\,T(v) (it preserves scaling). These two conditions together mean TT sends straight lines to straight lines and keeps the origin fixed. The stunning consequence is that once you know where TT sends the basis vectors, you know everything — so every linear transformation from Rn\mathbb{R}^n to Rm\mathbb{R}^m is exactly multiplication by an m×nm \times n matrix whose columns are the images of the basis vectors. The kernel is the set of inputs crushed to zero; the image is the set of all reachable outputs. Rotations, projections, reflections, and scalings are all linear transformations, which is why matrices govern computer graphics and data science.

Where It Came From

For most of the 1800s, mathematicians studied systems of linear equations on one side and geometric motions (rotations, reflections) on the other, without a unifying language. The need that forced linear transformations into existence was the desire to treat change of coordinates and substitution systematically.

The story really begins with Arthur Cayley in 1858. Mathematicians constantly performed linear substitutions — replacing variables x,yx, y with combinations like x=ax+byx' = ax + by, y=cx+dyy' = cx + dy — to simplify equations, study conic sections, and analyze quadratic forms. Cayley noticed that when you do one substitution and then another, the combined effect follows a fixed bookkeeping pattern. He invented the matrix precisely as a shorthand for a linear substitution, and he defined matrix multiplication so that it would match the composition of two substitutions. This is the key historical insight: matrix multiplication was not invented arbitrarily — it was reverse-engineered to represent "do one transformation, then another." That is why the rule looks so odd until you see it as function composition.

Meanwhile, Hermann Grassmann (1844) and later Giuseppe Peano (1888) developed the abstract notion of a vector space, freeing the ideas from specific lists of numbers. In this abstract setting a linear transformation is the natural "structure-preserving map" — the analogue of a group homomorphism. By the early 20th century, this geometric-algebraic fusion had matured into the modern viewpoint, championed in the functional analysis of Hilbert and Banach, where linear operators became central to physics and analysis. So the concept was born from a very practical need — organizing substitutions — and grew into the universal language for anything that scales and adds.

The Two Axioms and What They Force

A function T:VWT : V \to W between vector spaces is linear if for all vectors u,vu, v and every scalar cc:

T(u+v)=T(u)+T(v)andT(cv)=cT(v). T(u + v) = T(u) + T(v) \qquad \text{and} \qquad T(cv) = c\,T(v).

These can be bundled into one superposition rule:

T(au+bv)=aT(u)+bT(v). T(a\,u + b\,v) = a\,T(u) + b\,T(v).

Two immediate consequences fall out. First, setting c=0c = 0 gives T(0)=0T(0) = 0: a linear transformation must fix the origin. Second, geometrically, evenly spaced grid lines stay evenly spaced and parallel — space may be stretched, sheared, or rotated, but it is never bent or curved.

Worked example — testing linearity. Is T(x,y)=(2xy,  3y)T(x, y) = (2x - y,\; 3y) linear? Take u=(x1,y1)u = (x_1, y_1) and v=(x2,y2)v = (x_2, y_2).

T(u+v)=(2(x1+x2)(y1+y2),  3(y1+y2)). T(u + v) = \big(2(x_1 + x_2) - (y_1 + y_2),\; 3(y_1 + y_2)\big).

T(u)+T(v)=(2x1y1,  3y1)+(2x2y2,  3y2)=(2x1+2x2y1y2,  3y1+3y2). T(u) + T(v) = (2x_1 - y_1,\; 3y_1) + (2x_2 - y_2,\; 3y_2) = \big(2x_1 + 2x_2 - y_1 - y_2,\; 3y_1 + 3y_2\big).

These match, and a similar check confirms scaling, so TT is linear.

Counterexample. Is S(x,y)=(x+1,  y)S(x, y) = (x + 1,\; y) linear? Check the origin: S(0,0)=(1,0)(0,0)S(0,0) = (1, 0) \neq (0,0). It fails immediately — a shift (translation) is not linear, because it moves the origin. This is why translations require the "affine" trick of homogeneous coordinates in graphics.

Matrices ARE Transformations

Here is the central theorem of the whole subject. Suppose T:RnRmT : \mathbb{R}^n \to \mathbb{R}^m is linear. Write any input using the standard basis vectors e1,,ene_1, \dots, e_n (where e1=(1,0,,0)e_1 = (1,0,\dots,0), etc.):

v=x1e1+x2e2++xnen. v = x_1 e_1 + x_2 e_2 + \cdots + x_n e_n.

By superposition,

T(v)=x1T(e1)+x2T(e2)++xnT(en). T(v) = x_1\,T(e_1) + x_2\,T(e_2) + \cdots + x_n\,T(e_n).

So TT is completely determined by the nn output vectors T(e1),,T(en)T(e_1), \dots, T(e_n). Stack those outputs as the columns of a matrix AA, and then T(v)=AvT(v) = A v. The columns of a transformation's matrix are simply "where the basis vectors land."

Worked example — building the matrix. Find the matrix of T(x,y)=(2xy,  3y)T(x, y) = (2x - y,\; 3y).

  • T(e1)=T(1,0)=(2,0)T(e_1) = T(1, 0) = (2, 0) → first column.
  • T(e2)=T(0,1)=(1,3)T(e_2) = T(0, 1) = (-1, 3) → second column.

A=[2103]. A = \begin{bmatrix} 2 & -1 \\ 0 & 3 \end{bmatrix}.

Check on v=(4,5)v = (4, 5): directly, T(4,5)=(245,  35)=(3,15)T(4,5) = (2\cdot 4 - 5,\; 3 \cdot 5) = (3, 15). Via the matrix:

[2103][45]=[24+(1)504+35]=[315]. \begin{bmatrix} 2 & -1 \\ 0 & 3 \end{bmatrix}\begin{bmatrix} 4 \\ 5 \end{bmatrix} = \begin{bmatrix} 2\cdot 4 + (-1)\cdot 5 \\ 0 \cdot 4 + 3 \cdot 5 \end{bmatrix} = \begin{bmatrix} 3 \\ 15 \end{bmatrix}. \checkmark

And now composition makes sense: if you apply BB then AA, the combined transformation is the matrix product ABAB — that is the very reason Cayley defined multiplication this way.

Rotations, Projections, and Reflections

Because a transformation's matrix is just the images of e1e_1 and e2e_2, you can build famous geometric maps by asking "where do the two basis arrows go?"

Rotation by angle θ\theta (counterclockwise). The vector e1=(1,0)e_1 = (1,0) rotates to (cosθ,sinθ)(\cos\theta, \sin\theta); e2=(0,1)e_2 = (0,1) rotates to (sinθ,cosθ)(-\sin\theta, \cos\theta). So

Rθ=[cosθsinθsinθcosθ]. R_\theta = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}.

Worked example — rotate (1,0)(1, 0) by 90 90^\circ. With θ=90\theta = 90^\circ, cosθ=0\cos\theta = 0, sinθ=1\sin\theta = 1:

[0110][10]=[01]. \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0 \\ 1 \end{bmatrix}.

The point (1,0)(1,0) swings up to (0,1)(0,1), exactly as a 90 90^\circ turn should.

Projection onto the xx-axis. This flattens everything down: e1(1,0)e_1 \mapsto (1,0), e2(0,0)e_2 \mapsto (0,0).

P=[1000],P[47]=[40]. P = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \qquad P\begin{bmatrix} 4 \\ 7 \end{bmatrix} = \begin{bmatrix} 4 \\ 0 \end{bmatrix}.

Notice PP loses information — the height 7 7 is gone forever. That destroyed information is precisely what the kernel measures.

Reflection across the xx-axis flips the sign of the yy-coordinate: [1001]\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}.

Kernel and Image: What a Transformation Keeps and Destroys

Two subspaces capture the "personality" of any linear transformation T:VWT : V \to W.

  • The kernel (or null space) is ker(T)={v:T(v)=0}\ker(T) = \{ v : T(v) = 0 \} — every input crushed to the zero vector.
  • The image (or range) is im(T)={T(v):vV}\operatorname{im}(T) = \{ T(v) : v \in V \} — every output you can actually reach.

The kernel measures collapse (how much gets lost), and the image measures reach (how much of the target you cover). They are linked by the beautiful Rank–Nullity Theorem:

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

In words: dimensions destroyed plus dimensions kept equals dimensions you started with. Nothing is created; everything is accounted for.

Worked example. For the projection P=[1000]P = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} on R2\mathbb{R}^2:

  • Kernel: solve Pv=0P v = 0. We need x=0x = 0 with yy free, so ker(P)={(0,y)}\ker(P) = \{ (0, y) \} — the entire yy-axis, a 1-dimensional line. (Nullity =1= 1.)
  • Image: every output has the form (x,0)(x, 0), so im(P)\operatorname{im}(P) is the xx-axis, also 1-dimensional. (Rank =1= 1.)
  • Check: 1+1=2=dim(R2) 1 + 1 = 2 = \dim(\mathbb{R}^2). ✓

A transformation is one-to-one (injective) exactly when its kernel is just {0}\{0\} (nothing is collapsed), and onto (surjective) exactly when its image fills the whole target. When both hold and V=WV = W, the matrix is invertible — you can undo it.

Real-World Applications

  • Computer graphics and games. Every time a 3D model rotates, scales, or is projected onto your 2D screen, a chain of matrix transformations is applied to millions of vertices. GPUs are essentially machines built to multiply transformation matrices fast.
  • Machine learning and neural networks. A single layer of a neural network computes Wx+bWx + b — a linear transformation WxWx followed by a shift. Principal Component Analysis (PCA) uses a linear transformation to rotate data onto its most informative axes.
  • Physics and engineering. The stress on a material, the moment of inertia of a spinning body, and Lorentz transformations in special relativity are all linear operators. Quantum mechanics is the study of linear operators on state spaces.
  • Image compression. JPEG applies the Discrete Cosine Transform — a linear transformation — to blocks of pixels, then discards small components (a projection onto the important dimensions).
  • Robotics. A robot arm's pose is computed by composing rotation and translation transformations joint by joint.

Common Mistakes

Mistake 1: Thinking translations are linear. Many students assume "moving a shape" is linear. But T(v)=v+bT(v) = v + b for a nonzero shift bb fails the origin test: T(0)=b0T(0) = b \neq 0. Correction: Translations are affine, not linear. Graphics engines handle them by adding an extra coordinate (homogeneous coordinates) so the shift becomes part of a bigger linear map.

Mistake 2: Confusing the kernel with the zero vector. Because T(0)=0T(0) = 0 always, students think the kernel is "just zero." Why wrong: many transformations crush an entire line or plane to zero. The kernel is {0}\{0\} only when TT is injective. Correction: Always solve Tv=0Tv = 0 explicitly; a big kernel means lots of lost information.

Mistake 3: Multiplying matrices in the wrong order for composition. If you rotate then project, the combined matrix is PRP R, not RPR P — the second operation goes on the left. Why wrong: matrix multiplication is not commutative, so order changes the result. Correction: Read PRvPRv right-to-left: RR acts on vv first, then PP acts on the result.

Comparison and Connections

Linear transformations sit among several related ideas that students often blur together.

ConceptPreserves origin?Preserves lines?Example
Linear transformationYesYes (through origin)Rotation, projection
Affine transformationNoYesTranslation, "rotate + shift"
General (nonlinear) functionNoNof(x)=x2f(x) = x^2, warping
IsometryDependsYesRotation, reflection (distance-preserving)

A rotation preserves both length and angle (it is an isometry with determinant +1+1); a projection does not preserve length and has a nonzero kernel; a shear preserves area but distorts angles. The single number that tells you how a linear map scales area/volume — and whether it flips orientation — is the determinant, and the special directions a map merely stretches without rotating are its eigenvectors. Both are natural next steps built directly on this foundation.

Practice Questions

Recall

State the two defining conditions of a linear transformation, and explain what each one guarantees geometrically.

Answer: Additivity T(u+v)=T(u)+T(v)T(u+v) = T(u) + T(v) and homogeneity T(cv)=cT(v)T(cv) = cT(v). Together they force the origin to stay fixed and straight lines to remain straight (no bending), so grid lines stay parallel and evenly spaced.

Understanding

Explain why knowing T(e1)T(e_1) and T(e2)T(e_2) is enough to know TT on every vector in R2\mathbb{R}^2.

Answer: Any v=(x,y)v = (x, y) can be written xe1+ye2x e_1 + y e_2. By linearity T(v)=xT(e1)+yT(e2)T(v) = x\,T(e_1) + y\,T(e_2). So the two basis images determine all outputs — and stacking them as columns gives the matrix of TT.

Application

Find the matrix that rotates the plane by 180 180^\circ, and apply it to the point (3,2)(3, -2).

Answer: With θ=180\theta = 180^\circ: cosθ=1\cos\theta = -1, sinθ=0\sin\theta = 0, giving [1001]\begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix}. Applied to (3,2)(3, -2) we get (3,2)(-3, 2) — the point reflected through the origin, as expected for a half-turn.

Analysis

A linear transformation T:R3R3T : \mathbb{R}^3 \to \mathbb{R}^3 has a 2-dimensional image. What is the dimension of its kernel, and is TT invertible? Justify.

Answer: By Rank–Nullity, dim(kerT)=32=1\dim(\ker T) = 3 - 2 = 1. Since the kernel is nonzero, TT collapses a line to the origin, so it is not injective and therefore not invertible. (An invertible map on R3\mathbb{R}^3 must have full rank 3 3 and trivial kernel.)

FAQ

Why does matrix multiplication work the way it does — row times column? Because matrices represent transformations, and multiplying two matrices must equal composing the two transformations. Cayley defined the row-by-column rule precisely so that (AB)v=A(Bv)(AB)v = A(Bv). The seemingly weird rule is exactly what makes "do BB, then AA" come out right.

Is every matrix a linear transformation, and vice versa? Yes, in finite dimensions with chosen bases. Every m×nm \times n matrix defines a linear map RnRm\mathbb{R}^n \to \mathbb{R}^m by vAvv \mapsto Av, and every such linear map has a unique matrix. They are two views of the same object: algebraic and geometric.

What's the difference between the kernel and the image, in plain words? The kernel is what the transformation destroys (inputs sent to zero); the image is what it can produce (all reachable outputs). A projection has a big kernel and a small image; an invertible map has a trivial kernel and a full image.

Can a linear transformation change between spaces of different dimensions? Absolutely. T:R3R2T : \mathbb{R}^3 \to \mathbb{R}^2 is fine — its matrix is 2×3 2 \times 3. Going to a smaller space always forces a nonzero kernel (by Rank–Nullity), so information is lost, which is exactly what projection does.

How do rotations and projections differ so fundamentally? A rotation is invertible: no information is lost, kernel is {0}\{0\}, and you can spin back. A projection is not invertible: it flattens a dimension into the kernel, and once that height is gone you cannot recover it. Determinant of a rotation is ±1\pm 1; determinant of a projection is 0 0.

Why can't a linear transformation include a translation? Because linearity forces T(0)=0T(0) = 0, but a translation moves the origin. To combine rotation and translation (as robotics and graphics need), you embed everything in one higher dimension using homogeneous coordinates, turning the affine motion into a genuine linear map there.

Quick Revision

  • Definition: T(u+v)=T(u)+T(v)T(u+v) = T(u)+T(v) and T(cv)=cT(v)T(cv) = cT(v); equivalently T(au+bv)=aT(u)+bT(v)T(au+bv) = aT(u)+bT(v).
  • Origin fixed: every linear map sends 00 0 \to 0; translations are NOT linear.
  • Matrix from map: columns of AA are T(e1),T(e2),T(e_1), T(e_2), \dots; then T(v)=AvT(v) = Av.
  • Rotation: Rθ=[cosθsinθsinθcosθ]R_\theta = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}.
  • Projection onto xx-axis: [1000]\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}; reflection over xx-axis: [1001]\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}.
  • Kernel = inputs mapped to 0 0; Image = all outputs.
  • Rank–Nullity: dim(kerT)+dim(imT)=dim(V)\dim(\ker T) + \dim(\operatorname{im} T) = \dim(V).
  • Injective ⟺ kernel ={0}= \{0\}; invertible ⟺ full rank and trivial kernel.
  • Composition = matrix product; order matters (PRRPPR \neq RP in general).

Prerequisites

  • Vectors and Vector Spaces — the objects that transformations act on (see your Linear Algebra overview).
  • Matrix arithmetic and matrix multiplication.
  • Determinants — the single number measuring how a transformation scales area/volume and whether it flips orientation.
  • Eigenvalues and Eigenvectors — the special directions a transformation only stretches.
  • Systems of Linear Equations — solving Ax=bAx = b is asking whether bb is in the image of TT.

Next Topics

  • Change of Basis — how a transformation's matrix looks different in different coordinate systems.
  • Orthogonal Projections and Least Squares — projections applied to data fitting.
  • Linear Algebra Overview — return to the branch index for the full roadmap.