StudyVisuallyStart studying
Part 08 · Vectors, matrices and linear systems · Card 8 of 9

Gaussian elimination

Use row operations to create zeros below each leading entry, until the system is in staircase (echelon) form. Then solve from the bottom row upwards.

Last updated

Analogy

Clearing a hallway one room at a time, starting from the bottom floor.

Example

[[2,1 | 5],[1,3 | 5]]

R2 minus (1/2)R1: [0, 2.5 | 2.5].So 2.5y = 2.5, y = 1.Then 2x + 1 = 5, so x = 2.Check: 2 + 3(1) = 5.

In practice

The standard method for solving any linear system, used by computer software.

Practice

Flashcards

  • What do you do after reaching echelon form?Back-substitute from the bottom row upwards.

Interview questions

  • Solve 2x + y = 5, x + 3y = 5 using Gaussian elimination and check your answer.
    • Augmented matrix [[2,1 | 5],[1,3 | 5]]
    • R2 minus half of R1 gives [0, 2.5 | 2.5]
    • y = 1
    • Back-substitute: 2x + 1 = 5, x = 2
    • Check both original equations

Questions people ask

What is back-substitution?

After elimination, the last row has only one unknown, so solve it first. Then substitute that value into the row above, and keep climbing up. In the example, y equals 1 comes from the bottom row, and then x equals 2 comes from the top.

Why use Gaussian elimination instead of guessing?

It always works and follows fixed steps, so a computer can do it for hundreds of equations. Guessing and substituting becomes unmanageable once you have more than two or three unknowns. Elimination also shows when no solution or infinitely many solutions exist.