Linear Algebra › Section A · Linear equations in linear algebra › Topic A.8

Introduction to linear transformations

So far a matrix has been a table of coefficients. Now it becomes a machine that takes in a vector and returns another, and the machines that respect addition and scaling, the linear transformations, turn out to be the heart of the subject.

Matrices that act

Up to now, \(A\mathbf{x} = \mathbf{b}\) has been an equation to solve for \(\mathbf{x}\). Change the viewpoint: think of \(A\) as acting on each vector \(\mathbf{x}\) and producing a new vector \(A\mathbf{x}\). Solving \(A\mathbf{x} = \mathbf{b}\) then means finding every input that the action sends to \(\mathbf{b}\). This dynamic view describes rotating an image on a screen, projecting a 3D scene onto a 2D display, or tracking how a population changes from one year to the next. It also makes geometry visible: you can watch what a matrix does to a square or a line.

Transformations and their vocabulary

A transformation, also called a function or mapping, \(T\) from \(\mathbb{R}^n\) to \(\mathbb{R}^m\) is a rule that assigns to each vector \(\mathbf{x}\) in \(\mathbb{R}^n\) one vector \(T(\mathbf{x})\) in \(\mathbb{R}^m\). It is written \(T: \mathbb{R}^n \to \mathbb{R}^m\). The set \(\mathbb{R}^n\) of inputs is the domain, and \(\mathbb{R}^m\) is the codomain. For each \(\mathbf{x}\), the vector \(T(\mathbf{x})\) is the image of \(\mathbf{x}\) under \(T\). The set of all images is the range of \(T\). The range sits inside the codomain but need not fill it, just as the outputs of \(f(x) = x^2\) fill only part of the real line.

Matrix transformations

Every \(m \times n\) matrix \(A\) gives a transformation \(T(\mathbf{x}) = A\mathbf{x}\), written \(\mathbf{x} \mapsto A\mathbf{x}\). The domain is \(\mathbb{R}^n\) because \(A\) has \(n\) columns, and the codomain is \(\mathbb{R}^m\) because each column has \(m\) entries. Since \(A\mathbf{x}\) is a combination of the columns of \(A\), the range of \(T\) is the span of those columns. So the question "is \(\mathbf{b}\) in the range of \(T\)?" is the old question "is \(A\mathbf{x} = \mathbf{b}\) consistent?", and the question "is there only one such \(\mathbf{x}\)?" asks whether the solution is unique.

Worked example: images and pre-images

Let \(T(\mathbf{x}) = A\mathbf{x}\), where

A = \begin{bmatrix} 1 & -2 \\ 3 & 1 \\ 0 & 2 \end{bmatrix}

so \(T: \mathbb{R}^2 \to \mathbb{R}^3\). 1. The image of \(\mathbf{u} = (2, 1)\) is \((2 - 2, 6 + 1, 0 + 2)\), that is, \((0, 7, 2)\). 2. To find \(\mathbf{x}\) with \(T(\mathbf{x}) = (-1, 11, 4)\), solve \(x_1 - 2x_2 = -1\), \(3x_1 + x_2 = 11\), \(2x_2 = 4\). The last gives \(x_2 = 2\), the first gives \(x_1 = 3\), and the second checks: \(9 + 2 = 11\). 3. There are no free variables, so \((3, 2)\) is the only such \(\mathbf{x}\). 4. Is \((0, 0, 1)\) in the range? The first two equations force \(x_1 = x_2 = 0\), and then \(2x_2 = 1\) fails, so it is not.

Two geometric examples

The matrix

A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix}

sends \((x_1, x_2, x_3)\) to \((x_1, x_2, 0)\). It is a projection of \(\mathbb{R}^3\) onto the \(x_1x_2\)-plane, like the shadow cast by an overhead light. The matrix with rows \((1, 2)\) and \((0, 1)\) sends \((x_1, x_2)\) to \((x_1 + 2x_2, x_2)\). It is a shear: points slide sideways by twice their height. The unit square with corners \((0, 0)\), \((1, 0)\), \((0, 1)\), \((1, 1)\) becomes the parallelogram with corners \((0, 0)\), \((1, 0)\), \((2, 1)\), \((3, 1)\).

Linear transformations

A transformation \(T\) is linear if, for all \(\mathbf{u}\) and \(\mathbf{v}\) in its domain and every scalar \(c\),

T(\mathbf{u} + \mathbf{v}) = T(\mathbf{u}) + T(\mathbf{v})
T(c\mathbf{u}) = cT(\mathbf{u})

