Systems and matrices · Definition
Gaussian elimination
Before you start you need to know
Gaussian elimination solves a linear system systematically, using row operations until a row echelon form is reached.
Definition
Gaussian elimination solves a linear system by reducing its augmented matrix, with coefficients \(A\) and vector \(\mathbf b\), to an echelon form \(U\) using elementary row operations.
Solving a system by substitution works with two or three unknowns but quickly becomes unmanageable. Gaussian elimination, which Gauss used for astronomical computations and which already appears in ancient Chinese texts, organizes the work: the first equation is used to eliminate the first unknown from all the others, then the second to eliminate the second, and so on until a staircase system is obtained that is easy to solve from the bottom up.
The three elementary operations (swapping rows, scaling a row, adding a multiple of one row to another) are reversible, which is why they do not change the solutions: the final system is equivalent to the original. Each pivot is the first nonzero entry of a row; if a pivot is zero at some step, rows are swapped. If a row \((0\ \cdots\ 0\mid b)\) with \(b\neq0\) appears, the system is inconsistent; if some unknowns have no pivot, they are free variables and there are infinitely many solutions.
A guiding example: from \(\left[\begin{array}{cc|c}1&1&3\\2&-1&0\end{array}\right]\), subtracting twice row 1 from row 2 gives \(-3y=-6\), so \(y=2\) and \(x=1\). A common mistake is to forget to apply the operation to the right-hand-side column as well. Later we will see that each step amounts to multiplying by an elementary matrix. The elementary row operations (swapping two rows, multiplying one by a nonzero scalar, adding a multiple of one row to another) do not change the solution set.
Think about it
Why is multiplying a row by zero not an allowed elementary operation?
Because it is not reversible: it destroys information and can change the solution set.
Exercises 10
- Which of these is NOT an elementary row operation?
- Solve \(\begin{cases}x+y=3\\2x-y=0\end{cases}\).
- In the augmented matrix \(\begin{pmatrix}1&2&5\\2&3&8\end{pmatrix}\), apply \(R_2\leftarrow R_2-2R_1\). What is the new row 2?
- In \(\begin{pmatrix}0&2&1\\3&1&0\end{pmatrix}\), the \((1,1)\) entry is zero. What should you do to get a pivot in the first column?
- Solve \(\begin{cases}x+y+z=6\\2y+z=7\\x-z=-2\end{cases}\).
- After elimination, a system has the row \((0\ \ 0\ \ |\ \ 4)\). What can you conclude?
- A consistent system with 3 equations and 4 unknowns has \(2\) pivots in echelon form. How many free variables does it have?
- Which of these matrices is in row echelon form?
- Use elimination to find the rank of \(\begin{pmatrix}1&2&3\\2&4&6\\1&0&1\end{pmatrix}\).
- For which values of \(k\) does the system \(\begin{cases}x+y=1\\2x+2y=k\end{cases}\) have no solution?
What comes next
References
- Gilbert Strang, Introduction to Linear Algebra, 6th edition, Wellesley-Cambridge Press, 2023. §2.2
- Sheldon Axler, Linear Algebra Done Right, 4th edition, Springer, 2024. §3.C