About

1.8 Introduction to Linear Transformations

Theory: Introduction to Linear Transformations

Transformations (Lay §1.8)

A transformation (function, mapping) TT from Rn\mathbb{R}^n to Rm\mathbb{R}^m, written T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m, assigns to each x\mathbf{x} in Rn\mathbb{R}^n a vector T(x)T(\mathbf{x}) in Rm\mathbb{R}^m.

Range⁡(T)={ T(x)⏟image∈Rm⏟codomain  :  x∈Rn⏟domain }\operatorname{Range}(T) = \{\, \underbrace{T(\mathbf{x})}_{\text{image}} \in \underbrace{\mathbb{R}^m}_{\text{codomain}} \;:\; \mathbf{x} \in \underbrace{\mathbb{R}^n}_{\text{domain}} \,\}

Matrix transformations

If AA is m×nm \times n, then T(x)=AxT(\mathbf{x}) = A\mathbf{x} defines T:Rn→RmT: \mathbb{R}^n \to \mathbb{R}^m (number of columns = input size, number of rows = output size). The range of TT is the set of all linear combinations of the columns of AA, i.e. the span of the columns.

How to translate the typical questions about T(x)=AxT(\mathbf{x}) = A\mathbf{x}:

QuestionBecomes
Find the image of u\mathbf{u}compute AuA\mathbf{u}
Find x\mathbf{x} whose image is b\mathbf{b}solve Ax=bA\mathbf{x} = \mathbf{b} (row reduce [A b][A \ \mathbf{b}])
Is there more than one such x\mathbf{x}?does Ax=bA\mathbf{x} = \mathbf{b} have free variables? (unique?)
Is c\mathbf{c} in the range of TT?is Ax=cA\mathbf{x} = \mathbf{c} consistent?

Linear Transformations

Definition (Lay §1.8): A transformation TT is linear if

  1. T(u+v)=T(u)+T(v)T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v}) for all u,v\mathbf{u}, \mathbf{v} in the domain of TT;
  2. T(cu)=cT(u)T(c\mathbf{u}) = cT(\mathbf{u}) for all scalars cc and all u\mathbf{u} in the domain of TT.

Every matrix transformation is linear (because A(u+v)=Au+AvA(\mathbf{u} + \mathbf{v}) = A\mathbf{u} + A\mathbf{v} and A(cu)=cAuA(c\mathbf{u}) = cA\mathbf{u}). Consequences of the definition:

T(0)=0T(cu+dv)=cT(u)+dT(v)T(\mathbf{0}) = \mathbf{0} \qquad\qquad T(c\mathbf{u} + d\mathbf{v}) = cT(\mathbf{u}) + dT(\mathbf{v})

and more generally T(c1v1+⋯+cpvp)=c1T(v1)+⋯+cpT(vp)T(c_1\mathbf{v}_1 + \cdots + c_p\mathbf{v}_p) = c_1T(\mathbf{v}_1) + \cdots + c_pT(\mathbf{v}_p) (the superposition principle). In words: a linear transformation preserves linear combinations. So if you know TT on a few vectors, you know it on every combination of them (see Exercise 3 below).

Quick “not linear” test: if T(0)≠0T(\mathbf{0}) \ne \mathbf{0}, then TT is not linear. For example T(x1,x2)=(x1+1,x2)T(x_1, x_2) = (x_1 + 1, x_2) sends 0\mathbf{0} to (1,0)(1, 0), so it is not linear. (The converse fails: T(0)=0T(\mathbf{0}) = \mathbf{0} alone does not prove linearity.)


Solved Examples (Textbook Questions)

Exercise 1

(Adapted from Lay §1.8, Example 1)

Let A=[1−335−17]A = \begin{bmatrix} 1 & -3 \\ 3 & 5 \\ -1 & 7 \end{bmatrix}, u=[2−1]\mathbf{u} = \begin{bmatrix} 2 \\ -1 \end{bmatrix}, b=[32−5]\mathbf{b} = \begin{bmatrix} 3 \\ 2 \\ -5 \end{bmatrix}, c=[325]\mathbf{c} = \begin{bmatrix} 3 \\ 2 \\ 5 \end{bmatrix}, and define T:R2→R3T: \mathbb{R}^2 \to \mathbb{R}^3 by T(x)=AxT(\mathbf{x}) = A\mathbf{x}.

