Linear Algebra · Undergraduate

Linear Transformations and Their Matrices

Quick answer

A transformation T from ℝⁿ to ℝᵐ is linear when T(u + v) = T(u) + T(v) and T(cu) = cT(u) for all vectors and scalars. Linear transformations send the zero vector to zero and preserve every linear combination. Because each vector is a combination of the standard basis vectors, T is decided by where it sends e₁ through eₙ, and placing those images side by side gives its standard matrix. Pivots of that matrix then tell whether T is one-to-one and whether it is onto.

What you'll learn

  • Test whether a transformation is linear
  • Build the standard matrix of a linear transformation
  • Write rotations, reflections and projections as matrices
  • Decide whether a transformation is one-to-one or onto

Functions that respect the structure

A transformation TT from ℝⁿ to ℝᵐ assigns an output vector T(x)T(\mathbf{x}) in ℝᵐ to every input x\mathbf{x} in ℝⁿ. Most such functions scramble vectors arbitrarily. The ones that matter here respect the two operations of vector algebra.

TT is linear when, for all vectors u\mathbf{u}, v\mathbf{v} and every scalar cc, T(u+v)=T(u)+T(v)T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v}) and T(cu)=cT(u)T(c\mathbf{u}) = cT(\mathbf{u}).

Two consequences come at once. Taking c=0c = 0 gives T(0)=0T(\mathbf{0}) = \mathbf{0}: a linear transformation fixes the origin. And applying both rules repeatedly,

T(c1v1+⋯+ckvk)=c1T(v1)+⋯+ckT(vk)T(c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k) = c_1T(\mathbf{v}_1) + \cdots + c_kT(\mathbf{v}_k)

A linear transformation preserves every linear combination.

Why every linear transformation is a matrix

Any x\mathbf{x} in ℝⁿ is a combination of the standard basis vectors: x=x1e1+⋯+xnen\mathbf{x} = x_1\mathbf{e}_1 + \cdots + x_n\mathbf{e}_n. Linearity then gives

T(x)=x1T(e1)+⋯+xnT(en)T(\mathbf{x}) = x_1T(\mathbf{e}_1) + \cdots + x_nT(\mathbf{e}_n)

That right side combines the vectors T(ej)T(\mathbf{e}_j) with the entries of x\mathbf{x} as coefficients. That is exactly how a matrix times a vector is defined. A linear transformation is decided by where it sends e1\mathbf{e}_1 through en\mathbf{e}_n, and those images, placed side by side, are its matrix:

A=[T(e1)T(e2)⋯T(en)]T(x)=AxA = \begin{bmatrix} T(\mathbf{e}_1) & T(\mathbf{e}_2) & \cdots & T(\mathbf{e}_n) \end{bmatrix} \qquad T(\mathbf{x}) = A\mathbf{x}

This AA is the standard matrix of TT. Conversely, x↦Ax\mathbf{x} \mapsto A\mathbf{x} is linear for any matrix, so linear transformations and matrices are two descriptions of the same thing.

The unit square under T with T(e₁) = (2, 1) and T(e₂) = (−1, 1) The unit square with corners (0, 0), (1, 0), (1, 1) and (0, 1), and its image, a dashed parallelogram with corners (0, 0), (2, 1), (1, 2) and (−1, 1). The images of e₁ and e₂ are the columns of the standard matrix [[2, −1], [1, 1]]. square -112312xy T(e₁) T(e₂)
The unit square under T with T(e₁) = (2, 1) and T(e₂) = (−1, 1)

One-to-one and onto

Two questions come up for every transformation, and the pivots of AA answer both.

  • TT is one-to-one when different inputs always give different outputs. That happens exactly when Ax=0A\mathbf{x} = \mathbf{0} has only the trivial solution: a pivot in every column.
  • TT is onto ℝᵐ when every vector in ℝᵐ is an output. That happens exactly when the columns of AA span ℝᵐ: a pivot in every row.

For the TT in Example 1, the matrix has two pivots in two rows but three columns. It is onto ℝ² but not one-to-one; for instance T(−2,1,0)=(0,0)=T(0)T(-2, 1, 0) = (0, 0) = T(\mathbf{0}).

Worked examples

Common mistakes

