Gaussian elimination is a technique that is used to solve for multiple unknowns. For example
we have 3 equations and 3 unknowns here. It is a technique where you can quickly solve
for x1, x2 and x3. We first start out with a coefficient array. I am going to write out
the coefficients. I am developing something called an augmented matrix where I have my
coefficient array A on the left here and then I am augmenting it with the resultant vector.
I may or may not have this vertical bar in here. That is called augmented matrix. If
for example that first line just corresponds to x1 plus 2*x2 plus 3*x3 is equal to 0. Ultimately
what we are trying to do is transform this original array into the form 1 0 0, 0 1 0,
0 0 1. The augmented array we are going to carry along with that a transformed B. This
is our original B vector. We are going to have some sort of augmented B and I will write
that with a prime. This top line is 1*x1 plus 0*x2 plus 0*x3 equal to whatever that B1'
is. Obviously these two cancel out because we have the 0 coefficients and we can just
say now that x1 equals B1', x2 equals B2' and x3 equals B3'. We are trying to solve
these system of three equations for those three unknowns. The first step is to normalize
position 1,1. It is already a 1 but if we had something like a 2, 4 or 6 the first would
have been to make the 1,1 position a value of 1. Once we have it in a value of 1 in the
1,1 position the first step is to make a transformation and we are going to work with the second row.
The first row is fine. New rough two is going to be equal to the old rough two minus whatever
coefficient is directly below that one which is a four, times rough one. If i rewrote this.
You always do the same transformation with our B. Keep in mind that these are just algebraic
equations so if you manipulate the left hand side of an equation you have to also manipulate
the right hand side. We are going to subtract four times row one. Four minus four is equal
to 0 and this right here is the main reason we are doing this transformation because what
we have done now is we have eliminated an x1 term from the second equation. This is
our new row 2. The reason I did this now is because I have eliminated now x1 from this
second row and I am moving in the direction of making my augmented matrix in this form.
The next step is to define a new row 3 which is equal to the old row 3 minus seven, because
we have a 7 here that we are trying to get rid of, times row one. This is our new row
three. Now put together our augmented array at this point. This left hand column is exactly
what we want. The next step is to get this minus three to a one. So you divide. New row
two is going to be equal to the old rough two divided by minus 3. This is our new row
2. I am going to rewrite our augmented matrix. Now you see that we have these in the form
we want and this is in the form we want. Then next step is getting this minus 6 below our
1 to our 0. Similar to what we did above we say the new row three is equal to the old
row three minus negative 6 times row two this time because row two has that one in the 2,2
position. Negative 6 minus negative 6 is 0 and that is why we are doing this transformation.
Now we have converted the x2 coefficient in the third equation to 0. This is our new row
three. If I write this in terms of x we see that this is in the form of negative x3 is
equal to negative 3. Obliviously x3 is equal to 3. The next step is to normalize this 3,3
to a one and that is easy. We just divide everything by a negative one. That is normalizing
that 3,3 pivot. This is a 2,2 pivot and this is the 1,1 pivot. If you look at it now this
whole lower left part is in the form we want. The process now is to convert this 2 into
a 0. This begins the back substitution. It is called back substitution because now we
are going back up in the rows. New row two is equal to old row two minus two times the
third row. That is our new row two. Now my augmented matrix is starting to look like
the form we want. Now what we need to do is eliminate the three and the two. We are going
to have a new row one is equal to the old row one minus three times row three. Again
we did this so that we can eliminate that three. Now we are almost there. The only thing
we have left is to get this to a 0 so we will subtract two times row two because we have
a one there. The new row one equals old row one minus two times row two because row two
contains that one. That is our new row one. Final matrix array then is row one of 1 0
0 11/3, row two 0 1 0 -19/3 and row three is 0 0 1 3. What this is telling us is that
x1 is equal to 11/3 which is equal to 3.67. x2 is then equal to -19/3 which is -6.33.
x3 is equal to 3. Let's see if that is the same as what we got in excel. We have 3.67
for x1, -6.33 for x2 and 3 for x3. This is how people used to solve a simultaneous equation.
You can use algebra and the first programs to solve simultaneous equations actually used
exactly what I went over. This is known as Gaussian Elimination