In words, it does not matter whether you add or scale before or after applying \(T\). Every matrix transformation is linear, because \(A(\mathbf{u} + \mathbf{v}) = A\mathbf{u} + A\mathbf{v}\) and \(A(c\mathbf{u}) = cA\mathbf{u}\), as shown in The matrix equation Ax = b. The next topic proves the converse for transformations between \(\mathbb{R}^n\) and \(\mathbb{R}^m\).

Consequences of linearity

If \(T\) is linear, then \(T(\mathbf{0}) = \mathbf{0}\), since \(T(\mathbf{0}) = T(0\mathbf{0}) = 0T(\mathbf{0}) = \mathbf{0}\). Also \(T(c\mathbf{u} + d\mathbf{v}) = cT(\mathbf{u}) + dT(\mathbf{v})\), and more generally \(T\) sends any linear combination to the same combination of the images. Engineers call this the superposition principle: the response to a sum of inputs is the sum of the responses. So a linear \(T\) is known everywhere once you know it on a few vectors whose combinations reach every input.

Spotting non-linear maps

The quickest test is \(T(\mathbf{0})\). The translation \(T(x_1, x_2) = (x_1 + 1, x_2)\) sends \(\mathbf{0}\) to \((1, 0)\), so it is not linear. Passing that test proves nothing, though. The map \(T(x_1, x_2) = (x_1^2, x_2)\) sends \(\mathbf{0}\) to \(\mathbf{0}\), yet \(T(2, 0) = (4, 0)\) while \(2T(1, 0) = (2, 0)\), so scaling fails. Products of variables, powers, absolute values and added constants usually break linearity. A map whose output entries are each a fixed combination of the inputs, with no constant term, is linear.

Worked example: using linearity

1. Suppose \(T\) is linear with \(T(\mathbf{u}) = (2, 1)\) and \(T(\mathbf{v}) = (-1, 3)\). Then, with no formula for \(T\) needed, \(T(3\mathbf{u} - 2\mathbf{v})\) is

3(2, 1) - 2(-1, 3) = (8, -3)

2. Now take the rotation \(T(x_1, x_2) = (-x_2, x_1)\), which turns each vector 90° anticlockwise. 3. Check additivity: \(T(\mathbf{u} + \mathbf{v}) = (-(u_2 + v_2), u_1 + v_1)\), which equals \((-u_2, u_1) + (-v_2, v_1)\). 4. Check scaling: \(T(c\mathbf{u}) = (-cu_2, cu_1) = cT(\mathbf{u})\). 5. So the rotation is linear; for example it sends \((3, 1)\) to \((-1, 3)\), and the two vectors are perpendicular, as a quarter turn requires.

Linearity beyond Rⁿ

The definition makes sense wherever vectors can be added and scaled. Differentiation is linear on polynomials: the derivative of \(f + g\) is \(f' + g'\), and of \(cf\) is \(cf'\). So is integration from 0 to \(x\), and so is the expected value in probability. Many physical laws are linear or nearly so for small changes, such as a spring obeying Hooke's law or a circuit of resistors, which is why superposition is so useful in science. The topic Vector spaces and subspaces extends these ideas properly.

Common mistakes to avoid

First, mixing up domain and codomain: an \(m \times n\) matrix maps \(\mathbb{R}^n\) to \(\mathbb{R}^m\), columns to rows. Second, assuming the range is the whole codomain; it is only the span of the columns. Third, treating \(T(\mathbf{0}) = \mathbf{0}\) as proof of linearity; it is only a necessary condition. Fourth, calling a translation linear because it preserves shapes. Fifth, checking linearity with one numerical example; a single success proves nothing, though a single failure disproves it.

Key takeaways

A transformation T: Rⁿ → Rᵐ assigns each x in the domain an image T(x) in the codomain; the range is the set of all images. An m × n matrix gives x ↦ Ax from Rⁿ to Rᵐ, with range equal to the span of its columns. T is linear when T(u + v) = T(u) + T(v) and T(cu) = cT(u); every matrix transformation is linear. Linear maps send 0 to 0 and obey superposition. Translations are not linear, and T(0) = 0 alone does not prove linearity.

Flashcards

Flashcard

T: Rⁿ → Rᵐ

A rule giving each x in Rⁿ one image T(x) in Rᵐ

Also called a mapping.

Test your understanding

Question 1 of 5

A is a 2 × 3 matrix and T(x) = Ax. What are the domain and codomain of T?

Question 2 of 5

Which transformation from R² to R² is linear?

Question 3 of 5

T is linear, T(u) = (1, 4) and T(v) = (2, −1). What is T(2u + 3v)?

Question 4 of 5

For the matrix transformation x ↦ Ax, what is the range?

Question 5 of 5

A has rows (1, −2), (3, 1) and (0, 2). Which x satisfies Ax = (−4, 9, 6)?

← Previous topicNext topic →