(a) Find T(u)T(\mathbf{u}). (b) Find an x\mathbf{x} whose image under TT is b\mathbf{b}. (c) Is there more than one such x\mathbf{x}? (d) Is c\mathbf{c} in the range of TT?

Show solution ↓
Solution

Translate first: (b) T(x)=bT(\mathbf{x}) = \mathbf{b} means solve Ax=bA\mathbf{x} = \mathbf{b}; (c) asks is that solution unique?; (d) asks is Ax=cA\mathbf{x} = \mathbf{c} consistent?

(a)

T(u)=Au=[1−335−17][2−1]=[2+36−5−2−7]=[51−9]T(\mathbf{u}) = A\mathbf{u} = \begin{bmatrix} 1 & -3 \\ 3 & 5 \\ -1 & 7 \end{bmatrix}\begin{bmatrix} 2 \\ -1 \end{bmatrix} = \begin{bmatrix} 2 + 3 \\ 6 - 5 \\ -2 - 7 \end{bmatrix} = \begin{bmatrix} 5 \\ 1 \\ -9 \end{bmatrix}

(b) Row reduce [A b][A \ \mathbf{b}]: R2←R2−3R1R_2 \leftarrow R_2 - 3R_1, R3←R3+R1R_3 \leftarrow R_3 + R_1; then R2←114R2R_2 \leftarrow \tfrac{1}{14}R_2, R3←R3−4R2R_3 \leftarrow R_3 - 4R_2; then R1←R1+3R2R_1 \leftarrow R_1 + 3R_2:

[1−33352−17−5]∼[1−33014−704−2]∼[1−3301−0.5000]∼[101.501−0.5000]\left[\begin{array}{cc|c} 1 & -3 & 3 \\ 3 & 5 & 2 \\ -1 & 7 & -5 \end{array}\right] \sim \left[\begin{array}{cc|c} 1 & -3 & 3 \\ 0 & 14 & -7 \\ 0 & 4 & -2 \end{array}\right] \sim \left[\begin{array}{cc|c} 1 & -3 & 3 \\ 0 & 1 & -0.5 \\ 0 & 0 & 0 \end{array}\right] \sim \left[\begin{array}{cc|c} 1 & 0 & 1.5 \\ 0 & 1 & -0.5 \\ 0 & 0 & 0 \end{array}\right]

So x=[1.5−0.5]\mathbf{x} = \begin{bmatrix} 1.5 \\ -0.5 \end{bmatrix}.

(c) Both columns have pivots → no free variables → the solution is unique. Exactly one x\mathbf{x} maps to b\mathbf{b}.

(d) Row reduce [A c][A \ \mathbf{c}] (same first step, then swap R2↔R3R_2 \leftrightarrow R_3 and scale the new R2R_2 by 14\tfrac14, then R3←R3−14R2R_3 \leftarrow R_3 - 14R_2):

[1−33352−175]∼[1−33014−7048]∼[1−33012014−7]∼[1−3301200−35]\left[\begin{array}{cc|c} 1 & -3 & 3 \\ 3 & 5 & 2 \\ -1 & 7 & 5 \end{array}\right] \sim \left[\begin{array}{cc|c} 1 & -3 & 3 \\ 0 & 14 & -7 \\ 0 & 4 & 8 \end{array}\right] \sim \left[\begin{array}{cc|c} 1 & -3 & 3 \\ 0 & 1 & 2 \\ 0 & 14 & -7 \end{array}\right] \sim \left[\begin{array}{cc|c} 1 & -3 & 3 \\ 0 & 1 & 2 \\ 0 & 0 & -35 \end{array}\right]

Row 3 says 0=−350 = -35 → inconsistent → c\mathbf{c} is not in the range of TT. (So TT is not onto R3\mathbb{R}^3 — as expected for a 3×23 \times 2 matrix.)

Exercise 2

(Adapted from Lay §1.8, Exercises 3–6)

With TT defined by T(x)=AxT(\mathbf{x}) = A\mathbf{x}, find a vector x\mathbf{x} whose image under TT is b\mathbf{b}, and determine whether x\mathbf{x} is unique.