Practice problems

  1. Find the standard matrix of T(x,y)=(3x−y, x+4y)T(x, y) = (3x - y,\ x + 4y).

    Answer

    [3−114]\begin{bmatrix} 3 & -1\\ 1 & 4 \end{bmatrix}

    Full solution

    T(e1)=(3,1)T(\mathbf{e}_1) = (3, 1) and T(e2)=(−1,4)T(\mathbf{e}_2) = (-1, 4) become the columns.

  2. A linear TT has T(e1)=(1,4)T(\mathbf{e}_1) = (1, 4) and T(e2)=(2,−1)T(\mathbf{e}_2) = (2, -1). Find T(3,2)T(3, 2).

    Answer

    (7,10)(7, 10)

    Full solution

    T(3,2)=3T(e1)+2T(e2)=(3,12)+(4,−2)T(3, 2) = 3T(\mathbf{e}_1) + 2T(\mathbf{e}_2) = (3, 12) + (4, -2).

  3. Find the matrix that reflects the plane across the xx-axis, and apply it to (4,5)(4, 5).

    Answer

    [100−1]\begin{bmatrix} 1 & 0\\ 0 & -1 \end{bmatrix}; (4,−5)(4, -5)

    Full solution

    e1\mathbf{e}_1 stays put and e2\mathbf{e}_2 flips to (0,−1)(0, -1).

  4. Is T(x,y)=(x+y, 2)T(x, y) = (x + y,\ 2) linear?

    Answer

    No

    Full solution

    T(0,0)=(0,2)T(0, 0) = (0, 2), not the zero vector.

  5. Find the standard matrix of T(x,y)=(x, y, x+y)T(x, y) = (x,\ y,\ x + y) from ℝ² to ℝ³. Is TT one-to-one?

    Answer

    [100111]\begin{bmatrix} 1 & 0\\ 0 & 1\\ 1 & 1 \end{bmatrix}; yes

    Full solution

    The columns are T(e1)=(1,0,1)T(\mathbf{e}_1) = (1, 0, 1) and T(e2)=(0,1,1)T(\mathbf{e}_2) = (0, 1, 1). Both columns hold pivots, so the transformation is one-to-one.

  6. Is the transformation in exercise 5 onto ℝ³?

    Answer

    No

    Full solution

    A 3×23 \times 2 matrix has at most two pivots, so one of its three rows has none. Two vectors cannot span ℝ³.

  7. What single matrix rotates the plane by 90°90° four times in a row?

    Answer

    The identity matrix

    Full solution

    Four quarter turns make a full turn, which moves nothing. As a check, R2=−IR^2 = -I, so R4=(−I)2=IR^4 = (-I)^2 = I.

  8. A linear TT sends (1,1)(1, 1) to (3,0)(3, 0) and (1,−1)(1, -1) to (1,2)(1, 2). Find T(e1)T(\mathbf{e}_1).

    Hint

    Write e1\mathbf{e}_1 as a combination of (1,1)(1, 1) and (1,−1)(1, -1).

    Answer

    (2,1)(2, 1)

    Full solution

    e1=12(1,1)+12(1,−1)\mathbf{e}_1 = \tfrac{1}{2}(1, 1) + \tfrac{1}{2}(1, -1), so T(e1)=12(3,0)+12(1,2)=(2,1)T(\mathbf{e}_1) = \tfrac{1}{2}(3, 0) + \tfrac{1}{2}(1, 2) = (2, 1).

  9. A linear transformation from ℝ⁵ to ℝ³ has a standard matrix with three pivots. Is it one-to-one? Onto?

    Answer

    Onto, but not one-to-one

    Full solution

    Three pivots fill all three rows, so the columns span ℝ³. Five columns with three pivots leave two free variables, so nonzero inputs reach 0\mathbf{0}.

  10. For T(x,y)=(x+2y, 3x)T(x, y) = (x + 2y,\ 3x), a student finds T(e1)=(1,3)T(\mathbf{e}_1) = (1, 3) and T(e2)=(2,0)T(\mathbf{e}_2) = (2, 0), writes them as rows, and gets [1320]\begin{bmatrix} 1 & 3\\ 2 & 0 \end{bmatrix}. What went wrong?

    Hint

    Multiply the student’s matrix by e1\mathbf{e}_1.

    Answer

    The images belong in columns: [1230]\begin{bmatrix} 1 & 2\\ 3 & 0 \end{bmatrix}.

    Full solution

    The student’s matrix sends (1,0)(1, 0) to its first column, (1,2)(1, 2), but T(1,0)=(1,3)T(1, 0) = (1, 3). Rows give the transpose, a different transformation. With the images as columns, the matrix sends e1\mathbf{e}_1 to (1,3)(1, 3) and e2\mathbf{e}_2 to (2,0)(2, 0), as it must.

Frequently asked questions

What makes a transformation linear?

It must satisfy T(u + v) = T(u) + T(v) and T(cu) = cT(u) for every pair of vectors and every scalar. Together these say T preserves linear combinations.

What is the standard matrix of a linear transformation?

The matrix whose columns are T(e₁), …, T(eₙ). Multiplying by it does exactly what T does.

Is a translation linear?

No. A linear transformation sends 0 to 0, and a translation moves the origin.

When is a linear transformation one-to-one?

When its standard matrix has a pivot in every column, so the columns are independent and Ax = 0 has only the trivial solution.

When is a linear transformation onto?

When its standard matrix has a pivot in every row, so the columns span the whole target space ℝᵐ.

What to learn next