Scroll to turn the page
Linear Algebra · College Linear Algebra
lines, planes and where they meet
A linear equation adds up its unknowns, each times a number, and sets the total equal to a number: . No squares, no products of unknowns, no square roots. A system is several of them that must hold at once.
Each equation in three unknowns is a plane in space. The figure shows three:
As the right-hand sides change, the planes slide without turning, and the point where all three meet moves with them. When the planes settle where the equations put them, they meet at exactly one point, : check that it satisfies all three.
Linear algebra is the study of such systems, and of the vectors and matrices that describe them. It runs underneath computer graphics, data fitting, search engines, machine learning, circuits and quantum mechanics, because so many problems either are linear or are solved by approximating them with something linear.
one solution, none, or infinitely many
A solution of a system is a list of numbers that makes every equation true at once. The solution set is all of them. Two systems are equivalent when they have the same solution set.
With two unknowns, each equation is a line, and a solution is a point on every line. Two lines can only meet in three ways, shown left to right in the figure:
The grey point rides the first line. It solves the system only where it also lies on the blue one.
The same three outcomes hold for any number of equations and unknowns. A linear system has no solution, exactly one, or infinitely many; never exactly two. If it had two, every point on the line through them would also be a solution.
simplify the equations, keep the solutions
A system is stored as its augmented matrix: the coefficients, then a bar, then the right-hand sides. Three elementary row operations turn it into an equivalent system: replace a row by itself plus a multiple of another (replacement), swap two rows (interchange), and multiply a row by a nonzero number (scaling).
Each is reversible, and each keeps every solution, so they can be used freely to simplify. Take , :
The last matrix reads . In the figure each operation turns a line, but always about the same point (1, 2): the new row is a combination of rows that (1, 2) already satisfies.
A matrix is in echelon form when any all-zero rows are at the bottom and each row's first nonzero entry (its pivot) is to the right of the pivot above it. In reduced echelon form every pivot is 1 and is the only nonzero entry in its column. Every matrix row-reduces to exactly one reduced echelon form.
Columns with a pivot belong to basic variables; the rest are free variables, which can take any value. A system is consistent exactly when no row reduces to with ; then it has one solution if there are no free variables and infinitely many if there is at least one. This procedure is Gaussian elimination, though Chinese mathematicians used it, on counting boards, in the Nine Chapters on the Mathematical Art about two thousand years ago.
the same system, read down its columns
A vector in is a list of n numbers, written as a column. Vectors add entry by entry and multiply by scalars entry by entry. A linear combination of is for some weights .
The system of the last page asks for weights on its columns:
Read across, this is the two equations again. Read as vectors, it asks: how much of and how much of add up to b? The figure lays and tip to tail. With the weights from row reduction, and , they land exactly on b:
Two pictures of one problem: the row picture (lines crossing) and the column picture (arrows combining). A vector equation has the same solutions as the system whose augmented matrix is .
and the span of the columns
The product of a matrix A with columns and a vector x in is the combination of the columns with the entries of x as weights: . So a system, a vector equation and the matrix equation are three ways of writing one problem.
The span of a set of vectors is every linear combination of them. has a solution exactly when b is in the span of the columns of A.
In the figure, and span a plane through the origin, the plane . The red arrow is a combination whose weights wander; it never leaves the plane. The vector is on it. The vector is not, since , and row reduction says so too:
The last row says : no solution. For an m × n matrix the following are all true or all false: has a solution for every b; the columns span ; A has a pivot in every row. Two columns can never span : they give at most two pivots for three rows.
a particular solution plus the homogeneous ones
A system is homogeneous. It always has the trivial solution , and it has others exactly when it has a free variable.
Take the single equation . Let be free; then , and every solution is
This is parametric vector form: a line through the origin, blue in the figure. Now change the right side to 4: . One solution is , since . All of them are
the red line: the blue one slid over by p. The figure moves t: the blue arrow is a homogeneous solution, and the same arrow from the tip of p ends on the red line.
This is true of every consistent system: the solutions of are one particular solution plus every solution of . The reason is one line: if and , then .
when no vector is wasted
Vectors are linearly independent if the only weights that make are all zero. If some weights, not all zero, make the sum zero, the vectors are linearly dependent, and that equation is a dependence relation.
Take . Since ,
In the figure the three weighted vectors, laid tip to tail, close into a loop and end where they began. That is what dependence looks like: one of the vectors is a combination of the others and adds nothing to their span. Here and alone already span all of .
Testing it is row reduction: the columns of A are independent exactly when has only the trivial solution, which is exactly when every column has a pivot. Some shortcuts: