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

Transposes, permutations and vector spaces

With row exchanges, elimination gives PA = LU: the permutation P puts the rows in an order where no zero lands in a pivot position. There are n! permutation matrices of size n, and each has PᵀP = I, so P⁻¹ = Pᵀ. The transpose flips a matrix across its main diagonal, (Aᵀ)ᵢⱼ = Aⱼᵢ; a matrix is symmetric when Aᵀ = A, and RᵀR is symmetric for any rectangular R, because (RᵀR)ᵀ = RᵀRᵀᵀ = RᵀR. Then the step to real linear algebra: a vector space is a set of vectors closed under addition and multiplication by numbers, so every linear combination stays inside. Rⁿ, all real column vectors with n components, is the main example; it must contain the zero vector. A quarter of the plane is not a vector space, but a line through the origin is a subspace. The subspaces of R² are R² itself, the lines through the origin and the zero vector alone; in R³ add the planes through the origin. All combinations of the columns of A form a subspace, the column space C(A); two independent columns in R³ fill a plane.

You need this first

Full reading path (9 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)
On this page · 6 sections
  1. Row exchanges: PA = LU
  2. Transposes and symmetric matrices
  3. Vector spaces
  4. Subspaces
  5. The column space
  6. Summary

This lecture finishes the chapter on elimination with permutations and transposes, and then starts what Strang calls real linear algebra: spaces of vectors (transcript, p. 1). It continues the factorization A = LU.

Row exchanges: PA = LU#

A perfectly good invertible matrix may still need row exchanges, when a zero turns up in a pivot position (transcript, p. 1). A=LUA = LU assumed none (p. 2). MATLAB in fact exchanges rows more often than algebra requires: it avoids small pivots, which are bad for numerical accuracy (p. 2). Algebra needs an exchange only for a zero, and the general description of elimination is then (p. 2)

Elimination with row exchanges
PA=LUPA = LU
In words

capital P capital A equals L U

where PP puts the rows into an order in which no zero lands in a pivot position. This holds for every invertible AA; for almost every one P=IP = I, and it covers the few that need exchanges (p. 3).

A permutation matrix is the identity with its rows reordered, including the do-nothing order II itself (p. 3). There are n!=n(n−1)⋯(2)(1)n! = n(n - 1)\cdots(2)(1) of size n×nn \times n: 24 of size 4, and 5!=1205! = 120 of size 5 (p. 4). Every one is invertible, and its inverse is its transpose: in PTPP^TP the ones meet the ones (pp. 3–4):

Inverse of a permutation
PTP=I,P−1=PTP^TP = I, \qquad P^{-1} = P^T
In words

capital P ^ capital T capital P equals capital I, capital P to the power minus 1 equals capital P ^ capital T

Matrices with QTQ=IQ^TQ = I will matter later; the permutations are a small group in the middle of them (p. 4).

Transposes and symmetric matrices#

Transposing turns columns into rows (transcript, pp. 4–5). The 3×23 \times 2 matrix with columns (1,2,4)(1, 2, 4) and (3,3,1)(3, 3, 1) becomes a 2×32 \times 3 matrix:

A transpose
R=(132341),RT=(124331)R = \begin{pmatrix} 1 & 3 \\ 2 & 3 \\ 4 & 1 \end{pmatrix}, \qquad R^T = \begin{pmatrix} 1 & 2 & 4 \\ 3 & 3 & 1 \end{pmatrix}
In words

capital R equals 1 3; 2 3; 4 1, capital R ^ capital T equals 1 2 4; 3 3 1

In symbols, the entry in row ii and column jj of ATA^T is the entry in row jj and column ii of AA: a flip across the main diagonal (p. 5):

Entries of the transpose
(AT)ij=Aji(A^T)_{ij} = A_{ji}
In words

( capital A ^ capital T ) sub i j equals capital A sub j i

A matrix is symmetric when transposing leaves it unchanged, AT=AA^T = A: whatever sits above the diagonal is mirrored below it (pp. 5–6). Symmetric matrices come up in a great many applications, and here is where (pp. 6–9): for any rectangular RR, RTRR^TR is symmetric. Strang multiplies out the example and reads off 10, 11 and 7 in the first row, then the symmetric 11 and 7 below (p. 7). With RR the 3×23 \times 2 matrix above, that 3×33 \times 3 product is RRTRR^T; the rest of it and the 2×22 \times 2 product RTRR^TR are completed here:

