Home / LA 101 / Module 2 / Lesson 3
Stories Mode

Linear Transformations

Matrices as functions on space — rotation, scaling, reflection, and projection revealed through the geometry of matrix multiplication.

~11 min read M2 · L3 Intermediate

Matrices Are Functions

In the previous lessons, we learned how to organize data in matrices and perform operations like addition and multiplication. Now we make a conceptual leap: every matrix is a function. Specifically, it is a linear transformation — a function that maps vectors to vectors in a way that preserves the algebraic structure of the vector space.

When you multiply a matrix A by a vector x, you are not just doing arithmetic — you are applying a geometric transformation to the vector. The matrix A "moves" x to a new location in space: Ax is the image of x under the transformation.

Definition: What Makes a Transformation Linear?

A function T from ℝⁿ to ℝᵐ is called a linear transformation if it satisfies two properties for all vectors u, v ∈ ℝⁿ and all scalars c:

These two properties can be combined into a single statement: T(αu + βv) = αT(u) + βT(v) for all scalars α, β. This says that T commutes with linear combinations.

Geometric Intuition

A linear transformation is one that maps lines to lines (or possibly collapses them to points), keeps the origin fixed, and preserves parallelism. Straight lines remain straight. Grid lines remain parallel and evenly spaced (though perhaps rotated or scaled). Non-linear deformations — like bending or twisting — are not allowed.

Every Matrix Is a Linear Transformation

The fundamental theorem connecting matrices and linear transformations:

Matrix-Vector Product
T(\mathbf{x})=A\mathbf{x}
Every m×n matrix A defines a linear transformation T: ℝⁿ → ℝᵐ by T(x) = Ax. Conversely, every linear transformation from ℝⁿ to ℝᵐ can be represented by an m×n matrix. Matrices and linear transformations are two descriptions of the same mathematical object.

Reading a Transformation from Its Matrix

Here is the key insight: the columns of A are the images of the standard basis vectors. In ℝ², the standard basis vectors are e₁ = [1, 0]ᵀ and e₂ = [0, 1]ᵀ. If A = [a₁ | a₂], then:

Once you know where the basis vectors go, you know where everything goes — because any vector is a linear combination of basis vectors, and T must preserve linear combinations.

Common 2D Transformations

Rotation (θ CCW)
[[cosθ, −sinθ], [sinθ, cosθ]]
Rotates every vector counterclockwise by angle θ. det = 1.
Scaling
[[a, 0], [0, d]]
Stretches x-axis by a, y-axis by d. det = ad.
Reflection (x-axis)
[[1, 0], [0, −1]]
Flips the plane vertically. det = −1.
Horizontal Shear
[[1, k], [0, 1]]
Slants the plane rightward. det = 1.
Projection (x-axis)
[[1, 0], [0, 0]]
Collapses y-component to 0. det = 0.
Identity
[[1, 0], [0, 1]]
Maps every vector to itself. det = 1.

The Rotation Matrix

The rotation matrix is among the most beautiful in linear algebra. To rotate e₁ = [1,0]ᵀ counterclockwise by θ, it lands at [cosθ, sinθ]ᵀ. To rotate e₂ = [0,1]ᵀ, it lands at [−sinθ, cosθ]ᵀ. Putting these as columns:

Rotation Matrix
R_\theta=\begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix}
Note: det(Rθ) = cos²θ + sin²θ = 1 for all θ. Rotation never changes the area or volume — it just reorients the space. Also Rθᵀ = Rθ⁻¹ = R−θ: the transpose of a rotation matrix is its inverse. Matrices with this property are called orthogonal.

Composition: Matrix Multiplication is Function Composition

Suppose you want to apply transformation A first, then transformation B. In function notation, this is B(A(x)) = (B∘A)(x). In matrix notation, this is simply (BA)x. Matrix multiplication encodes the composition of transformations.

This gives geometric meaning to matrix multiplication. For example:

The rightmost matrix in a product is applied first. In BA, A is applied first, then B. This is why matrix multiplication is not commutative in general: AB ≠ BA because "do A then B" is generally different from "do B then A".

Invertible Transformations and the Determinant

A linear transformation T is invertible if there exists another transformation T⁻¹ such that T⁻¹(T(x)) = x for all x. Geometrically: T is invertible if and only if it doesn't "collapse" space — it maps distinct inputs to distinct outputs, with no information loss.

The algebraic criterion is the determinant:

2×2 Determinant
\det\begin{pmatrix}a&b\\c&d\end{pmatrix}=ad-bc
The determinant |det(A)| measures the factor by which A scales areas (in 2D) or volumes (3D). If det(A) > 0, orientation is preserved. If det(A) < 0, orientation is reversed (a reflection component). If det(A) = 0, space collapses into a lower dimension — the transformation is not invertible.

Examples of determinants for our common transformations:

Applications of Linear Transformations

Linear transformations appear everywhere in applied mathematics:


Key Takeaways

Every matrix represents a linear transformation: a function on vectors that preserves addition and scalar multiplication. The columns of a matrix reveal where the standard basis vectors go under the transformation. Rotation, scaling, reflection, shear, and projection are all linear transformations with explicit matrix forms. Matrix multiplication is composition of transformations — the rightmost matrix acts first. The determinant measures how areas are scaled: det = 0 means the transformation collapses space (singular/not invertible), |det| = 1 means it preserves area.