3. A=[10−2−2163−2−5], b=[−17−3]A = \begin{bmatrix} 1 & 0 & -2 \\ -2 & 1 & 6 \\ 3 & -2 & -5 \end{bmatrix}, \ \mathbf{b} = \begin{bmatrix} -1 \\ 7 \\ -3 \end{bmatrix} \qquad 4. A=[1−3201−43−5−9], b=[6−7−9]A = \begin{bmatrix} 1 & -3 & 2 \\ 0 & 1 & -4 \\ 3 & -5 & -9 \end{bmatrix}, \ \mathbf{b} = \begin{bmatrix} 6 \\ -7 \\ -9 \end{bmatrix}

5. A=[1−5−7−375], b=[−2−2]A = \begin{bmatrix} 1 & -5 & -7 \\ -3 & 7 & 5 \end{bmatrix}, \ \mathbf{b} = \begin{bmatrix} -2 \\ -2 \end{bmatrix} \qquad 6. A=[1−213−45011−35−4], b=[193−6]A = \begin{bmatrix} 1 & -2 & 1 \\ 3 & -4 & 5 \\ 0 & 1 & 1 \\ -3 & 5 & -4 \end{bmatrix}, \ \mathbf{b} = \begin{bmatrix} 1 \\ 9 \\ 3 \\ -6 \end{bmatrix}

Show solution ↓
Solution

In every part: row reduce [A b][A \ \mathbf{b}] to reduced echelon form; unique iff no free variables.

3. R2←R2+2R1R_2 \leftarrow R_2 + 2R_1, R3←R3−3R1R_3 \leftarrow R_3 - 3R_1; then R3←R3+2R2R_3 \leftarrow R_3 + 2R_2; then R3←15R3R_3 \leftarrow \tfrac15 R_3 and back-substitute (R2←R2−2R3R_2 \leftarrow R_2 - 2R_3, R1←R1+2R3R_1 \leftarrow R_1 + 2R_3):

[10−2−1−21673−2−5−3]∼[10−2−101250−210]∼[10−2−1012500510]∼[100301010012]\left[\begin{array}{ccc|c} 1 & 0 & -2 & -1 \\ -2 & 1 & 6 & 7 \\ 3 & -2 & -5 & -3 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 0 & -2 & -1 \\ 0 & 1 & 2 & 5 \\ 0 & -2 & 1 & 0 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 0 & -2 & -1 \\ 0 & 1 & 2 & 5 \\ 0 & 0 & 5 & 10 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 0 & 0 & 3 \\ 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 2 \end{array}\right]

x=(3,1,2)\mathbf{x} = (3, 1, 2), unique (pivot in every column).

4. R3←R3−3R1R_3 \leftarrow R_3 - 3R_1; then R3←R3−4R2R_3 \leftarrow R_3 - 4R_2; then back-substitute (R2←R2+4R3R_2 \leftarrow R_2 + 4R_3, R1←R1−2R3R_1 \leftarrow R_1 - 2R_3, then R1←R1+3R2R_1 \leftarrow R_1 + 3R_2):

[1−32601−4−73−5−9−9]∼[1−32601−4−704−15−27]∼[1−32601−4−70011]∼[100−5010−30011]\left[\begin{array}{ccc|c} 1 & -3 & 2 & 6 \\ 0 & 1 & -4 & -7 \\ 3 & -5 & -9 & -9 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & -3 & 2 & 6 \\ 0 & 1 & -4 & -7 \\ 0 & 4 & -15 & -27 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & -3 & 2 & 6 \\ 0 & 1 & -4 & -7 \\ 0 & 0 & 1 & 1 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 0 & 0 & -5 \\ 0 & 1 & 0 & -3 \\ 0 & 0 & 1 & 1 \end{array}\right]

x=(−5,−3,1)\mathbf{x} = (-5, -3, 1), unique.

5. R2←R2+3R1R_2 \leftarrow R_2 + 3R_1 gives (0,−8,−16∣−8)(0, -8, -16 \mid -8); R2←−18R2R_2 \leftarrow -\tfrac18 R_2; R1←R1+5R2R_1 \leftarrow R_1 + 5R_2:

