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

The geometry of linear equations

The fundamental problem of linear algebra is to solve n linear equations in n unknowns, Ax = b. There are three ways to see it. The row picture takes one equation at a time: in two dimensions each is a line and the solution is where the lines meet; in three dimensions each is a plane. The column picture, the important one, asks for the linear combination of the columns of A that produces b. For 2x − y = 0, −x + 2y = 3, one of column (2, −1) plus two of column (−1, 2) gives (0, 3). If the columns are independent, their combinations fill the whole space and Ax = b is solvable for every b: the matrix is invertible. If, say, the third column lies in the plane of the first two, only right-hand sides in that plane can be reached: the matrix is singular. The matrix form multiplies A by x either by rows (dot products) or, preferably, by columns: Ax is a combination of the columns of A.

You need this first

Full reading path (5 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)
On this page · 5 sections
  1. Two equations, two unknowns
  2. Three equations, three unknowns
  3. Every right-hand side?
  4. Matrix times vector
  5. Summary

The first lecture of 18.06 states the fundamental problem of linear algebra, solving a system of linear equations, and looks at it in three ways: the row picture, the column picture and the matrix form (transcript, p. 1). It builds on the vectors and dot products of 18.02 and on planes and linear systems there.

Two equations, two unknowns#

Take (transcript, p. 2)

A 2 × 2 system
2x−y=0,−x+2y=3;(2−1−12)(xy)=(03)2x - y = 0, \qquad -x + 2y = 3; \qquad \begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0 \\ 3 \end{pmatrix}
In words

2 x minus y equals 0, minus x plus 2 y equals 3; 2 minus 1; minus 1 2 x; y equals 0; 3

A matrix is a rectangular array of numbers; here the coefficient matrix AA multiplies the vector of unknowns xx to give the right-hand side bb: Ax=bAx = b (p. 2).

Row picture (pp. 2–4). Plot all points satisfying each equation. 2x−y=02x - y = 0 passes through (0,0)(0, 0) and (1,2)(1, 2): a line, which is where the word linear comes from (p. 3). −x+2y=3-x + 2y = 3 does not pass through the origin; it contains (−3,0)(-3, 0) and (−1,1)(-1, 1) (p. 4). The two lines meet at the solution x=1x = 1, y=2y = 2; check: −1+4=3-1 + 4 = 3 (p. 4).

Column picture (pp. 5–8), the key one. Read the equations a column at a time (p. 5):

Column picture
x(2−1)+y(−12)=(03)x\begin{pmatrix} 2 \\ -1 \end{pmatrix} + y\begin{pmatrix} -1 \\ 2 \end{pmatrix} = \begin{pmatrix} 0 \\ 3 \end{pmatrix}
In words

x 2; minus 1 plus y minus 1; 2 equals 0; 3

The left side is a linear combination of the columns, the most fundamental operation in the course: multiply each column by a number and add (p. 5). The problem asks for the right numbers. Draw column 1, (2,−1)(2, -1), then attach two copies of column 2, (−1,2)(-1, 2), at its tip: the arrows end at (0,3)(0, 3), which is bb (pp. 6–8). Componentwise, 2−2=02 - 2 = 0 and −1+4=3-1 + 4 = 3 (p. 8). All combinations of these two columns would fill the whole plane, so every right-hand side could be reached (p. 8).

The row picture of the 2 × 2 system: the lines y=2xy = 2x and y=(3+x)/2y = (3 + x)/2, computed from the two equations, meet at the solution (1, 2).

Three equations, three unknowns#

Now (transcript, p. 9)

A 3 × 3 system
(2−10−12−10−34)(xyz)=(0−14)\begin{pmatrix} 2 & -1 & 0 \\ -1 & 2 & -1 \\ 0 & -3 & 4 \end{pmatrix}\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 0 \\ -1 \\ 4 \end{pmatrix}
In words

2 minus 1 0; minus 1 2 minus 1; 0 minus 3 4 x; y; z equals 0; minus 1; 4

Row picture (pp. 10–12). Each equation is a plane in three dimensions. The second, −x+2y−z=−1-x + 2y - z = -1, misses the origin but contains (1,0,0)(1, 0, 0), (0,0,1)(0, 0, 1) and (0,−12,0)(0, -\frac{1}{2}, 0) (p. 10). Two planes meet in a line, and the third plane cuts that line at a point, the solution (p. 11). But three planes are much harder to picture than two lines, and four dimensions harder still (p. 12).

Column picture (pp. 12–14). Find the combination (p. 12)

Column picture in three dimensions
x(2−10)+y(−12−3)+z(0−14)=(0−14)x\begin{pmatrix} 2 \\ -1 \\ 0 \end{pmatrix} + y\begin{pmatrix} -1 \\ 2 \\ -3 \end{pmatrix} + z\begin{pmatrix} 0 \\ -1 \\ 4 \end{pmatrix} = \begin{pmatrix} 0 \\ -1 \\ 4 \end{pmatrix}
In words

x 2; minus 1; 0 plus y minus 1; 2; minus 3 plus z 0; minus 1; 4 equals 0; minus 1; 4

In this specially chosen example bb is the third column itself, so x=0x = 0, y=0y = 0, z=1z = 1 (pp. 13–14). With the new right-hand side column 1 + column 2 =(1,1,−3)= (1, 1, -3), the solution would be (1,1,0)(1, 1, 0) (p. 14). In general neither picture shows the answer directly; the systematic method is elimination, the next lecture (p. 14).

Every right-hand side?#

Can Ax=bAx = b be solved for every bb? In combination language: do the linear combinations of the columns fill three-dimensional space? (transcript, p. 15). For this matrix, yes: it is non-singular, or invertible (p. 16). It fails if the three columns lie in one plane, for example if column 3 is column 1 plus column 2: then all combinations stay in that plane, and right-hand sides off it are unreachable. That matrix is singular (p. 16).

