BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

Linear transformations and their matrices

A linear transformation T takes input vectors to output vectors and respects the two vector operations: T(v + w) = T(v) + T(w) and T(cv) = cT(v), or in one rule T(cv + dw) = cT(v) + dT(w). It can be described without coordinates. Projection onto a line and rotation by 45° are linear. Shifting the plane by a fixed v₀ is not (T(0) must be 0), and neither is taking the length, since T(−2v) would have to be −2T(v). Multiplying by a matrix, T(v) = Av, is always linear; (1 0; 0 −1) turns a house upside down, and a 2 × 3 matrix takes R³ to R². To know T it is enough to know T(v₁), …, T(vₙ) for a basis, because T(c₁v₁ + ⋯ + cₙvₙ) = c₁T(v₁) + ⋯ + cₙT(vₙ). Coordinates come from a basis. With an input basis v₁, …, vₙ and an output basis w₁, …, w_m, the matrix A of T has as column j the coefficients of T(vⱼ) in the w's; then A times input coordinates gives output coordinates. Projection onto a line, in the basis along and across the line (its eigenvectors), has matrix (1 0; 0 0) = Λ; in the standard basis, for the 45° line, it is (½ ½; ½ ½). The derivative from c₁ + c₂x + c₃x² to c₂ + 2c₃x has the 2 × 3 matrix (0 1 0; 0 0 2).

You need this first

Full reading path (25 pages)
  1. Vectors (8.01)
  2. Vectors and the dot product (18.02)
  3. Determinants and the cross product (18.02)
  4. Planes through three points, and matrices (18.02)
  5. Equations of planes and square systems (18.02)
  6. The geometry of linear equations (18.06)
  7. Elimination with matrices (18.06)
  8. Matrix multiplication and inverse matrices (18.06)
  9. Factorization into A = LU (18.06)
  10. Transposes, permutations and vector spaces (18.06)
  11. Properties of determinants (18.06)
  12. Determinant formulas and cofactors (18.06)
  13. Cramer's rule, the inverse matrix and volume (18.06)
  14. Column space and nullspace (18.06)
  15. Eigenvalues and eigenvectors (18.06)
  16. Diagonalisation and powers of A (18.06)
  17. Solving Ax = 0: pivot variables and special solutions (18.06)
  18. Solving Ax = b: the complete solution (18.06)
  19. Independence, basis and dimension (18.06)
  20. The four fundamental subspaces (18.06)
  21. Orthogonal vectors and subspaces (18.06)
  22. Projections onto subspaces (18.06)
  23. Projection matrices and least squares (18.06)
  24. Symmetric matrices and positive definiteness (18.06)
  25. Singular value decomposition (18.06)
On this page · 5 sections
  1. Linear transformations without coordinates
  2. Multiplying by a matrix
  3. A basis is enough
  4. The matrix of a transformation
  5. Summary

Linear algebra courses used to begin with linear transformations, so in a sense this lecture starts the course again (transcript, p. 1). A linear transformation makes sense without any matrix, and some people, physicists among them, prefer it without coordinates. But to compute, we bring in coordinates, and then every linear transformation leads to a matrix (p. 1).

Linear transformations without coordinates#

Projection (pp. 1–2). Take a line in the plane and project every vector vv onto it. The output is T(v)T(v); transformation, map and mapping all mean the same: a rule from inputs to outputs, like a function (p. 2). No axes are needed (p. 2). A linear transformation respects the two operations on vectors (p. 2):

Linearity
T(v+w)=T(v)+T(w),T(cv)=c T(v)T(v + w) = T(v) + T(w), \qquad T(cv) = c\,T(v)
In words

capital T the quantity v plus w, equals capital T (v) plus capital T (w), capital T (c v) equals c capital T (v)

Projection qualifies: doubling vv doubles its projection, reversing vv reverses it (p. 2). The two rules combine into one (p. 2):

Linearity in one rule
T(cv+dw)=c T(v)+d T(w)T(cv + dw) = c\,T(v) + d\,T(w)
In words