A symmetric product (completed here)
RRT=(1011711131171117),RTR=(21131319)RR^T = \begin{pmatrix} 10 & 11 & 7 \\ 11 & 13 & 11 \\ 7 & 11 & 17 \end{pmatrix}, \qquad R^TR = \begin{pmatrix} 21 & 13 \\ 13 & 19 \end{pmatrix}
In words

capital R capital R ^ capital T equals 10 11 7; 11 13 11; 7 11 17, capital R ^ capital T capital R equals 21 13; 13 19

(On p. 7 Strang names the 3×23 \times 2 factor RTR^T rather than RR, so he calls his product RTRR^TR; the names swap between pp. 6 and 7, not the numbers. Both products are symmetric, which is his point.) The 11 in position (1, 2) and the 11 in position (2, 1) come from the same two rows multiplied in either order, so they must agree (p. 7). The proof without numbers uses the rule that transposes of a product come in reverse order, and that transposing twice gives back the matrix (pp. 8–9):

Why RᵀR is symmetric
(RTR)T=RT(RT)T=RTR(R^TR)^T = R^T(R^T)^T = R^TR
In words

( capital R ^ capital T capital R )^ capital T equals capital R ^ capital T ( capital R ^ capital T )^ capital T equals capital R ^ capital T capital R

Vector spaces#

What do we do with vectors? We add them and multiply them by numbers (scalars); so we form linear combinations (transcript, p. 9). A vector space is a set of vectors in which those operations are always possible without leaving the set, with some decent rules satisfied (p. 10). (The book lists eight rules; in practice it is the staying inside that is in doubt, not the rules, p. 13.)

The first example is R2\mathrm{R}^2: all vectors with two real components, such as (3,2)(3, 2), (0,0)(0, 0) and (π,e)(\pi, e) (p. 10). They add a component at a time, (3,2)+(π,e)=(3+π,2+e)(3, 2) + (\pi, e) = (3 + \pi, 2 + e), and the picture is the whole xyxy-plane (p. 11). The zero vector cannot be removed: multiplying (3,2)(3, 2) by 0, or adding (3,2)(3, 2) and (−3,−2)(-3, -2), gives it, so every vector space contains zero (p. 12). Likewise R3\mathrm{R}^3 holds all vectors with three real components; (3,2,0)(3, 2, 0) lives in R3\mathrm{R}^3, not R2\mathrm{R}^2 (p. 12). In general (p. 13):

The space Rⁿ
Rn=all column vectors with n real components\mathrm{R}^n = \text{all column vectors with } n \text{ real components}
In words

R to the power n equals all column vectors with n real components

Not a vector space (pp. 13–14). Take the quarter of the plane where both components are nonnegative. Sums stay inside, but multiplying (3,2)(3, 2) by −5-5 leaves it: it is not closed under multiplication by all real numbers (p. 14).

Subspaces#

A subspace is a vector space inside another one (transcript, p. 14). If a subspace of R2\mathrm{R}^2 holds one nonzero vector, it holds all its multiples, the whole line, and sums of points on the line stay on it (p. 15). But the line must pass through the origin: a line missing the origin loses the vector when it is multiplied by 0 (pp. 15–16). Every subspace contains the zero vector (p. 16).

The subspaces of R2\mathrm{R}^2 are (pp. 16–17):

  • all of R2\mathrm{R}^2;
  • any line through the origin (which looks like R1\mathrm{R}^1 but is not it: its vectors have two components);
  • the zero vector alone (closed, since 0+0=00 + 0 = 0 and 17⋅0=017 \cdot 0 = 0).

In R3\mathrm{R}^3 they are R3\mathrm{R}^3, planes through the origin, lines through the origin, and the zero vector alone (p. 17).

The column space#

Subspaces come out of matrices (transcript, p. 18). Take AA with the columns (1,2,4)(1, 2, 4) and (3,3,1)(3, 3, 1), vectors in R3\mathrm{R}^3. A subspace containing them must contain their sum (4,5,5)(4, 5, 5), zero, and every combination of them (p. 18). All the linear combinations of the columns form the column space (p. 19):

Column space
C(A)={ x1(column 1)+x2(column 2):x1,x2 any numbers }C(A) = \{\, x_1(\text{column } 1) + x_2(\text{column } 2) : x_1, x_2 \text{ any numbers} \,\}
In words

