1 Solving three equations in three unknowns

The easiest set of three simultaneous linear equations to solve is of the following type:

3 x 1 = 6 ,

2 x 2 = 5 ,

4 x 3 = 7

which obviously has solution [ x 1 , x 2 , x 3 ] T = 2 , 5 2 , 7 4 T or x 1 = 2 , x 2 = 5 2 , x 3 = 7 4 .

In matrix form A X = B the equations are

3 0 0 0 2 0 0 0 4 x 1 x 2 x 3 = 6 5 7

where the matrix of coefficients, A , is clearly diagonal.

Task!

Solve the equations

2 0 0 0 1 0 0 0 3 x 1 x 2 x 3 = 8 2 6 .

[ x 1 , x 2 , x 3 ] T = [ 4 , 2 , 2 ] T .

The next easiest system of equations to solve is of the following kind:

3 x 1 + x 2 x 3 = 0 2 x 2 + x 3 = 12 3 x 3 = 6 .

The last equation can be solved immediately to give x 3 = 2 .

Substituting this value of x 3 into the second equation gives 2 x 2 + 2 = 12 from which 2 x 2 = 10 so that x 2 = 5

Substituting these values of x 2 and x 3 into the first equation gives 3 x 1 + 5 2 = 0 from which 3 x 1 = 3 so that x 1 = 1

Hence the solution is [ x 1 , x 2 , x 3 ] T = [ 1 , 5 , 2 ] T .

This process of solution is called back-substitution .

In matrix form the system of equations is

3 1 1 0 2 1 0 0 3 x 1 x 2 x 3 = 0 12 6 .

The matrix of coefficients is said to be upper triangular because all elements below the leading diagonal are zero. Any system of equations in which the coefficient matrix is triangular (whether upper or lower) will be particularly easy to solve.

Task!

Solve the following system of equations by back-substitution.

2 1 3 0 3 1 0 0 2 x 1 x 2 x 3 = 7 5 2 .

Write the equations in expanded form:

2 x 1 x 2 + 3 x 3 = 7 3 x 2 x 3 = 5 2 x 3 = 2

Now find the solution for x 3 :

The last equation can be solved immediately to give x 3 = 1.

Using this value for x 3 , obtain x 2 and x 1 :

x 2 = 2 , x 1 = 3 . Therefore the solution is x 1 = 3 , x 2 = 2 and x 3 = 1.

Although we have worked so far with integers this will not always be the case and fractions will enter the solution process. We must then take care and it is always wise to check that the equations balance using the calculated solution.