capital T the quantity c v plus d w, equals c capital T (v) plus d capital T (w)

Non-examples (pp. 2–4). Shifting the whole plane by a fixed vector, T(v)=v+v0T(v) = v + v_0, is not linear: doubling vv adds only one v0v_0, not two (pp. 2–3). In fact every linear TT keeps zero fixed: with v=0v = 0 and c=3c = 3, T(0)=3T(0)T(0) = 3T(0), so (p. 3)

Zero stays zero
T(0)=0T(0) = 0
In words

capital T (0) equals 0

The length, T(v)=∥v∥T(v) = \|v\| from R3\mathbf{R}^3 to R1\mathbf{R}^1, also fails: it sends 0 to 0 and doubles when vv doubles, but T(−2v)T(-2v) is 2∥v∥2\|v\|, not −2∥v∥-2\|v\| (pp. 3–4).

Rotation by 45°45° (pp. 4–5) is linear: doubling vv doubles the rotated vector, and rotating v+wv + w gives the sum of the rotations. A transformation acts on everything at once: rotate a house drawn in the plane (the picture on the cover of Strang's book) and the whole house turns (pp. 4–5).

Multiplying by a matrix#

Every matrix gives a linear transformation, T(v)=AvT(v) = Av, since A(v+w)=Av+AwA(v + w) = Av + Aw and A(cv)=cAvA(cv) = cAv (p. 5). For example (p. 6)

A reflection
A=(100−1)A = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}
In words

capital A equals 1 0; 0 minus 1

keeps each xx component and reverses each yy component: the house, roof tip and door included, ends up upside down (p. 6). A transformation from R3\mathbf{R}^3 to R2\mathbf{R}^2 comes, for instance, from a 2×32 \times 3 matrix (pp. 7–8). Strang's aim is to show that there are no other examples: behind every linear transformation is a matrix (p. 8).

A basis is enough#

How much must you be told to know T(v)T(v) for every vv (p. 8)? Knowing T(v1)T(v_1) gives TT on the line through v1v_1; knowing T(v2)T(v_2) for an independent v2v_2 gives it on the whole plane of their combinations (pp. 8–9). In general, the values on a basis v1,…,vnv_1, \dots, v_n of the input space decide everything, because each vv is a combination of the basis (p. 9):

Linearity on a basis
v=c1v1+⋯+cnvn⇒T(v)=c1T(v1)+⋯+cnT(vn)v = c_1v_1 + \cdots + c_nv_n \quad\Rightarrow\quad T(v) = c_1T(v_1) + \cdots + c_nT(v_n)
In words

v equals c one v one plus and so on plus c sub n v n which gives capital T (v) equals c one capital T ( v one ) plus and so on plus c sub n capital T ( v n )

Coordinates come from a basis (pp. 9–10). The numbers c1,…,cnc_1, \dots, c_n are the coordinates of vv, and there is exactly one way to find them. We have always assumed the standard basis, in which v=(3,2,4)v = (3, 2, 4) means 3 times the first coordinate vector, and so on; but another basis, for example the eigenvectors of a matrix, gives other coordinates (p. 10).

The matrix of a transformation#

For TT from Rn\mathbf{R}^n to Rm\mathbf{R}^m, choose an input basis v1,…,vnv_1, \dots, v_n and an output basis w1,…,wmw_1, \dots, w_m (pp. 10–11). The matrix AA should take the coordinates of vv in the input basis to the coordinates of T(v)T(v) in the output basis (p. 11). Strang works the projection example below first (pp. 11–14) and then states the general rule (pp. 15–16): column jj of AA holds the coefficients of T(vj)T(v_j),

Columns of the matrix
T(v1)=a11w1+a21w2+⋯+am1wm,T(vj)=a1jw1+⋯+amjwmT(v_1) = a_{11}w_1 + a_{21}w_2 + \cdots + a_{m1}w_m, \qquad T(v_j) = a_{1j}w_1 + \cdots + a_{mj}w_m
In words

