Gaussian Elimination
Gaussian elimination is an algorithm for solving systems of linear equations based on the sequential elimination of unknowns. On this page, you will find a step-by-step description of the method, examples of solving 3×3 and 4×4 systems, and an analysis of special cases (systems with no solutions and systems with infinitely many solutions).
- definition of gaussian elimination
- example of solving a 3×3 system
- example of a 4×4 system
- special cases
Definition of Gaussian elimination
Gaussian elimination is an algorithm for solving systems of linear equations that involves sequentially transforming the system into row-echelon form (triangular or trapezoidal) using elementary row operations.
Key steps of the Gaussian elimination method:
- Write down the augmented matrix of the system (equation coefficients + column of constant terms)
- Reduce the matrix to row-echelon form (forward elimination):
- Select a pivot element (the first non-zero element in the row)
- Eliminate elements below the pivot by subtracting appropriate row combinations
- Move to the next column and repeat
- Back-substitution:
- Starting from the last row, express basic variables in terms of free variables (if any)
- If the system is consistent, obtain the solution
Example of solving a 3×3 system
Given system:
Step 1: Write the augmented matrix:
Step 2: Reduce to row-echelon form:
Step 3: Back-substitution:
Example of a 4×4 system
Given system:
1. Write the augmented matrix:
2. Forward elimination (reduction to row-echelon form):
- Step 1: If the first element is zero, swap rows so that it is non-zero
- Step 2: Eliminate elements below the pivot:
- Subtract row (1) multiplied by an appropriate coefficient from row (2)
- Do the same for rows (3) and (4)
- Step 3: Move to the second column and repeat the process for the submatrix
After transformations, the matrix takes the form:
3. Back-substitution:
- Find the last variable from the last equation
- Substitute it into the second-to-last equation to find the preceding variable
- Continue this process until all variables are found
Possible cases:
- Unique solution: All rows are in row-echelon form; no contradictions
- Infinitely many solutions: Fewer non-zero rows than variables in row-echelon form
- No solution: A row appears in the form "zero equals a non-zero number"
The Gaussian elimination method is universal and applicable to any linear system!
Special cases
Infinitely many solutions
If, during the transformation process, a row is obtained where all coefficients are zero and the constant term is also zero, then the system has infinitely many solutions.
No solutions
If a row is obtained where all coefficients are zero but the constant term is non-zero, then the system has no solutions.


