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

Orthogonal vectors and subspaces

The chapter on orthogonality starts with the big picture: the row space is perpendicular to the nullspace, and the column space to the left nullspace. Two vectors are orthogonal when xᵀy = 0; Pythagoras, ‖x‖² + ‖y‖² = ‖x + y‖², reduces to exactly that, since the length squared is xᵀx (14 for (1, 2, 3)). The zero vector is orthogonal to every vector. Subspaces S and T are orthogonal when every vector in S is orthogonal to every vector in T; so a wall and the floor are not orthogonal, since they share a line. Ax = 0 says that x is orthogonal to every row of A, and so to every combination of rows: the row space and the nullspace are orthogonal, and since their dimensions r and n − r add to n, they are orthogonal complements in Rⁿ; the nullspace holds all vectors perpendicular to the rows. For A with rows (1, 2, 5) and (2, 4, 10) the nullspace is the plane perpendicular to (1, 2, 5). The rest of the chapter solves Ax = b when there is no solution, as with many noisy measurements, through AᵀAx̂ = Aᵀb. AᵀA is square and symmetric, has the same nullspace and rank as A, and is invertible exactly when the columns of A are independent.

You need this first

Full reading path (15 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. Column space and nullspace (18.06)
  12. Solving Ax = 0: pivot variables and special solutions (18.06)
  13. Solving Ax = b: the complete solution (18.06)
  14. Independence, basis and dimension (18.06)
  15. The four fundamental subspaces (18.06)
On this page · 5 sections
  1. Orthogonal vectors
  2. Orthogonal subspaces
  3. The row space is orthogonal to the nullspace
  4. Coming next: solving Ax = b with no solution
  5. Summary

A new chapter, about orthogonality: of vectors, of subspaces, of bases (transcript, p. 1). The big picture of the four subspaces already has their dimensions, rr and n−rn - r in Rn\mathrm{R}^n, rr and m−rm - r in Rm\mathrm{R}^m. Now it turns out that the two subspaces on each side meet at ninety degrees (p. 1). It continues the four fundamental subspaces, and uses the dot product.

Orthogonal vectors#

Orthogonal means perpendicular: in nn dimensions, the angle between the vectors is ninety degrees (transcript, p. 2). The test is the dot product, written as a row times a column (p. 2):

Test for orthogonality
xTy=x1y1+x2y2+⋯+xnyn=0x^Ty = x_1y_1 + x_2y_2 + \cdots + x_ny_n = 0
In words

x^ capital T y equals x one y one plus x two y two plus and so on plus x sub n y sub n equals 0

Why, from Pythagoras (pp. 3–6). For a right triangle with sides xx, yy and hypotenuse x+yx + y, ∥x∥2+∥y∥2=∥x+y∥2\|x\|^2 + \|y\|^2 = \|x + y\|^2, which is not true for other triangles (p. 3). The length squared of a vector is xTx=x12+⋯+xn2x^Tx = x_1^2 + \cdots + x_n^2, positive unless x=0x = 0; for x=(1,2,3)x = (1, 2, 3) it is 1+4+9=141 + 4 + 9 = 14 (p. 4). (Strang says the length is fourteen; the length squared is 14, the length 14\sqrt{14}.) Take y=(2,−1,0)y = (2, -1, 0), with xTy=0x^Ty = 0: then ∥y∥2=5\|y\|^2 = 5, x+y=(3,1,3)x + y = (3, 1, 3) has ∥x+y∥2=19\|x + y\|^2 = 19, and indeed 14+5=1914 + 5 = 19 (pp. 4–5). In letters (pp. 5–6):

Pythagoras gives the dot product test
xTx+yTy=(x+y)T(x+y)=xTx+yTy+xTy+yTx  ⇒  2xTy=0x^Tx + y^Ty = (x + y)^T(x + y) = x^Tx + y^Ty + x^Ty + y^Tx \;\Rightarrow\; 2x^Ty = 0
In words

x^ capital T x plus y^ capital T y equals the quantity x plus y, all ^ capital T the quantity x plus y, equals x^ capital T x plus y^ capital T y plus x^ capital T y plus y^ capital T x which gives 2 x^ capital T y equals 0

since xTy=yTxx^Ty = y^Tx for real vectors (p. 5). The zero vector is orthogonal to every vector (pp. 6–7).

Orthogonal subspaces#

Orthogonal subspaces
S⊥T:sTt=0 for every s in S and every t in TS \perp T: \quad s^Tt = 0 \text{ for every } s \text{ in } S \text{ and every } t \text{ in } T
In words

capital S perpendicular capital T : s^ capital T t equals 0 for every s in capital S and every t in capital T

Subspace SS is orthogonal to subspace TT when every vector in SS is orthogonal to every vector in TT (transcript, pp. 7–8). Are the blackboard plane and the floor plane (with the origin at a corner) orthogonal? No: a vector along the line where they meet lies in both, and it is not orthogonal to itself (pp. 8–9). Orthogonal subspaces meet only at zero, and need more than that (p. 9). In the plane: a line through the origin is never orthogonal to the whole plane, always orthogonal to the zero subspace, and orthogonal to another line exactly when they meet at ninety degrees (pp. 9–10).

The row space is orthogonal to the nullspace#

All that is known about xx in the nullspace is Ax=0Ax = 0 (transcript, p. 10). Written out by rows (pp. 10–11):

Ax = 0 row by row
(row 1row 2⋯row m)x=(00⋯0)\begin{pmatrix} \text{row } 1 \\ \text{row } 2 \\ \cdots \\ \text{row } m \end{pmatrix} x = \begin{pmatrix} 0 \\ 0 \\ \cdots \\ 0 \end{pmatrix}
In words

row 1; row 2; and so on; row m x equals 0; 0; and so on; 0

each equation says that a row dotted with xx is zero: xx is orthogonal to every row. It is then orthogonal to every combination of rows, the whole row space (pp. 11–12):

Orthogonal to combinations
(c1 row1+c2 row2+⋯ )Tx=0(c_1\,\text{row}_1 + c_2\,\text{row}_2 + \cdots)^T x = 0
In words

the quantity c one row sub 1 plus c two row sub 2 plus and so on, all ^ capital T x equals 0

The same argument for ATA^T shows that the column space is orthogonal to the left nullspace (p. 12). So Rn\mathrm{R}^n is cut into two perpendicular subspaces, and so is Rm\mathrm{R}^m (pp. 12–13).

Orthogonal complements (pp. 13–15). Two perpendicular lines in R3\mathrm{R}^3 cannot be the row space and nullspace of a matrix, because r+(n−r)r + (n - r) must be 3 (p. 13). Take the rank-one matrix (p. 13)

A rank-one example
A=(1252410)A = \begin{pmatrix} 1 & 2 & 5 \\ 2 & 4 & 10 \end{pmatrix}
In words

capital A equals 1 2 5; 2 4 10

Its row space is the line through (1,2,5)(1, 2, 5); its nullspace has dimension 3−1=23 - 1 = 2, the plane perpendicular to (1,2,5)(1, 2, 5). The second row changes nothing: the single equation x1+2x2+5x3=0x_1 + 2x_2 + 5x_3 = 0 gives the plane, and (1,2,5)(1, 2, 5) is the normal vector from calculus (pp. 14–15). So the nullspace contains all vectors perpendicular to the row space, not just some: the two are orthogonal complements in Rn\mathrm{R}^n (p. 15). Strang calls this part of the fundamental theorem of linear algebra (the dimensions being one part, orthogonality another, and orthogonal bases still to come) (p. 16).

Coming next: solving Ax = b with no solution#

The main problem of the chapter is to "solve" Ax=bAx = b when there is no solution, bb not being in the column space (transcript, pp. 16–17). This is done all the time: a thousand measurements of a satellite with six unknown parameters, or a pulse rate measured many times, give too many equations, with noise in bb but information too (p. 17). Throwing away equations until the system is square is not satisfactory: all measurements should be used (p. 18). The key matrix is ATAA^TA, and the central equation of the chapter, for a best solution x^\hat x, will be (pp. 19–21)

The central equation
ATAx^=ATbA^TA\hat x = A^Tb
In words

capital A ^ capital T capital A x hat equals capital A ^ capital T b

ATAA^TA is square (n×nn \times n) and symmetric, since (ATA)T=ATA(A^TA)^T = A^TA (pp. 19–20). For three equations in two unknowns (pp. 21–22):

An example of AᵀA
A=(111215),ATA=(38830)A = \begin{pmatrix} 1 & 1 \\ 1 & 2 \\ 1 & 5 \end{pmatrix}, \qquad A^TA = \begin{pmatrix} 3 & 8 \\ 8 & 30 \end{pmatrix}
In words

capital A equals 1 1; 1 2; 1 5, capital A ^ capital T capital A equals 3 8; 8 30

which is invertible. But not always: Strang changes AA to a rank-one matrix and finds entries 9, 9 and 27, a singular ATAA^TA (pp. 22–23). The transcript does not read out the new AA; keeping the first column (1,1,1)(1, 1, 1), the only second column that fits is (3,3,3)(3, 3, 3), giving ATAA^TA with entries 3, 9, 9 and 27. A product involving a rank-one matrix cannot have rank above one (p. 23). In general (p. 23):

Nullspace and rank of AᵀA
N(ATA)=N(A),rank⁡(ATA)=rank⁡(A)N(A^TA) = N(A), \qquad \operatorname{rank}(A^TA) = \operatorname{rank}(A)
In words

capital N ( capital A ^ capital T capital A ) equals capital N ( capital A ), r a n k ( capital A ^ capital T capital A ) equals r a n k ( capital A )

so ATAA^TA is invertible exactly when the columns of AA are independent (p. 23). Strang promises the reason as soon as he can; the proof comes in Lecture 16.

Worked example

Orthogonality of your own

(a) For A=(1−122−24)A = \begin{pmatrix} 1 & -1 & 2 \\ 2 & -2 & 4 \end{pmatrix}, find a basis of the nullspace and check that it is orthogonal to the row space. (b) Check Pythagoras for x=(2,1,2)x = (2, 1, 2) and y=(1,0,−1)y = (1, 0, -1). (c) Is ATAA^TA invertible for A=(101113)A = \begin{pmatrix} 1 & 0 \\ 1 & 1 \\ 1 & 3 \end{pmatrix}?

(a) Nullspace

The rank is 1; the one equation is x1−x2+2x3=0x_1 - x_2 + 2x_3 = 0, with free x2x_2, x3x_3. Special solutions: (1,1,0)(1, 1, 0) and (−2,0,1)(-2, 0, 1). Both are orthogonal to (1,−1,2)(1, -1, 2): 1−1+0=01 - 1 + 0 = 0 and −2+0+2=0-2 + 0 + 2 = 0. Dimensions 1+2=31 + 2 = 3.

(b) A right triangle

xTy=2+0−2=0x^Ty = 2 + 0 - 2 = 0. ∥x∥2=9\|x\|^2 = 9, ∥y∥2=2\|y\|^2 = 2, and x+y=(3,1,1)x + y = (3, 1, 1) has ∥x+y∥2=11=9+2\|x + y\|^2 = 11 = 9 + 2.

(c) AᵀA

ATA=(34410)A^TA = \begin{pmatrix} 3 & 4 \\ 4 & 10 \end{pmatrix}, with determinant 30−16=14≠030 - 16 = 14 \ne 0: invertible, as it must be, since the columns of AA are independent.

Summary#

Symbols on this page

Show the 27 symbols used here
≠\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”.
ı^\hat\imath hat.
A unit vector: a vector of length 1 that only gives a direction (î, r̂). Say it: “hat”.
zz z.
The third coordinate axis, in the xz-plane. Say it: “z”.
TT T.
As a superscript: the transpose. Alone: a subspace. Say it: “capital T”.
⊥\perp perpendicular.
Is orthogonal to: S ⊥ T means every vector in S is orthogonal to every vector in T. Say it: “perpendicular”.
xx x.
A vector; in Ax = 0, a vector in the nullspace. Also the first coordinate axis, in the xz- and xy-planes. Say it: “x”.
yy y.
A second vector, tested for orthogonality to x. Also the second coordinate axis. Say it: “y”.
tt t.
A vector in the subspace T. Say it: “t”.
nn n.
The number of columns of A, or of components of a vector. Say it: “n”.
mm m.
The number of rows of A. Say it: “m”.
rr r.
The rank of A. Say it: “r”.
AA A.
A matrix: the rank-one example with rows (1, 2, 5) and (2, 4, 10), or the 3 × 2 example with columns (1, 1, 1) and (1, 2, 5). Say it: “capital A”.
bb b.
The right-hand side of Ax = b, not in the column space. Say it: “b”.
ss s.
A vector in the subspace S. Say it: “s”.
NN N.
As in N(A): the nullspace. Say it: “capital N”.
SS S.
A subspace. Say it: “capital S”.
x1x_{1} x 1.
The first component of x. Say it: “x one”.
x2x_{2} x 2.
The second component of x. Say it: “x two”.
y1y_{1} y 1.
The first component of y. Say it: “y one”.
y2y_{2} y 2.
The second component of y. Say it: “y two”.
xnx_{n} x n.
The last component of x. Say it: “x sub n”.
x3x_{3} x three.
The third component of x. Say it: “x three”.
c1c_{1} c one.
The coefficient of row 1 in a combination of rows. Say it: “c one”.
c2c_{2} c two.
The coefficient of row 2 in a combination of rows. Say it: “c two”.
yny_{n} y n.
The last component of y. Say it: “y sub n”.

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

Words on this page

Show the 30 words used here

New here

vector.
A list of numbers written as a column, or more generally anything that can be added and multiplied by numbers.

Also used

subspace.
A set of vectors inside a larger space that is a space itself: sums and multiples of its vectors stay inside it. Explained in Transposes, permutations and vector spaces.
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.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
dimension.
The number of vectors in any basis of a vector space or subspace. Explained in Independence, basis and dimension.
four fundamental subspaces.
The column space, nullspace, row space and left nullspace of a matrix, whose dimensions are all fixed by its rank. Explained in The four fundamental subspaces.
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.
orthogonal.
At right angles; more generally, of two vectors or functions, having a dot product, or an integral of their product, of zero. Explained in Introduction to Fourier series.
perpendicular.
At right angles to a line, a surface or another direction. Explained in Inclined planes.
zero vector.
The vector whose components are all zero; adding it to any vector changes nothing. Explained in Transposes, permutations and vector spaces.
nullspace.
All the vectors x that a matrix sends to zero, that is, all solutions of Ax = 0. Explained in Column space and nullspace.
row space.
All the vectors that can be made by combining the rows of a matrix; it is the column space of its transpose. Explained in Matrix multiplication and inverse matrices.
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.
left nullspace.
The nullspace of the transpose of a matrix: all the combinations of its rows that give zero. Explained in The four fundamental subspaces.
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.
rank one.
Of a matrix: having rank exactly one, so it is a column times a row and every column is a multiple of one column. Explained in Matrix spaces, rank one and small-world graphs.
normal vector.
A vector at right angles to a plane or surface; it fixes which way the plane faces. Explained in Planes through three points, and matrices.
theorem.
A statement that has been proved true, step by step, from definitions and earlier results. Explained in Limits and continuity.
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.
noise.
Random, unpredictable fluctuations in a signal such as a current, a voltage or a measurement, on top of the value we want. Explained in Brownian motion, the Einstein relation and noise.
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.
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.
singular.
Of a square matrix: having no inverse, because its determinant is zero and some nonzero vector is sent to zero. Explained in The geometry of linear equations.
rank.
The number of independent columns of a matrix, which always equals the number of independent rows. Explained in Similar matrices and the Jordan form.
proof.
A chain of reasoning showing beyond doubt that a statement follows from definitions and results already known. Explained in Limits and continuity.
special solution.
A solution of Ax = 0 found by setting one free variable to 1 and the others to 0; together they build every solution. Explained in Solving Ax = 0: pivot variables and special solutions.
determinant.
A single number worked out from a square array of numbers (a matrix), which measures how the matrix stretches areas or volumes. Explained in Determinants and the cross product.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.
argument.
A chain of reasoning that leads to a conclusion; in maths also the input of a function, such as x in sin x.
in disguise.
Looking different on the surface but really the same as something already known.

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

32 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. Can the row space and the nullspace of a 3×33 \times 3 matrix both be lines?
  2. When is ATAA^TA invertible?
  3. Are the xzxz-plane and the xyxy-plane in R3\mathrm{R}^3 orthogonal subspaces?
0 of 3 answered

Flashcards

1 / 4