capital T ( v one ) equals a one one w one plus a two one w two plus and so on plus a sub m 1 w sub m, capital T ( v sub j ) equals a one j w one plus and so on plus a sub m j w sub m

Then AA times the input coordinates gives the output coordinates. It is right for the first basis vector, whose coordinates are (1,0,…,0)(1, 0, \dots, 0), since AA times that is column 1; likewise for every basis vector, and so, by linearity, for every vector (p. 16).

Projection in a good basis (pp. 11–14). Project the plane onto a line, with the same basis for inputs and outputs: v1v_1 a unit vector on the line, v2v_2 a unit vector perpendicular to it (p. 12). The projection leaves v1v_1 alone and kills v2v_2, so input coordinates (c1,c2)(c_1, c_2) give output coordinates (c1,0)(c_1, 0) (pp. 12–13):

Projection in its eigenvector basis
A=(1000)=Λ,(1000)(c1c2)=(c10)A = \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} = \Lambda, \qquad \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}\begin{pmatrix} c_1 \\ c_2 \end{pmatrix} = \begin{pmatrix} c_1 \\ 0 \end{pmatrix}
In words

capital A equals 1 0; 0 0 equals capital lambda, 1 0; 0 0 c one; c two equals c one; 0

These basis vectors are the projection's eigenvectors, with eigenvalues 1 and 0, so the matrix is the diagonal Λ\Lambda (pp. 13–14). That is the choice a physicist forced to use coordinates would make (p. 14). In the standard basis (1,0)(1, 0), (0,1)(0, 1), projecting onto the 45°45° line gives the familiar P=aaT/aTaP = aa^T/a^Ta of chapter 4 (p. 14):

Same projection, standard basis
P=(12121212)P = \begin{pmatrix} \tfrac12 & \tfrac12 \\ \tfrac12 & \tfrac12 \end{pmatrix}
In words

capital P equals one half one half; one half one half

Both (1,0)(1, 0) and (0,1)(0, 1) project to (12,12)(\frac12, \frac12) (p. 14). This matrix is not diagonal, though symmetric with P2=PP^2 = P; much of the course has worked in "the handiest basis" rather than the best one (p. 14).

The derivative (pp. 16–18). Differentiation is linear: that is exactly why learning the derivatives of a short list of functions lets us differentiate all their combinations (p. 17). With inputs c1+c2x+c3x2c_1 + c_2x + c_3x^2 (basis 1,x,x21, x, x^2) and outputs c2+2c3xc_2 + 2c_3x (basis 1,x1, x), the matrix is 2×32 \times 3 (pp. 16–17):

Matrix of the derivative
A=(010002),A(c1c2c3)=(c22c3)A = \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 2 \end{pmatrix}, \qquad A\begin{pmatrix} c_1 \\ c_2 \\ c_3 \end{pmatrix} = \begin{pmatrix} c_2 \\ 2c_3 \end{pmatrix}
In words

capital A equals 0 1 0; 0 0 2, capital A c one; c two; c three equals c two; 2 c three

The whole point, Strang says, is that matrices behave like the transformations: the inverse matrix goes with the inverse transformation, the product of matrices with the product of transformations. In his words, "matrix multiplication really came from linear transformations" (p. 18).

Worked example

Matrices of your own transformations

(a) Find the matrix of the reflection of the plane across the line y=xy = x, first in the basis v1=(1,1)/2v_1 = (1, 1)/\sqrt2, v2=(1,−1)/2v_2 = (1, -1)/\sqrt2, then in the standard basis. (b) Find the matrix of d/dxd/dx from cubics (basis 1,x,x2,x31, x, x^2, x^3) to quadratics (basis 1,x,x21, x, x^2), and use it on p(x)=4−x+5x2+2x3p(x) = 4 - x + 5x^2 + 2x^3.

(a) Eigenvector basis

The reflection keeps v1v_1, which lies on the line, and reverses v2v_2, which is perpendicular: T(v1)=v1T(v_1) = v_1, T(v2)=−v2T(v_2) = -v_2. So A=(100−1)A = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}, diagonal with the eigenvalues.

(a) Standard basis

