Gauss-Jordan Elimination

We got several e-mails around the polynomial data-reduction technique. We explain here the Gauss-Jordan algorithm for those who wish to understand solving a system of simultaneous equations. Of course there are other methods, but this one is known to be quick, easy to understand and flexible. It is much simpler than the more familiar techniques following algebraic substitution or the use of determinants.


Solve the following system of simultaneous linear equations:

0.1 x1 - 0.5 x2             +      x4  = 2.7

0.5 x1 - 2.5 x2 +       x3 - 0.4 x4 = -4.7

      x1 + 0.2 x2 - 0.1 x3 + 0.4 x4 = 3.6

0.2 x1 + 0.4 x2 - 0.2 x             = 1.2

All the factors are written into a matrix :

The idea is to transform this array, row by row, until the first four (coloured) columns become zero except the elements on the principal diagonal. At the end, the last column will contain the values of the unknown x's :

Each transformation consists in adding some multiple of one row to another row, in such a manner that the desired result 1 or 0 is obtained.


1. Transform the first column to (1,0,0,0) through :

As you noticed a11 (and all the elements of the principal diagonal) may not be equal to 0. If this situation is given, the zero must be removed from the principal diagonal by interchanging rows. We get :

2. Remove the zero from the principal diagonal by interchanging the second and the third rows (or the second and the fourth). The result is :

3. Transform the second column to (0,1,0,0) as follows :

4. Transform the third column to (0,0,1,0) by :

5. Transform the fourth column to (0,0,0,1) with :

Note: If the determinant is zero, there is no solution to the system.

DOWNLOAD a Robolab 2.5 / Labview 6 program.

Note: if you build an array of the form :

and operate on it the Gauss-Jordan Elimination, you obtain the following matrix, where the second part is the INVERSE MATRIX of the blue part above :


RetourMain Page