C( capital A ) equals x one ( column 1) plus x two ( column 2) : x one, x two any numbers

Geometrically, the two lines of multiples get filled in between, and C(A)C(A) is a plane through the origin in R3\mathrm{R}^3 (pp. 19–20). Had the two columns been on one line, C(A)C(A) would only have been that line (p. 20). Five vectors in R10\mathrm{R}^{10} would fill some flat subspace through the origin, of dimension up to five, but not R5\mathrm{R}^5, since its vectors have ten components (p. 20). The next lecture asks what this says about Ax=bAx = b (p. 21).

Worked example

Row exchanges, symmetry and subspaces

(a) Find PP, LL and UU with PA=LUPA = LU for A=(021113248)A = \begin{pmatrix} 0 & 2 & 1 \\ 1 & 1 & 3 \\ 2 & 4 & 8 \end{pmatrix}. (b) Compute RTRR^TR for R=(102103)R = \begin{pmatrix} 1 & 0 \\ 2 & 1 \\ 0 & 3 \end{pmatrix}. (c) Which of these subsets of R3\mathrm{R}^3 are subspaces: the vectors with v1+v2+v3=0v_1 + v_2 + v_3 = 0; those with v1+v2+v3=1v_1 + v_2 + v_3 = 1; the union of the lines through (1,2,0)(1, 2, 0) and (2,−1,0)(2, -1, 0)?

(a) Exchange, then eliminate

The first pivot position holds 0, so exchange rows 1 and 2: P=(010100001)P = \begin{pmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix}, PA=(113021248)PA = \begin{pmatrix} 1 & 1 & 3 \\ 0 & 2 & 1 \\ 2 & 4 & 8 \end{pmatrix}. Multiplier 2 for row 3: (0,2,2)(0, 2, 2); then multiplier 1: (0,0,1)(0, 0, 1). So U=(113021001)U = \begin{pmatrix} 1 & 1 & 3 \\ 0 & 2 & 1 \\ 0 & 0 & 1 \end{pmatrix} and L=(100010211)L = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 2 & 1 & 1 \end{pmatrix}. Check row 3 of LULU: 2(1,1,3)+(0,2,1)+(0,0,1)=(2,4,8)2(1, 1, 3) + (0, 2, 1) + (0, 0, 1) = (2, 4, 8).

(b) A symmetric product

The entries are dot products of the columns (1,2,0)(1, 2, 0) and (0,1,3)(0, 1, 3): RTR=(52210)R^TR = \begin{pmatrix} 5 & 2 \\ 2 & 10 \end{pmatrix}, symmetric as it must be.

(c) Test for zero and closure

The first set is a plane through the origin: sums and multiples keep the sum of components 0, so it is a subspace. The second does not contain zero, so it is not. The third contains zero and all multiples, but (1,2,0)+(2,−1,0)=(3,1,0)(1, 2, 0) + (2, -1, 0) = (3, 1, 0) lies on neither line: not closed under addition, so not a subspace.

Summary#

Symbols on this page

Show the 26 symbols used here
π\pi pi.
The ratio of a circle's circumference to its diameter, π ≈ 3.14159. Say it: “pi”.
×\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”.
TT T.
As a superscript: the transpose (rows become columns). Say it: “capital T”.
xx x.
The horizontal coordinate of the xy-plane; in Ax = b, the vector of unknowns. Say it: “x”.
yy y.
The vertical coordinate of the xy-plane. Say it: “y”.
ii i.
A row number. Say it: “i”.
jj j.
A column number. Say it: “j”.
nn n.
The size of a matrix, or the number of components of the vectors in Rⁿ. Say it: “n”.
ee e.
The number e ≈ 2.718, as a component of the vector (π, e). Say it: “e”.
mm m.
The number of rows of A: its columns lie in Rᵐ. Say it: “m”.
PP P.
A permutation matrix: the identity with its rows reordered; in PA = LU, it puts the rows of A in a good order. Say it: “capital P”.
QQ Q.
A matrix with QᵀQ = I, of which permutations are an example. Say it: “Q”.
AA A.
A matrix; in the column-space section, the matrix with columns (1, 2, 4) and (3, 3, 1). Say it: “capital A”.
CC C.
As in C(A): the column space of A, all combinations of its columns. Say it: “C”.
bb b.
The right-hand side vector in Ax = b. Say it: “b”.
LL L.
The lower triangular factor in PA = LU, with ones on the diagonal and the multipliers below. Say it: “L”.
RR R.
A rectangular matrix, such as the 3 × 2 matrix with columns (1, 2, 4) and (3, 3, 1). Say it: “capital R”.
x1x_{1} x 1.
The number multiplying column 1 in a combination of the columns. Say it: “x one”.
x2x_{2} x 2.
The number multiplying column 2 in a combination of the columns. Say it: “x two”.
UU U.
The upper triangular factor in PA = LU. Say it: “U”.
v1v_{1} v one.
The first component of a vector v in R³. Say it: “v one”.
v2v_{2} v two.
The second component of a vector v in R³. Say it: “v two”.
II I.
The identity matrix. Say it: “capital I”.
v3v_{3} v 3.
The third component of a vector v in R³. Say it: “v three”.
AjiA_{\text{ji}} A j i.
The entry of A in row j and column i. Say it: “capital A sub j i”.

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