(1,0)(1, 0) reflects to (0,1)(0, 1) and (0,1)(0, 1) to (1,0)(1, 0), so the columns give A=(0110)A = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}: the swap permutation. Same transformation, different basis, different matrix.

(b) The derivative

T(1)=0T(1) = 0, T(x)=1T(x) = 1, T(x2)=2xT(x^2) = 2x, T(x3)=3x2T(x^3) = 3x^2, so the columns are (0,0,0)(0, 0, 0), (1,0,0)(1, 0, 0), (0,2,0)(0, 2, 0), (0,0,3)(0, 0, 3): A=(010000200003)A = \begin{pmatrix} 0 & 1 & 0 & 0 \\ 0 & 0 & 2 & 0 \\ 0 & 0 & 0 & 3 \end{pmatrix}. For pp, A(4,−1,5,2)=(−1,10,6)A(4, -1, 5, 2) = (-1, 10, 6), that is p′(x)=−1+10x+6x2p'(x) = -1 + 10x + 6x^2, which is right.

Summary#

  • Linear: T(cv+dw)=cT(v)+dT(w)T(cv + dw) = cT(v) + dT(w); then T(0)=0T(0) = 0. Projections, rotations and multiplication by AA are linear; shifts and lengths are not.
  • The values of TT on a basis determine TT everywhere.
  • Choosing input and output bases gives a matrix: column jj = output coordinates of T(vj)T(v_j).
  • The eigenvector basis gives the diagonal Λ\Lambda; the standard basis gives the usual, handier matrix. The derivative on polynomials has a matrix too.

Symbols on this page

Show the 40 symbols used here
Λ\Lambda capital lambda.
The diagonal matrix of the eigenvalues. Say it: “capital lambda”.
≠\neq not equal.
Is not equal to. Say it: “is not equal to”.
⇒\Rightarrow implies.
Implies: what follows is a consequence of what came before. Say it: “which gives”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
∑\sum sum.
Sum: add up the terms over the range written below and above. Say it: “the sum of”.
aa a.
The vector spanning the line, in P = aaᵀ/aᵀa. Say it: “a”.
cc c.
A number multiplying a vector. Say it: “c”.
TT T.
A linear transformation: input vector v, output T(v). Say it: “capital T”.
xx x.
The variable of the polynomials; in the reflection example, the horizontal coordinate. Say it: “x”.
yy y.
The vertical coordinate, as in the line y = x. Say it: “y”.
dd d.
A second number, in T(cv + dw). Say it: “d”.
jj j.
A column number: the number of the input basis vector. Say it: “j”.
nn n.
The dimension of the input space. Say it: “n”.
mm m.
The dimension of the output space. Say it: “m”.
vv v.
An input vector. Say it: “v”.
PP P.
The projection matrix onto the 45° line in the standard basis. Say it: “capital P”.
AA A.
The matrix of a transformation, in the chosen input and output bases. Say it: “capital A”.
pp p.
The cubic polynomial of the worked example. Say it: “p”.
v0v_{0} v nought.
A fixed vector by which the whole plane is shifted (not a linear transformation). Say it: “v nought”.
viv_{i} initial velocity.
The i-th input basis vector. Say it: “v sub i”.
ww w.
A second input vector, in T(v + w). Say it: “w”.
v1v_{1} v one.
The first input basis vector. Say it: “v one”.
v2v_{2} v two.
The second input basis vector. Say it: “v two”.
vjv_{j} v j.
The j-th input basis vector. Say it: “v sub j”.
c1c_{1} c one.
The first coordinate of v in the input basis. Say it: “c one”.
c2c_{2} c two.
The second coordinate of v in the input basis. Say it: “c two”.
cic_{i} c i.
The i-th coordinate of v. Say it: “c sub i”.
c3c_{3} c 3.
The third coordinate (the coefficient of x² in c₁ + c₂x + c₃x²). Say it: “c three”.
p′p' p prime.
The derivative of p. Say it: “p prime”.
cnc_{n} c sub n.
The last coordinate of v in the input basis. Say it: “c sub n”.
vnv_{n} v n.
The last input basis vector. Say it: “v n”.
a11a_{11} a one one.
The entry in row 1, column 1 of the matrix: the first output coordinate of T(v₁). Say it: “a one one”.
a21a_{21} a two one.
The entry in row 2, column 1: the second output coordinate of T(v₁). Say it: “a two one”.
a1ja_{1j} a one j.
The entry in row 1, column j: the first output coordinate of T(vⱼ). Say it: “a one j”.
w1w_{1} w one.
The first output basis vector. Say it: “w one”.
w2w_{2} w two.
The second output basis vector. Say it: “w two”.
wmw_{m} w m.
The last output basis vector. Say it: “w sub m”.
am1a_{m1} a m 1.
The entry in row m, column 1: the last output coordinate of T(v₁). Say it: “a sub m 1”.
amja_{\text{mj}} a m j.
The entry in row m, column j. Say it: “a sub m j”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 22 words used here

