A square grid of the plane and its image under a linear map, a slanted lattice of parallelograms, drawn in grey lines on a dark ground
Unit 04 · All masterclasses · 75 min

Linear Equations and Matrices

Elimination, matrix arithmetic, maps of the plane, and determinants
Image: Own rendering

Systems of linear equations and their three possible outcomes, Gaussian elimination as it was practised in China two thousand years ago, matrices and the reason why their multiplication depends on the order of the factors, inverses, matrices as rotations, reflections, and shears of the plane, the determinant as signed area and volume, and the rotation matrices as a second model of the complex numbers. The unit closes with the cost of elimination and the open question of how fast two matrices can be multiplied.

Preview: the beginning of the unit

Every weather forecast and every bridge that is checked before it is built begins with the same task, which is to solve a system of linear equations, often with millions of unknowns. A Chinese text of the first century AD solves such systems by a procedure that is, step for step, the one taught in this unit, and that procedure is still the method of choice. On the way the unit meets the matrix, a rectangular array of numbers with an arithmetic of its own in which \(AB\) and \(BA\) differ. Matrices turn out to be maps of the plane, their determinant measures how much such a map stretches areas, and the rotation matrices give a second model of the complex numbers of Unit 3. The unit ends with a question that is still open, which is how fast two large matrices can be multiplied.

1 Systems of linear equations

An equation such as \(2x - 3y + z = 4\) is called linear because every unknown appears to the first power, multiplied by a number and by nothing else. A system of linear equations is a list of such equations in the same unknowns, and a solution is an assignment of numbers to the unknowns that makes every equation of the list true at once. The question of this unit is how to find all solutions, and the first thing to settle is what the set of solutions can look like.

Two unknowns are best understood with a picture. The solutions of a single equation \(ax + by = c\) with \(a\) and \(b\) not both zero form a line in the plane, so a system of two such equations asks where two lines meet. Two lines in the plane either cross in one point, or are parallel and never meet, or are the same line. For example, \(x + y = 3\) and \(x - y = 1\) cross in the single point \((2, 1)\), the lines \(x + y = 3\) and \(2x + 2y = 7\) are parallel and have no common solution, and \(x + y = 3\) together with \(2x + 2y = 6\) is twice the same line, so every point of that line is a solution.

With three unknowns the solutions of one equation \(ax + by + cz = d\) form a plane in space, a fact from coordinate geometry that the unit takes as known, and a system of three equations asks for the points common to three planes. Figure 1 shows the three kinds of answer. The planes may meet in exactly one point, as the floor and two walls of a room meet in a corner; they may share a whole line, like the pages of an open book sharing the spine; or they may have no point in common at all, for example when two of them are parallel, or when each pair meets in a line but the three lines are parallel to each other, like the three faces of a long triangular prism; the right-hand picture of Figure 1 shows the first of these two cases.

Three planes in space and the three possible kinds of common point. On the left the planes meet in a single point, in the middle they share a line, a…
Figure 1. Three planes in space and the three possible kinds of common point. On the left the planes meet in a single point, in the middle they share a line, and on the right two of them are parallel, so no point lies on all three.

What never happens, for any number of unknowns and equations, is a system with exactly two solutions, or exactly five, and the reason takes only a few lines. Suppose \(p\) and \(q\) are two different solutions of a linear equation \(ax + by + cz = d\), say \(p = (x_1, y_1, z_1)\) and \(q = (x_2, y_2, z_2)\), and take any number \(t\). The point \(p + t(q - p)\) lies on the line through \(p\) and \(q\); for \(t = 0\) it is \(p\), and for \(t = 1\) it is \(q\). Its first coordinate is \(x_1 + t(x_2 - x_1) = (1 - t)x_1 + t x_2\), and the other two coordinates have the same form. Substituting these coordinates into the left side and collecting the terms that contain \(x_1, y_1, z_1\) and those that contain \(x_2, y_2, z_2\) gives \[ (1 - t)(ax_1 + by_1 + cz_1) + t(ax_2 + by_2 + cz_2) = (1 - t)d + td = d , \] so it is a solution too. The same holds for every equation of the system at once, and the points \(p + t(q - p)\) for all real \(t\) form the whole line through \(p\) and \(q\). Two solutions therefore bring infinitely many with them.

A system with no solution is called inconsistent. The procedure of the next section decides which of the three cases holds and, in the first and third case, produces the solutions.

The full unit is part of the program

Want to see a complete unit first? Unit 3, Complex Numbers, is free to read.