The same holds in nine dimensions: nine columns of nine components each. A random 9×99 \times 9 matrix, Strang says, is invertible (with probability one), its columns' combinations filling nine-dimensional space; if the ninth column equals the eighth, they only fill a kind of eight-dimensional plane inside it (pp. 17–18).

Matrix times vector#

How do you multiply a matrix by a vector? Strang's favourite way is by columns (transcript, pp. 18–19):

Multiplication by columns
(2513)(12)=1(21)+2(53)=(127)\begin{pmatrix} 2 & 5 \\ 1 & 3 \end{pmatrix}\begin{pmatrix} 1 \\ 2 \end{pmatrix} = 1\begin{pmatrix} 2 \\ 1 \end{pmatrix} + 2\begin{pmatrix} 5 \\ 3 \end{pmatrix} = \begin{pmatrix} 12 \\ 7 \end{pmatrix}
In words

2 5; 1 3 1; 2 equals 1 2; 1 plus 2 5; 3 equals 12; 7

By rows it is two dot products: (2,5)⋅(1,2)=12(2, 5)\cdot(1, 2) = 12 and (1,3)⋅(1,2)=7(1, 3)\cdot(1, 2) = 7 (p. 19). Both give the same answer, but think of it this way: AxAx is a combination of the columns of AA (p. 19). So if bb were (12,7)(12, 7), the solution of Ax=bAx = b would be x=(1,2)x = (1, 2) (p. 20).

Worked example

Pictures of a new system

(a) Solve x+2y=5x + 2y = 5, 3x−y=13x - y = 1 in both pictures. (b) Is b=(1,2,3)b = (1, 2, 3) reachable from the columns (1,0,1)(1, 0, 1), (0,1,1)(0, 1, 1), (1,1,2)(1, 1, 2)? (c) Compute (31−24)(2−1)\begin{pmatrix} 3 & 1 \\ -2 & 4 \end{pmatrix}\begin{pmatrix} 2 \\ -1 \end{pmatrix} by columns.

(a) Both pictures

Row picture: the lines y=(5−x)/2y = (5 - x)/2 and y=3x−1y = 3x - 1 meet where 5−x=6x−25 - x = 6x - 2, at x=1x = 1, y=2y = 2. Column picture: 1⋅(1,3)+2⋅(2,−1)=(5,1)1\cdot(1, 3) + 2\cdot(2, -1) = (5, 1).

(b) A singular case

The third column is the sum of the first two, so all combinations lie in one plane: vectors (p,q,p+q)(p, q, p + q). Here 1+2=31 + 2 = 3, so bb is in the plane and reachable, for example as 1⋅(1,0,1)+2⋅(0,1,1)1\cdot(1, 0, 1) + 2\cdot(0, 1, 1). But (1,2,4)(1, 2, 4) would not be.

(c) By columns

2⋅(3,−2)−1⋅(1,4)=(6−1,−4−4)=(5,−8)2\cdot(3, -2) - 1\cdot(1, 4) = (6 - 1, -4 - 4) = (5, -8).

Summary#

  • Ax=bAx = b: nn linear equations in nn unknowns.
  • Row picture: lines (or planes) meeting at the solution. Column picture: the combination of columns that produces bb.
  • Ax=bAx = b is solvable for every bb when the columns' combinations fill the space (invertible); not when the columns lie in a lower-dimensional plane (singular).
  • AxAx is a combination of the columns of AA.

Symbols on this page

Show the 12 symbols used here
×\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”.
zz z.
The third unknown. Say it: “z”.
xx x.
The first unknown; in bold, the vector of unknowns. Say it: “x”.
yy y.
The second unknown. Say it: “y”.
nn n.
The number of equations and unknowns. Say it: “n”.
AA A.
The coefficient matrix of the system Ax = b. Say it: “capital A”.
bb b.
The right-hand side vector. Say it: “b”.
qq q.
The second entry of a vector in the plane of the columns. Say it: “q”.
pp p.
The first entry of a vector in the plane of the columns. Say it: “p”.
x1x_{1} x 1.
The coefficient of column 1 in Ax. Say it: “x one”.
x2x_{2} x 2.
The coefficient of column 2 in Ax. Say it: “x two”.

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

Words on this page

Show the 16 words used here

New here

linear.
Of a map, operator or equation: respecting sums and multiples, so that L(au + bv) = aL(u) + bL(v).
row picture.
Seeing a system of linear equations as lines, planes or higher-dimensional planes, one per equation, that meet at the solution.
column picture.
Seeing a system Ax = b as the question of which combination of the columns of A gives b.
coefficient matrix.
The matrix of the numbers that multiply the unknowns in a system of linear equations.
linear combination.
A sum of vectors, each first multiplied by a number, such as 3u + 2v.
elimination.
Solving equations by subtracting multiples of one from another until each unknown can be found in turn.
non-singular.
Of a square matrix: invertible, with a determinant that is not zero.
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.
singular.
Of a square matrix: having no inverse, because its determinant is zero and some nonzero vector is sent to zero.

Also used

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.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
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.
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.
dimension.
The number of vectors in any basis of a vector space or subspace. Explained in Independence, basis and dimension.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.
systematic.
Following a fixed method; of an error, one that pushes every result the same way, so averaging does not remove it.

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. In the column picture, solving Ax=bAx = b means…
  2. What is (2513)(12)\begin{pmatrix} 2 & 5 \\ 1 & 3 \end{pmatrix}\begin{pmatrix} 1 \\ 2 \end{pmatrix}?
  3. When can Ax=bAx = b fail to have a solution for some bb (with AA 3×33 \times 3)?
0 of 3 answered

Flashcards

1 / 3