← Back to Blog
[Gilbert Strang] Gauss-Jordan Elimination
math > linear-algebra
2025-12-262 min read
#linear-algebra #math #vectors #gaussian-elimination
For example, let's solve the following system of linear equations.
{x−2y5x+2y=2=11
We can rewrite this system in matrix form as follows.
[15−22][xy]=[211]
This can be expressed more compactly using the augment matrix.
[15−22211]
This is called an augmented matrix.
When performing Gaussian elimination, we use the following elementary row operations.
- Multiply a row by a non-zero scalar.
- Swap two rows.
- Add a multiple of one row to another row.
Implementation of Gaussian Elimination
Step 1: Start with the augmented matrix corresponding to the system.
{x−2y5x+2y=2=11 → [15−22211]
Step 2: Multiply the first row by -5 to make the pivot for elimination easier when adding to the second row.
[−55102−1011]
Step 3: Add the second row to the modified first row (Row 1 + Row 2).
This gives a new first row of [0, 12, 1], while the second row remains unchanged.
The resulting matrix is
{−5x+10y12y=−10=1 → [−501012−101]
Now, we can get solution in linear equation.