Also used

linear.
Of a map, operator or equation: respecting sums and multiples, so that L(au + bv) = aL(u) + bL(v). Explained in The geometry of linear equations.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
matrix.
A rectangular table of numbers, which acts on vectors to give new ones and so describes a linear change of coordinates. Explained in Planes through three points, and matrices.
projection.
The shadow of a vector on a line or plane: the nearest point to it there, found by dropping a perpendicular. Explained in Projections onto subspaces.
vector.
A list of numbers written as a column, or more generally anything that can be added and multiplied by numbers. Explained in Orthogonal vectors and subspaces.
basis.
A set of independent vectors from which every vector in a space can be built, in exactly one way, as a combination. Explained in Independence, basis and dimension.
standard basis.
The basis made of the columns of the identity matrix: vectors with a single 1 and zeros elsewhere. Explained in Change of basis and image compression.
eigenvector.
A non-zero vector that a matrix only stretches or shrinks without turning: multiplying it by the matrix gives a number times the same vector. Explained in Linear systems with constant coefficients: eigenvalues and eigenvectors.
unit vector.
A vector of length one, used only to point in a direction. Explained in Newton's law of gravitation.
perpendicular.
At right angles to a line, a surface or another direction. Explained in Inclined planes.
eigenvalue.
A number λ for which a matrix turns some non-zero vector into λ times that vector, only stretching or shrinking it. Explained in Linear systems with constant coefficients: eigenvalues and eigenvectors.
diagonal.
In a square matrix, the entries running from the top left corner to the bottom right; a diagonal matrix has zeros everywhere else. Explained in The four fundamental subspaces.
symmetric.
Unchanged by some swap, reflection or turn; for an expression in two quantities, unchanged when they are exchanged. Explained in Introduction to Fourier series.
derivative.
The rate at which a function changes as its input changes: the slope of its graph at a point. Explained in Position and velocity in one dimension.
differentiation.
Finding a derivative: working out how fast a function changes. Explained in The derivative: slope of the tangent line and rate of change.
inverse.
The thing that undoes another: a matrix times its inverse gives the identity matrix, as a function followed by its inverse gives back the start. Explained in Planes through three points, and matrices.
permutation.
A rearrangement of a list of things into a new order. Explained in Elimination with matrices.

Academic

in a sense.
Partly, or when looked at in one particular way; not in every respect.
transcript.
A written record of exactly what was said in a recorded lecture, word for word.
assumption.
Something accepted as true, without proof, so that an argument or calculation can proceed; to assume is to accept it so.
likewise.
In the same way; similarly.
kills.
In maths slang, to make a term or vector zero.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

Pages that build on this

Check your understanding

  1. Which transformation of the plane is linear?
  2. What must every linear transformation do to the zero vector?
  3. How is the first column of the matrix AA of TT found, given bases v1,…,vnv_1, \dots, v_n and w1,…,wmw_1, \dots, w_m?
  4. What is the matrix of d/dxd/dx from the basis 1,x,x21, x, x^2 to the basis 1,x1, x?
0 of 4 answered

Flashcards

1 / 4