Category: Linear Algebra Level: 301
row operations: Ri → Ri - k Rj
Subtract multiples of one row from another to clear out the entries below each pivot. The staircase that remains solves from the bottom up.
Each equation becomes a row: the coefficients of x, y, z, then a bar, then the right side. Same information, less ink.
x + y + z = 6, 2x + y - z = 1, x - y + 2z = 5
Subtract two times row 1 from row 2. The x term in row 2 disappears.
R2 → R2 - 2R1
Subtract row 1 from row 3. Now column 1 has zeros under its pivot.
R3 → R3 - R1
Subtract two times the new row 2 from row 3. The y term in row 3 disappears too.
R3 → R3 - 2R2
The last row now says 7z = 21, with no x or y left. Divide to get z.
7z = 21 ⇒ z = 3
Put z = 3 into row 2 to get y, then put y and z into row 1 to get x. Each row up has only one unknown left.
(x, y, z) = (1, 2, 3)
cd svg-generator python3 -m svgmath render gaussian-elimination --out /tmp/gaussian-elimination
Source: svgmath/diagrams/matrix_ops.py