The Gauss-Jordan algorithm solves systems of linear equations efficiently. Suppose we are given a system of linear equations:
| (1) | |||
| (2) |
There are three important things we can do to these equations without actually modifying them:
This system can be represented in a matrix:
We can begin to solve the system by multiplying equation (1) by a scalar of -2:
Then adding equations (1) and (2):
Multiplying equation (2) by a scalar of 2:
Adding equations (1) and (2) again:
Multiplying equation (1) by a scalar of -.5 and equation (2) by a scalar of .5:
This matrix translates back to:
A general procedure can be used to do this same process for any system of linear equations. Multiply the every row below by a scalar so that the entry in the first column in that row is -1 (unless the number is zero), and then multiply the first row by a scalar so the entry in the first row and first column is 1. Then add the first equation to every other equation. Repeat this process for all the rows and columns until you arrive at the identity matrix.