Linear Transformations

Functions between vector spaces that preserve addition and scaling — and why every such function is represented by a matrix.

A 2 by 2 matrix is determined by where it sends the two basis vectors
T(e1)T(e2)
[ 0.81 -0.59 ]
[ 0.59 0.81 ]

The red and green arrows are the columns of the matrix. Once those are known, every point in the plane follows.

Definition

A linear transformation (or linear map) is a function T:V→WT: V \to W between vector spaces that preserves addition and scalar multiplication:

  1. T(u+v)=T(u)+T(v)T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v}) (additivity)
  2. T(cu)=c⋅T(u)T(c\mathbf{u}) = c \cdot T(\mathbf{u}) (homogeneity)

Equivalently: T(au+bv)=aT(u)+bT(v)T(a\mathbf{u} + b\mathbf{v}) = aT(\mathbf{u}) + bT(\mathbf{v}).

Every linear transformation from Rn\mathbb{R}^n to Rm\mathbb{R}^m can be represented as multiplication by a matrix AA: T(x)=AxT(\mathbf{x}) = A\mathbf{x}.

Key properties
  • T(0)=0T(\mathbf{0}) = \mathbf{0} always — a necessary (but not sufficient) condition for linearity
  • Linear transformations preserve straight lines, the origin, and parallelism
  • The composition of two linear transformations is itself linear
  • A linear transformation is fully determined by its effect on any basis of the domain
Common mistakes
  • Confusing linear with affine: translations, and any "+c+c" shift, are not linear transformations — they fail T(0)=0T(\mathbf{0})=\mathbf{0}
  • Assuming linearity from one test point: checking T(0)=0T(\mathbf{0})=\mathbf{0} alone isn't enough — both additivity and homogeneity must hold for every input
2D transformations
  • Rotation by Îļ\theta: (cos⁥Îļ−sin⁥Îļsin⁥Îļcos⁥Îļ)\begin{pmatrix}\cos\theta & -\sin\theta\\\sin\theta & \cos\theta\end{pmatrix}
  • Scaling: (sx00sy)\begin{pmatrix}s_x & 0\\ 0 & s_y\end{pmatrix}
  • Reflection across x-axis: (100−1)\begin{pmatrix}1&0\\0&-1\end{pmatrix}
  • Projection onto x-axis: (1000)\begin{pmatrix}1&0\\0&0\end{pmatrix}

Each is a linear transformation with its matrix representation.

Try it

Is the function T(x,y)=(x+1,y)T(x, y) = (x + 1, y) (translation by 1 in the x direction) a linear transformation? Why or why not?

Solution

No. Additivity fails: T(u+v)=(u1+v1+1,u2+v2)T(\mathbf{u}+\mathbf{v}) = (u_1+v_1+1, u_2+v_2), but T(u)+T(v)=(u1+1+v1+1,u2+v2)=(u1+v1+2,u2+v2)T(\mathbf{u})+T(\mathbf{v}) = (u_1+1+v_1+1, u_2+v_2) = (u_1+v_1+2, u_2+v_2). These differ.

Also: T(0)=(1,0)≠0T(\mathbf{0}) = (1, 0) \neq \mathbf{0}, which violates a necessary condition (T(0)=0T(\mathbf{0}) = \mathbf{0} for any linear transformation).

Translations are affine transformations, not linear. In homogeneous coordinates, T(x,y)=(x+1,y)T(x,y) = (x+1,y) can be represented linearly as (x,y,1)â†Ķ(x+1,y,1)(x,y,1) \mapsto (x+1,y,1) — extending the space by one dimension.

Related concepts