Pitfalls of Elimination Methods
Pitfalls of Elimination Methods
Pitfalls of Elimination Methods
3 1 6 x 1
5 4 2 y 12
1 3 8 z 3
Partial Pivoting
• With just three unknowns, this can be
solved relatively easily by hand. If there
were seven unknowns, the calculations
would be very tedious, and with 20, almost
impossible simply because of the amount
of calculation involved – an ideal situation
for a computer.
Partial Pivoting
• We will walk down the elements of the leading
diagonal. The first one is 3. We look for the
largest element underneath this entry, and if it is
larger than 3, swap the two rows over. In this
case,5 is the largest element, so the first two
rows are swapped:
5 4 2 x 12
3 1 6 y 1
1 3 8 z 3
Partial Pivoting
• Now, looking at the 5 in the diagonal, we
subtract the correct multiple of the top row from
each of the rows beneath it to make all the
numbers below the 5 into 0s. This means
subtracting 3/5 of the top row from the second
row and 1/3 of the top row from the third. This
gives:
5 4 2 x 12
0 7 5 24 5 y 31 5
0 11 5 38 5 z 27 5
• The first diagonal element is now complete, so we move
on to the second diagonal element and repeat the same
procedure. The diagonal element is -7/5. We look at
every element beneath it to see if any of them is larger,
and if so swap the rows over. In this case, 11/5 is larger,
so we swap the second and third rows to give:
5 4 2 x 12
0 11 5 38 5 y 27 5
0 7 5 24 5 z 31 5
Partial Pivoting
• Now, keeping our eyes on the 11/5, we subtract
the right multiple of the second row to make
every element below the 11/5 into 0. In this
case, it means adding 7/11 of the second row to
the third to give:
5 4 2 x 12
0 11 5 38 5 y 27 5
0 0 106 11 z 106 11
Partial Pivoting
• The matrix is now in upper triangular form.
The values of x, y and z can be easily
calculated with back substitution.
• The method could be broken down using a top down development
to give: