Mathematics
Solving Systems of Linear Equations Using Gaussian Elimination
Quick fact
Gaussian elimination is one of the oldest numerical algorithms still in everyday use, and it forms the basis for most computer algebra systems when solving linear equations.
Why this is interesting
You’ve solved two equations with two unknowns by juggling numbers. What if you have fifty equations? There’s a method that turns the whole mess into a simple staircase—and it works no matter how big the system gets.
Read the full explanation
Understanding Solving Systems of Linear Equations Using Gaussian Elimination
Imagine you have a set of equations that all must be true at the same time—like finding the point where several lines cross. With two variables, you can eliminate one by substitution. But as the number of equations grows, doing this by inspection becomes hopeless. The trick is to notice that you can manipulate entire equations without changing the solution set. You can multiply an equation by a nonzero number, swap two equations, or add a multiple of one equation to another. These operations are like legal moves in a puzzle. Gaussian elimination organizes these moves into a systematic algorithm. You write the system as a matrix (a grid of numbers) and then use those legal moves to transform the matrix into a triangular form, where the first equation has the most variables, the second has one fewer, and so on. Once you have this staircase shape (row echelon form), you can start at the bottom and solve for one variable at a time, working your way up. This final step is called back substitution.
A deeper explanation
The power of Gaussian elimination lies in its use of elementary row operations, which are reversible and preserve the solution set of the system. By representing the system as an augmented matrix, we separate the coefficients from the constants and focus on the structure. The algorithm proceeds through each column from left to right. For each column, we find a nonzero entry (the pivot) in a row at or below the current position. If necessary, we swap rows to move the pivot into place. Then we use row operations to create zeros below the pivot. Repeating this process yields row echelon form, where each row's leading entry is to the right of the one above it. Once in row echelon form, we can determine whether the system has a unique solution, infinitely many solutions, or no solution at all. If there are rows with all zeros on the left but a nonzero constant on the right, the system is inconsistent. If there are fewer pivots than variables, some variables are free, leading to infinitely many solutions. This method is not just for humans—it is the foundation for algorithms in computers. When you solve linear equations in programming or engineering software, Gaussian elimination is often the underlying engine. It also leads to deeper concepts like matrix rank and the LU decomposition, which are used in many numerical applications.