Graphics Programs Reference
InDepth Information
matrix. The latterisofparticular concern in engineering computing, where the co
efficient matrices arefrequently banded and symmetric, aproperty that is utilized
in the solution, as seeninthe previous article.Fortunately, these matrices are often
diagonallydominant as well, so that theywouldnot benefitfrom pivoting anyway.
There are no infallible rules fordetermining when pivoting shouldbe used. Expe
rience indicates that pivoting islikely to becounterproductive if the coefficient matrix
is banded. Positive definite and,toa lesserdegree, symmetric matrices also seldom
gain from pivoting. And we shouldnot forget that pivoting is not the onlymeansof
controlling roundoff errors—there is also double precisionarithmetic.
It shouldbestrongly emphasized that the above rules of thumb areonlymeant
for equationsthat stem fromrealengineering problems. It is not difficult to concoct
“textbook” examples that do not conform to these rules.
EXAMPLE 2.12
Employ Gauss eliminationwith scaledrow pivoting to solve the equations
Ax
=
b
,
where
⎡
⎣
⎤
⎦
⎡
⎣
⎤
⎦
2
−
26
16
0
A
=
−
2
4 3
b
=
−
184
−
1
Solution
The augmented coefficient matrix and the scale factor array are
⎡
⎣
⎤
⎦
⎡
⎣
⎤
⎦
2
−
26 16
6
4
8
A
b
=
−
s
=
2
4 3
0
−
184
−
1
Note that
s
contains the absolute value of the largest element in each row of
A
.Atthis
stage, all the elements in the first column of
A
are potential pivots. To determine the
best pivot element, wecalculate the relativesizes of the elements in the first column:
⎡
⎣
⎤
⎦
=
⎡
⎣
⎤
⎦
=
⎡
⎣
⎤
⎦
r
11
r
21
r
31

A
11

/
s
1
1
/
3

A
21

/
/
s
2
1
2

A
31

/
s
3
1
/
8
Since
r
21
is the biggest element, weconcludethat
A
21
makes the best pivot element.
Therefore, weexchange rows 1 and 2 of the augmented coefficient matrix and the
scale factor array,obtaining
⎡
⎣
⎤
⎦
⎡
⎣
⎤
⎦
−
2
4 3
0
←
4
6
8
A
b
=
2
−
26 16
s
=
−
184
−
1
Search WWH ::
Custom Search