Systems of Equations

astutedata.com / mathematics / systems of equations

This page contains code to solve a system of equations using the Gauss-Jordan Elimination. I did this when I was teaching College Algebra at Pima Community College. I've transcribed the lecture notes I used to explain the manual process. You'll find them at the bottom of the page.

Solve a System of Equations
 Select the system size: [-3-] [-4-] [-5-] [-6-] [-7-] [-8-] [-9-] [-10-] Then, enter the numbers into the matrix. Finally, click on the "Solve the System" button and watch the magic happen!

The Gauss-Jordan Elimination Solving a matrix is a matter of working the diagonal.

The diagonal of a matrix are the elements starting at Row 1 Col 1 and continuing in a downward and rightward direction. The object is to work down the diagonal, starting with the first element. For each element, you will perform a number of row operations. The row that the element is in is the active row for operations.

The row operations are:
1. Change the active element to a 1 by multiply the row by the reciprocal of the element.

2. Change an element to 0 by adding -1 times the element times the active row to the row you are changing.

3. Swap two rows.

For the active row, it helps to put a square around the active element (to indicate it needs to be a one), and a circle around the elements that need to be changed to zero.

For each element on the diagonal:
1. Put a square around the active element, and a circle around all elements in the same column that are above and below the active element.

2. If the element is a 0, you may swap this row with any row below it. Resume with the new row as your base row.

3. Change the active element to a 1.

4. Change each circled element to a 0. Note: the base row does not actually change during this operation.

When you reach the bottom of the diagonal, you are in reduced echelon form. The solution can be read directly from the last column.