What Is a Linear Transformation? Definition & Examples

A linear transformation is a special type of function that maps vectors from one space to another while preserving two fundamental operations: vector addition and scalar multiplication. If you’re taking linear algebra, it’s one of the most important concepts in the course, because it connects abstract vector spaces to concrete matrix operations and shows up everywhere from computer graphics to machine learning.

The Two Rules That Define Linearity

A function T qualifies as a linear transformation if and only if it satisfies two properties for every possible input:

  • Additivity: T(u + v) = T(u) + T(v). If you add two vectors first and then transform the result, you get the same answer as transforming each vector separately and then adding.
  • Homogeneity: T(av) = aT(v). If you scale a vector by some number and then transform it, you get the same result as transforming the vector first and then scaling.

These two rules have a powerful consequence: a linear transformation always sends the zero vector to the zero vector. If you scale any vector by zero, homogeneity forces T(0) = 0. This is actually a quick test. If a function doesn’t map zero to zero, it cannot be linear, no matter what else it does.

Translation is a common example that fails this test. If you define a function f(v) = v + b, where b is some fixed nonzero vector, the origin gets shifted to b instead of staying at zero. That makes translation an affine transformation, not a linear one. Every linear transformation is affine, but not every affine transformation is linear.

What It Looks Like Geometrically

The mathematician Grant Sanderson (3Blue1Brown) offers a useful visual rule: a transformation is linear if all straight lines remain straight and the origin stays fixed. Picture an entire grid of evenly spaced lines overlaid on a plane. When you apply a linear transformation, those grid lines can stretch, rotate, squish, or skew, but they never curve and they stay parallel and evenly spaced. The moment lines bend or the origin shifts, you’ve left the world of linear transformations.

This means operations like rotation, scaling, reflection, and shearing are all linear. A 2D rotation by an angle θ spins every point around the origin while keeping all distances and grid structure intact. A scaling transformation stretches or compresses along one or more axes. A reflection flips the plane across a line through the origin. In every case, straight lines remain straight and the origin doesn’t move.

Every Linear Transformation Is a Matrix

One of the most important results in linear algebra is that every linear transformation between finite-dimensional vector spaces can be represented as multiplication by a unique matrix. If T maps vectors in n-dimensional space to vectors in m-dimensional space, there exists an m×n matrix A such that T(x) = Ax for every input x. This matrix A is called the standard matrix of T.

Finding that matrix is surprisingly straightforward. You feed each standard basis vector (the vectors with a 1 in one position and 0s everywhere else) into the transformation. Each output becomes a column of the matrix. For a transformation on 2D space, you only need to know what T does to the two basis vectors (1, 0) and (0, 1), and the entire transformation is fully determined.

This works because of the two linearity rules. Any vector can be written as a combination of basis vectors, and linearity guarantees you can “distribute” the transformation across that combination. So knowing what happens to a handful of basis vectors tells you what happens to every vector in the space. This is why matrix multiplication and linear transformation are essentially the same idea in finite dimensions.

Common Examples With Matrices

A 2D rotation by angle θ has the standard matrix with cosθ and sinθ arranged so that every point swings around the origin by exactly θ degrees. The first column is (cosθ, sinθ) and the second is (−sinθ, cosθ). Plug in θ = 90° and you get a matrix that rotates every vector a quarter turn counterclockwise.

Scaling along different axes uses a diagonal matrix. If you want to stretch horizontally by a factor of 3 and vertically by a factor of 2, you place 3 and 2 on the diagonal with zeros elsewhere. Uniform scaling (the same factor in every direction) just puts the same number in every diagonal entry. A reflection matrix looks similar to a rotation matrix, but its determinant is negative, which captures the “flipping” nature of the transformation.

Kernel and Image

Two subsets attached to every linear transformation reveal its behavior in important ways. The kernel (also called the null space) is the set of all input vectors that the transformation sends to the zero vector. Think of it as everything that gets “crushed” to nothing. If the kernel contains only the zero vector itself, the transformation is one-to-one, meaning no two different inputs produce the same output.

The image (also called the range) is the set of all possible outputs. If T maps from a 5-dimensional space to a 3-dimensional space, the image is some subspace within that 3-dimensional space, and it tells you which output vectors are actually reachable. Both the kernel and the image are themselves vector spaces, which makes them much easier to analyze than arbitrary sets of vectors.

These two pieces are connected by the rank-nullity theorem: the dimension of the kernel plus the dimension of the image always equals the dimension of the input space. A transformation that crushes more of the input space (larger kernel) necessarily has a smaller range of outputs, and vice versa.

Related Terminology

You’ll encounter several terms that all refer to the same core idea. “Linear transformation,” “linear map,” and “linear mapping” are interchangeable in virtually every textbook. A linear operator is a linear transformation where the input and output spaces are the same, like a rotation of 3D space back into 3D space. In abstract algebra, a linear transformation is also called a vector space homomorphism because it preserves the structure of vector addition and scalar multiplication. If it’s also invertible (nothing in the kernel except zero, and the image covers the entire output space), it’s called an isomorphism.

A linear functional is the special case where the output is a single number rather than a vector. The collection of all linear functionals on a space forms its own vector space, called the dual space, which becomes important in more advanced courses.

Where Linear Transformations Show Up

Computer graphics relies on linear transformations constantly. Every time a 3D model is rotated on screen, scaled to fit a viewport, or reflected across a plane, the operation is a matrix multiplication applied to thousands of vertex coordinates. Graphics pipelines chain these transformations together by multiplying their matrices, so a single combined matrix can rotate, scale, and project an object in one step.

In machine learning, each layer of a neural network applies a linear transformation (matrix multiplication) to its input, then passes the result through a nonlinear activation function. The linear part is where the model’s learnable parameters live, stored as matrix entries that get adjusted during training. Without the nonlinear step between layers, stacking multiple linear transformations would just collapse into a single matrix, which is why activation functions are essential for building deep networks.

Signal processing, quantum mechanics, and statistics all lean on linear transformations as well. The Fourier transform that decomposes a signal into frequencies is linear. Quantum states evolve through linear operators. Principal component analysis in statistics uses linear maps to reduce high-dimensional data to a smaller number of meaningful dimensions. Once you recognize the pattern of additivity and homogeneity, you start seeing it across nearly every quantitative field.