1  Gauss Elimination Method for Systems of Linear Equations

Definition 1.1. Two systems of linear equations are said to be equivalent if they have the same set of solutions.

Given a system of linear equations

a 1 , 1 x 1 + a 1 , 2 x 2 + + a 1 , n x n = b 1 a 2 , 1 x 1 + a 2 , 2 x 2 + + a 2 , n x n = b 2 a m , 1 x 1 + a m , 2 x 2 + + a m , n x n = b m (1.1)

We show how to obtain an equivalent system of linear equations to (1.1) which is easier to solve. One of the simpliest procedures is an elimination technique known as Gauss Elimination Method. Here we give the version for systems of linear equations (a similar method exists for matrices).

Algorithm 1.2.  Gauss Elimination Method for systems of linear equations.

Step 1. If necessary interchange the equations so that the first equation has the variable x1. (The best situation is if every coefficient ai,1 is a multiple of a1,1for all i1.)

Step 2. By adding appropriate multiples of the first equation to the every other equation eliminate the variable x1from all equations except the first one.

Step 3. Multiply, if suitable, an equation by a nonzero number.

Step 4. Ignoring the first equation, view the remaining equations as a system of m1equations in variables x2,...,xn. Repeat the procedure on this system.

Note that the application of steps 1 and 2 above will after one execution of step 2 yield a system of the form:

a 1 , 1 ' x 1 + a 1 , 2 ' x 2 + + a 1 , n ' x n = b 1 ' a 2 , 2 ' x 2 + + a 2 , n ' x n = b 2 ' a m , 2 ' x 2 + + a m , n ' x n = b m ' (1.2)

We now view the last m1 equations of (1.2) as a linear system. Applying the steps 1 and 2 we get:

a 1 , 1 ' x 1 + a 1 , 2 ' x 2 + a 1 , 3 ' x 3 + + a 1 , n ' x n = b 1 ' a 2 , 2 ' ' x 2 + a 2 , 3 ' ' x 3 + + a 2 , n ' ' x n = b 2 ' ' a 3 , 3 ' ' x 3 + + a 3 , n ' ' x n = b 3 ' ' a m , 3 ' ' x 3 + + a m , n ' ' x n = b m ' ' (1.3)

The aim of the algorithm (although there might be cases when in the resulting system some variable is missing) is to obtain a system of the form (where kn)

c 1 , 1 x 1 + c 1 , 2 x 2 + + c 1 , k x k + + c 1 , n x n = d 1 c 2 , 2 x 2 + + c 2 , k x k + + c 2 , n x n = d 2 c k , k x k + + c k , n x n = d k (1.4)

For simplicity, assume that all ci,i0 for all i=1,k1.

There can happen two possibilities:

1. The last equation obtained by the Gauss Elimination Method has the following form

0. x k + 0. x k + 1 + + 0. x n = d k

for some dk0. In this case, the system (1.4), and also (1.1), is inconsistent and does not have a solution.

2. The coefficient ck,k0. In this case, for every choice of variables xjfor j1,,k there exists a solution of the system (1.4) and therefore also of the system (1.1). Let xk+1=t1, xk+2=t2,,xn=tnk for t1,t2,,tnk, then we can calculate the remaining variables x1,,xk from the following system

c 1 , 1 x 1 + + c 1 , k x k = d 1 c 1 , k + 1 x k + 1 c 1 , n x n c k , k x k = d k c k , k + 1 x k + 1 c k , n x n (1.5)

as follows: From the last equation of the system (1.6) we calculate xk(we divide the equation by ck,k). This value of xkis substituted in the one but last equation tocalculate xk1; and so on till we calculate x1 from the first equation. (Note that when we calculate x1 then we already know all x2,x3,xk.) This procedure is often called back substitution.

The Gauss Elimination Method for solving systems of linear equations is based on the fact that all the operations, which the method does, lead to an equivalent systems of linear equations.

Let us formulate the result we obtained above as a proposition characterising consistent systems of linear equations.

Proposition 1.3. A system of linear equations is consistent if and only if the Gauss Elimination Method does not lead to any equation of the form

0. x 1 + 0. x 2 + + 0. x n = d

with d0.

Example 1.4. Using Gauss Elimination Method solve the following system of linear equations

3 x 2 6 x 3 + 6 x 4 + 4 x 5 = 5 3 x 1 7 x 2 + 8 x 3 5 x 4 + 8 x 5 = 9 3 x 1 9 x 2 + 12 x 3 9 x 4 + 6 x 5 = 15 (1.6)

Solution 1.5. First, we interchange the first and the third equations

3 x 1 9 x 2 + 12 x 3 9 x 4 + 6 x 5 = 15 3 x 1 7 x 2 + 8 x 3 5 x 4 + 8 x 5 = 9 3 x 2 6 x 3 + 6 x 4 + 4 x 5 = 5 (1.7)

We subtract the first row from the second one. By this we eliminate the variable x1from the second equation (the third one does not have variable x1).

3 x 1 9 x 2 + 12 x 3 9 x 4 + 6 x 5 = 15 2 x 2 4 x 3 + 4 x 4 + 2 x 5 = 6 3 x 2 6 x 3 + 6 x 4 + 4 x 5 = 5 (1.8)

We divide the second equation by 2

3 x 1 9 x 2 + 12 x 3 9 x 4 + 6 x 5 = 15 x 2 2 x 3 + 2 x 4 + x 5 = 3 3 x 2 6 x 3 + 6 x 4 + 4 x 5 = 5 (1.9)

In the next step we eliminate the variable x2 from the third equation; for this we add (3) multiple of the second equation to the third one

3 x 1 9 x 2 + 12 x 3 9 x 4 + 6 x 5 = 15 x 2 2 x 3 + 2 x 4 + x 5 = 3 x 5 = 4 (1.10)

To make the hand calculations easier we divide the first equatin by 3

x 1 3 x 2 + 4 x 3 3 x 4 + 2 x 5 = 5 x 2 2 x 3 + 2 x 4 + x 5 = 3 x 5 = 4 (1.11)

Let us rewrite the system (1.11) as follows

x 1 3 x 2 + 2 x 5 = 5 4 x 3 + 3 x 4 x 2 + x 5 = 3 + 2 x 3 2 x 4 x 5 = 4 (1.12)

Substituting t for x3and s for x4we get

x 1 3 x 2 + 2 x 5 = 5 4 t + 3 s x 2 + x 5 = 3 + 2 t 2 s x 5 = 4 (1.13)

Therefore, x5=4, and from the second equation we have

x 2 = 3 + 2 t 2 s x 5 = 7 + 2 t 2 s .

Finally, from the first equation we have

x 1 = 5 4 t + 3 s + 3 x 2 2 x 5 =
= 5 4 t + 3 s + 3 ( 7 + 2 t 2 s ) 2.4 = 24 + 2 t 3 s .

Answer: The system (1.6) has the following solutions

x 1 = 20 + 2 t 3 s , x 2 = 7 + 2 t 2 s , x 3 = t , x 4 = s , x 5 = 4

for any choice of parameters t,s.