Lecture 2: Gaussian Elimination and Solution Sets
These notes are interactive: click any dotted term to unfold its exact definition or statement in place, click ▸ Proof to expand a proof, and try the exercises — answers are checked instantly.
2.1 Echelon forms and Gaussian elimination
Some systems are effortless: if each equation involves fewer variables than the one above it — a triangular, staircase pattern — then the solution can be read off with hardly any work. Gaussian elimination is the strategy of using row operations to drive any augmented matrix into that staircase shape. This section defines the target shape precisely and proves the algorithm always reaches it.
A matrix is in row echelon form (REF, “triangular form”) if:
- the first nonzero entry (the leading entry) of each nonzero row lies strictly to the right of the leading entry of the row above it;
- all rows consisting entirely of zero (if any) are at the bottom.
- every leading entry is ;
- each leading is the only nonzero entry in its column.
Every matrix can be transformed by elementary row operations into row echelon form, and further into reduced row echelon form.
We describe the algorithm; it clearly terminates, which proves the statement. Find the leftmost nonzero column and swap rows so its top entry is nonzero — this is the first pivot. Add suitable multiples of the pivot row to the rows below to make every entry below the pivot zero. Now ignore the pivot row and repeat the procedure on the remaining rows. Since each round consumes at least one row, the process stops, and by construction the result satisfies the two echelon conditions. For the reduced form: scale each pivot row so its leading entry is , then, working from the rightmost pivot to the left, add multiples of each pivot row to the rows above it to clear the rest of each pivot column.
□A matrix has many different row echelon forms, but its reduced row echelon form is unique — so the pivot positions do not depend on the order of operations. We take this fact on faith today and prove it later in the course, once we have the language of linear independence.
Solve , , . Working on the augmented matrix: The matrix is now in row echelon form with three pivots. Continue to the reduced row echelon form by clearing the entries above each pivot, from the rightmost pivot leftward: Each row of the reduced form names a single variable: , , . The unique solution (in the transpose notation) is read straight off the last column; substituting it into all three original equations confirms it.
Which of the following augmented matrices (four variables) is in reduced row echelon form?
Check all four conditions: zero rows at the bottom, leading entries moving right, leading entries equal to , and each leading alone in its column. One option violates the zero-row rule; another is in echelon form but has a nonzero entry above a pivot.
How many pivot columns does the augmented matrix (four variables) have?
The last row is twice the first, so makes it zero. Where are the leading entries of the three remaining rows?
2.2 Solution sets: parametric form
Once the staircase is reached, the variables split into two kinds: those that sit on pivots, which the equations determine, and the rest, which are genuinely free — dials we may set to any values whatsoever, each setting producing exactly one solution. Describing the solution set means expressing the pivot variables in terms of the dials.
Suppose the augmented matrix of a consistent system has been brought to row echelon form. The variables corresponding to pivot columns of the coefficient matrix are called basic variables; all other variables are free variables.
Let be any constants and consider the system The augmented matrix is already in echelon form, with pivots in columns , , : the basic variables are , and the remaining variables are free — six columns, three pivots, free variables. The echelon form tells us which variables are free; to read off all the solutions, continue to the reduced row echelon form by clearing the entries above each pivot, working from the rightmost pivot leftward: In the reduced form each pivot row contains exactly one basic variable, so every basic variable is expressed directly in terms of the free ones — nothing left to solve. Solving each pivot row for its basic variable gives the parametric form with arbitrary. There is no need to rename the free variables: they are already names, and every choice of the three numbers produces exactly one solution.
To get the parametric vector form, first assemble the solution into a single column, using the parametric form for the basic entries and the free variables themselves for the rest: Now split that one column into the constant part plus the part carried by each free variable: again with arbitrary. Every solution appears exactly once as range over : one particular solution built from the constants, plus one direction vector per free variable. Geometrically the solution set is a three-dimensional flat sheet inside . Note also that this works for every choice of — each row carries a pivot, a fact whose meaning is part of the theorem below.
There is an alternative to reducing all the way to the reduced form: backward substitution directly from the echelon form. In the example above, solve the last equation for its basic variable , substitute the result into the equation above it and solve for , then substitute both into the first equation and solve for — working upward, one equation at a time. It produces the same answer.
Use it only on small systems worked by hand. For anything larger, the reduced row echelon form is the organized way to extract the complete solution set: each pivot row hands you one basic variable already expressed in the free ones, with no chain of substitutions to carry along and no opportunity to lose a term along the way.
In the parametric example, take and choose the free variables , , . What is the value of in the resulting solution?
From the parametric form, .
2.3 Existence and uniqueness
Let be the coefficient matrix of a linear system, and bring the augmented matrix to row echelon form. Then:
- (Existence) The system is consistent if and only if the echelon form has no row of the shape with — that is, if and only if the last (augmented) column is not a pivot column.
- (Uniqueness) A consistent system has a unique solution if and only if every column of is a pivot column; otherwise it has infinitely many solutions.
- (Counting) The number of free variables equals minus the number of pivots, i.e.
- (Existence for every right-hand side) If every row of contains a pivot position, then is consistent for every choice of .
(1) A row with represents the equation , which no choice of variables satisfies, so the system is inconsistent; and by the equivalence theorem the original system is inconsistent too. Conversely, if no such row appears, back-substitution constructs a solution: work upward through the nonzero rows, assigning each free variable an arbitrary value (say ) and solving each pivot row for its basic variable in terms of already-determined variables. This produces a solution, so the system is consistent.
(2) Suppose the system is consistent. If every column of is a pivot column, there are no free variables, and back-substitution determines each variable uniquely from the rows beneath it — there are no choices anywhere, so there is exactly one solution. If some column of is not a pivot column, its variable is free, and the construction in (1) produces a different solution for each of its infinitely many possible values — so the solution is not unique, and in fact there are infinitely many.
(3) The variables correspond to the columns of . In an echelon form the pivots occupy distinct columns, and by definition the pivot columns of name the basic variables while all remaining columns name free variables. Hence exactly variables are free.
(4) Row-reduce alone to an echelon form ; applying the same row operations to yields , which is again in echelon form. Since every row of contains a pivot position, every row of is nonzero, so no row of can have the forbidden shape with . By part (1) the system is consistent — and this argument never used the entries of , so it holds for every right-hand side.
The final statement follows from (1) and (2): the three cases — inconsistent, consistent with every column of a pivot column, consistent with some column free — are exhaustive and produce no solution, one solution, and infinitely many solutions respectively.
□For , , the row operation gives the row , i.e., the false equation . By the existence theorem the system is inconsistent — this is case (ii) of the opening example of Lecture 1, parallel lines, seen through algebra: the left-hand sides are proportional but the right-hand sides are not.
The same principle decides bigger systems. Consider four equations in five unknowns with the augmented matrix below, and run Gaussian elimination column by column. First column: the top-left is the first pivot; clear everything below it. Second column: the in row is the next pivot; clear below it. Stop right here. We are only halfway to echelon form — rows and would still need a swap — but row already reads , the impossible equation . By part (1) of the theorem the system is inconsistent, and no amount of further elimination can change that. This early exit is worth remembering: the moment a row with appears, the system has no solution, and the computation is over.
For which values of and is the following system consistent? Row-reduce the augmented matrix, treating and as unknown constants: Now read the last row through the existence–uniqueness theorem.
Case . The entry is nonzero, so it is a third pivot, and there are no free variables: the system is consistent with a unique solution — for every value of .
Case . The last row becomes (note here). If this row says : inconsistent. If the row vanishes, leaving two pivots and one free variable: consistent with infinitely many solutions.
Conclusion. The system is consistent exactly when (any ; unique solution), or and (infinitely many solutions). Note how all three cases of the theorem appear in a single family of systems as the parameters vary.
Gaussian elimination is the computational engine of everything that follows. Next week we look at the vectors and themselves — the geometry of — and re-interpret in a way that explains why solution sets look like points, lines, and planes.
In the parameter example, suppose . For which value of is the system consistent?
Substitute into the last row of the reduced matrix in the example.
A linear system of equations in unknowns turns out to have the two distinct solutions and . What can you conclude?
Apply the last sentence of the existence–uniqueness theorem: which of the three cases allows two distinct solutions?
Index of statements
- Definition 2.1 (Row echelon form, reduced row echelon form)
- Theorem 2.2 (Gaussian elimination)
- Remark 2.3
- Example 2.4 (Elimination with a unique solution)
- Definition 2.5 (Basic and free variables)
- Example 2.6 (Parametric form and parametric vector form)
- Remark 2.7 (Backward substitution)
- Theorem 2.8 (Existence and uniqueness)
- Example 2.9 (Inconsistent systems)
- Example 2.10 (A consistency problem with parameters)
- Remark 2.11