[1−5−7−2−375−2]∼[1−5−7−20121]∼[10330121]\left[\begin{array}{ccc|c} 1 & -5 & -7 & -2 \\ -3 & 7 & 5 & -2 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & -5 & -7 & -2 \\ 0 & 1 & 2 & 1 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 0 & 3 & 3 \\ 0 & 1 & 2 & 1 \end{array}\right]

Write the equations: x1+3x3=3x_1 + 3x_3 = 3, x2+2x3=1x_2 + 2x_3 = 1, x3x_3 free. So

x=[3−3x31−2x3x3]=[310]+x3[−3−21]\mathbf{x} = \begin{bmatrix} 3 - 3x_3 \\ 1 - 2x_3 \\ x_3 \end{bmatrix} = \begin{bmatrix} 3 \\ 1 \\ 0 \end{bmatrix} + x_3\begin{bmatrix} -3 \\ -2 \\ 1 \end{bmatrix}

One choice (x3=0x_3 = 0): x=(3,1,0)\mathbf{x} = (3, 1, 0). Not unique — x3x_3 is free (as must happen for a 2×32 \times 3 matrix).

A solution is not (3,1)(3, 1)! TT eats vectors in R3\mathbb{R}^3, so x\mathbf{x} needs 3 entries. Always write out the equations and solve for the basic variables.

6. R2←R2−3R1R_2 \leftarrow R_2 - 3R_1, R4←R4+3R1R_4 \leftarrow R_4 + 3R_1:

[1−2113−4590113−35−4−6]∼[1−211022601130−1−1−3]∼[1037011300000000]\left[\begin{array}{ccc|c} 1 & -2 & 1 & 1 \\ 3 & -4 & 5 & 9 \\ 0 & 1 & 1 & 3 \\ -3 & 5 & -4 & -6 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & -2 & 1 & 1 \\ 0 & 2 & 2 & 6 \\ 0 & 1 & 1 & 3 \\ 0 & -1 & -1 & -3 \end{array}\right] \sim \left[\begin{array}{ccc|c} 1 & 0 & 3 & 7 \\ 0 & 1 & 1 & 3 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right]

(Second step: R2←12R2R_2 \leftarrow \tfrac12 R_2, then R3←R3−R2R_3 \leftarrow R_3 - R_2, R4←R4+R2R_4 \leftarrow R_4 + R_2, R1←R1+2R2R_1 \leftarrow R_1 + 2R_2.) So x1=7−3x3x_1 = 7 - 3x_3, x2=3−x3x_2 = 3 - x_3, x3x_3 free:

x=[730]+x3[−3−11]\mathbf{x} = \begin{bmatrix} 7 \\ 3 \\ 0 \end{bmatrix} + x_3\begin{bmatrix} -3 \\ -1 \\ 1 \end{bmatrix}

One choice: x=(7,3,0)\mathbf{x} = (7, 3, 0). Not unique.

Exercise 3

(Adapted from Lay §1.8, Exercises 17, 19, 20)

17. T:R2→R2T: \mathbb{R}^2 \to \mathbb{R}^2 is linear and maps u=[52]\mathbf{u} = \begin{bmatrix} 5 \\ 2 \end{bmatrix} into [21]\begin{bmatrix} 2 \\ 1 \end{bmatrix} and v=[13]\mathbf{v} = \begin{bmatrix} 1 \\ 3 \end{bmatrix} into [−13]\begin{bmatrix} -1 \\ 3 \end{bmatrix}. Find the images of 3u3\mathbf{u}, 2v2\mathbf{v}, and 3u+2v3\mathbf{u} + 2\mathbf{v}.

19. Let e1=[10]\mathbf{e}_1 = \begin{bmatrix} 1 \\ 0 \end{bmatrix}, e2=[01]\mathbf{e}_2 = \begin{bmatrix} 0 \\ 1 \end{bmatrix}, y1=[25]\mathbf{y}_1 = \begin{bmatrix} 2 \\ 5 \end{bmatrix}, y2=[−16]\mathbf{y}_2 = \begin{bmatrix} -1 \\ 6 \end{bmatrix}, and let T:R2→R2T: \mathbb{R}^2 \to \mathbb{R}^2 be linear with T(e1)=y1T(\mathbf{e}_1) = \mathbf{y}_1, T(e2)=y2T(\mathbf{e}_2) = \mathbf{y}_2. Find the images of [5−3]\begin{bmatrix} 5 \\ -3 \end{bmatrix} and [x1x2]\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}.

20. Let x=[x1x2]\mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}, v1=[−25]\mathbf{v}_1 = \begin{bmatrix} -2 \\ 5 \end{bmatrix}, v2=[7−3]\mathbf{v}_2 = \begin{bmatrix} 7 \\ -3 \end{bmatrix}, and let T:R2→R2T: \mathbb{R}^2 \to \mathbb{R}^2 map x\mathbf{x} into x1v1+x2v2x_1\mathbf{v}_1 + x_2\mathbf{v}_2. Find a matrix AA such that T(x)=AxT(\mathbf{x}) = A\mathbf{x} for each x\mathbf{x}.

Show solution ↓
Solution

All three use the same idea: linearity lets you pull out scalars and split sums.

17.

T(3u)=3T(u)=3[21]=[63],T(2v)=2T(v)=2[−13]=[−26]T(3\mathbf{u}) = 3T(\mathbf{u}) = 3\begin{bmatrix} 2 \\ 1 \end{bmatrix} = \begin{bmatrix} 6 \\ 3 \end{bmatrix}, \qquad T(2\mathbf{v}) = 2T(\mathbf{v}) = 2\begin{bmatrix} -1 \\ 3 \end{bmatrix} = \begin{bmatrix} -2 \\ 6 \end{bmatrix}T(3u+2v)=3T(u)+2T(v)=[63]+[−26]=[49]T(3\mathbf{u} + 2\mathbf{v}) = 3T(\mathbf{u}) + 2T(\mathbf{v}) = \begin{bmatrix} 6 \\ 3 \end{bmatrix} + \begin{bmatrix} -2 \\ 6 \end{bmatrix} = \begin{bmatrix} 4 \\ 9 \end{bmatrix}

19. Write the input as a combination of e1,e2\mathbf{e}_1, \mathbf{e}_2: [5−3]=5e1−3e2\begin{bmatrix} 5 \\ -3 \end{bmatrix} = 5\mathbf{e}_1 - 3\mathbf{e}_2. Then

T([5−3])=5y1−3y2=[1025]−[−318]=[137]T\left(\begin{bmatrix} 5 \\ -3 \end{bmatrix}\right) = 5\mathbf{y}_1 - 3\mathbf{y}_2 = \begin{bmatrix} 10 \\ 25 \end{bmatrix} - \begin{bmatrix} -3 \\ 18 \end{bmatrix} = \begin{bmatrix} 13 \\ 7 \end{bmatrix}

In general x=x1e1+x2e2\mathbf{x} = x_1\mathbf{e}_1 + x_2\mathbf{e}_2, so

T(x)=x1y1+x2y2=x1[25]+x2[−16]=[2x1−x25x1+6x2]T(\mathbf{x}) = x_1\mathbf{y}_1 + x_2\mathbf{y}_2 = x_1\begin{bmatrix} 2 \\ 5 \end{bmatrix} + x_2\begin{bmatrix} -1 \\ 6 \end{bmatrix} = \begin{bmatrix} 2x_1 - x_2 \\ 5x_1 + 6x_2 \end{bmatrix}

(This is a preview of Theorem 10: the standard matrix is [y1 y2]=[2−156][\mathbf{y}_1 \ \mathbf{y}_2] = \begin{bmatrix} 2 & -1 \\ 5 & 6 \end{bmatrix}.)

20. By the definition of a matrix–vector product, x1v1+x2v2=[v1 v2]xx_1\mathbf{v}_1 + x_2\mathbf{v}_2 = [\mathbf{v}_1 \ \mathbf{v}_2]\mathbf{x}. So

T(x)=[−275−3][x1x2],A=[−275−3]T(\mathbf{x}) = \begin{bmatrix} -2 & 7 \\ 5 & -3 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}, \qquad A = \begin{bmatrix} -2 & 7 \\ 5 & -3 \end{bmatrix}