Words on this page

Show the 35 words used here

New here

vector space.
A collection of objects, called vectors, that can be added together and multiplied by numbers, with the results staying in the collection.
zero vector.
The vector whose components are all zero; adding it to any vector changes nothing.
subspace.
A set of vectors inside a larger space that is a space itself: sums and multiples of its vectors stay inside it.

Also used

elimination.
Solving equations by subtracting multiples of one from another until each unknown can be found in turn. Explained in The geometry of linear equations.
permutation.
A rearrangement of a list of things into a new order. Explained in Elimination with matrices.
transpose.
The matrix made by writing the rows of a matrix as columns, flipping it across its main diagonal. Explained in Planes through three points, and matrices.
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.
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.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
factorization.
Writing something, such as a number, a matrix or an operator, as a product of simpler pieces. Explained in Factorization into A = LU.
LU.
The factorization A = LU of a matrix into a lower triangular L, which records the elimination steps, times the upper triangular U it produces. Explained in Factorization into A = LU.
invertible.
Of a square matrix or operator: having an inverse that undoes it; for a matrix this happens exactly when its determinant is not zero. Explained in The geometry of linear equations.
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.
row exchange.
Swapping two rows of a matrix, needed in elimination when a zero sits where a pivot should be.
pivot.
In elimination, the first nonzero number in a row, used to clear out the entries below it. Explained in Positive definite matrices and minima.
permutation matrix.
A matrix made by reordering the rows of the identity matrix; multiplying by it reorders the rows of another matrix the same way. Explained in Elimination with matrices.
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.
group.
A collection of matrices, or other objects, in which the product of any two and the inverse of each are again in the collection. Explained in Factorization into A = LU.
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.
proof.
A chain of reasoning showing beyond doubt that a statement follows from definitions and results already known. Explained in Limits and continuity.
scalar.
A quantity that has a size but no direction, such as mass, temperature or energy. Explained in Vectors.
linear combination.
A sum of vectors, each first multiplied by a number, such as 3u + 2v. Explained in The geometry of linear equations.
column space.
All the vectors made by combining the columns of a matrix; Ax = b can be solved exactly when b lies in it. Explained in Matrix multiplication and inverse matrices.
dimension.
The number of vectors in any basis of a vector space or subspace. Explained in Independence, basis and dimension.
union.
The set made of everything that is in one set or the other, or both. Explained in Column space and nullspace.
dot product.
A way of multiplying two vectors that gives a number: multiply matching components and add, or lengths times the cosine of the angle between them. Explained in Vectors and the dot product.

Academic

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.
numerically.
In terms of actual numbers rather than symbols; often worked out step by step, by computer, instead of from an exact formula.
accuracy.
Closeness to the true value: an accurate measurement or calculation gives a result near the right answer.
read off.
To take a value directly from a graph, table or formula, without further calculation.
satisfy.
To make an equation or condition true.
in practice.
In reality, as things are actually done or measured, rather than in theory.
likewise.
In the same way; similarly.

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

31 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. Which of these is a subspace of R³?
  2. If RR is a 3×23 \times 2 matrix, RTRR^TR is…
  3. How many 5×55 \times 5 permutation matrices are there?
0 of 3 answered

Flashcards

1 / 4