
13.1 Solving Even-Determined Problems 223
annihilated by subtractingA,,/A,, times the second row from the third
row,
A,,/A,,
times the second row from the fourth row, and
so
forth.
The process is repeated
N
-
1
times, at which point the matrix is
triangularized. The vector
b
must also be modified during the triangu-
larization process. Between
1
and
N
multiplications are needed to
annihilate each of approximately
N2/2
elements,
so
the effort needed
to triangularize the matrix grows with order
N3
(in fact, it is propor-
tional to
N3/3).
One problem with this algorithm is that it requires division by the
diagonal elements of the matrix. If any of these elements are zero, the
method will fail. Furthermore, if any are very small compared to the
typical matrix element, significant round-off error can occur because
of the computer’s limited mathematical precision and the results can
be seriously in error. One solution to this problem is to examine all the
elements of the untriangularized portion of the matrix before partially
annihilating a column, select the one with largest absolute value, and
move it to the appropriate diagonal position. The element is moved by
exchanging two rows of
A
(and two corresponding elements of
b)
to
move it to the correct row and then exchanging two columns of
A
(and
reordering the unknowns) to move it to the correct column. This
procedure is called
pivoting
(Fig.
13.
I),
and the new diagonal element
is called the
pivot.
Pivoting guarantees that the matrix will be properly triangularized.
In fact, if at any stage no nonzero pivot can be found, then the matrix is
singular. We note that pivoting does not really require the reordering
of unknowns, since the columns of the triangle need not be in order.
There is no special reason for the column with
N
-
1
zeros to be first. It
is sufficient to leave the columns in place and keep track of their order
in the triangle. Pivoting does require reordering the elements of
b.
This
process can be a bit messy,
so one often simplifies the pivoting to avoid
this step.
Partialpivoting
selects the largest element in the same row as
the diagonal element under consideration and transfers it to the
diagonal by column-exchanging operations alone.
Triangularization by partial pivoting has the further advantage of
providing an easy means of separating the process of triangularizing
A
from that of transforming
b.
Separating these steps is useful when
solving several matrix equations that all have the same
A
but have
different
b’s.
The effort of performing the triangularization is ex-
pended only once.
To
separate the operations, two types of informa-
tion must be retained: (1) which columns were exchanged during each