554 Linear Algebraic Solvers and Eigenvalue Analysis
Assuming that a
1,1
= 0, one can subtract multiples of the
first row of A of the other rows, so that the coefficients a
i,1
for i>1 become zero. Of course, the same multiples of
b
1
have to be subtracted from the corresponding b
i
.This
process can be repeated for the remaining (n − 1) × (n − 1)
submatrix, in order to eliminate the coefficients for x
2
in the second column. After completion of the process,
the remaining matrix has zeros below the diagonal and
the linear system can now easily be solved. For a dense
linear system, this way of computing the solution x requires
roughly (2/3)n
3
arithmetic operations.
In order to make the process numerically stable, the rows
of A are permuted so that the largest element (in absolute
value) in the first column appears in the first position. This
process is known as partial pivoting and it is repeated for
the submatrices.
The process of Gaussian elimination is equivalent with
the decomposition of A as
A = LU
with L a lower triangular matrix and U an upper triangular
matrix and this is what is done in modern software. After
the decomposition, one has to solve LUx = b and this is
done in two steps:
1. First solve y from Ly = b.
2. Then x is obtained from solving Ux = y.
The computational costs for one single linear system are
exactly the same as for Gaussian elimination, and partial
pivoting is included without noticeable costs. The permuta-
tions associated with the pivoting process are represented by
an index array and this index array is used for rearranging
b, before the solving of Ly = b.
If one has a number of linear systems with the same
matrix A, but with different right-hand sides, then one can
use the LU decomposition for all these right-hand sides.
The solution for each new right-hand side then takes only
O(n
2
) operations, which is much cheaper than to repeat the
Gaussian elimination procedure afresh for each right-hand
side.
This process of LU-decomposition, with partial pivoting,
is the recommended strategy for the solution of dense linear
systems. Reliable software for this process is available from
software libraries including NAG and LAPACK (Anderson
et al., 1992) and the process is used in Matlab. It is
relatively cheap to compute a good guess for the condition
number of A, and this shows how sensitive the linear
systems may be for perturbations to the elements of A and b
(see Theorem 1). It should be noted that checking whether
the computed solution ˆx satisfies
b − A ˆx
2
b
2
≤
for some small does not provide much information on
the validity of ˆx without further information on A.IfA is
close to a singular matrix, then small changes in the input
data (or even rounding errors) may lead to large errors in the
computed solution. The condition number of A is a measure
for how close A is to a singular matrix (cf. Theorem 1).
The computation of the factors L and U , with partial
pivoting, is in general rather stable (small perturbations to
A lead to acceptable perturbations in L and U ). If this is a
point of concern (visible through a relatively large residual
b − A ˆx, then the effects of these perturbed L and U can
be largely removed with iterative refinement. The idea of
iterative refinement is to compute r = b − A ˆx and to solve
Az = r, using the available factors L and U . The computed
solution ˆz is used to correct the approximated solution
to ˆx +ˆz. The procedure can be repeated if necessary.
Iterative refinement is most effective if r is computed in
higher precision. Apart from this, the process is relatively
cheap because it requires only n
2
operations (compared to
the
O(n
3
) operations for the LU factorization. For further
details, we refer to Golub and Van Loan (1996).
For increasing n, the above sketched direct solution
method becomes increasingly expensive (
O(n
3
) arithmetic
operations) and for that reason all sorts of alternative
algorithms have been developed to help reduce the costs
for special classes of systems.
An important subclass is the class of symmetric positive-
definite matrices (see Section 2.1). A symmetric positive
definite matrix A can be decomposed as
A = LL
T
and this is known as the Cholesky decomposition of A.The
Cholesky decomposition can be computed in about half the
time as an LU decomposition and pivoting is not necessary.
It also requires half the amount of computer storage, since
only half of A and only L need to be stored (L may even
overwrite A if A is not necessary for other purposes). It may
be good to note that the numerical stability of Cholesky’s
process does not automatically lead to accurate solutions x.
This depends, again, on the condition number of the given
matrix. The stability of the Cholesky process means that the
computed factor L is relatively insensitive for perturbations
of A.
There is an obvious way to transform Ax = b into a
system with a symmetric positive-definite matrix:
A
T
Ax = A
T
b
评论0