nag_lapack_dsycon (f07mg) estimates the condition number of a real symmetric indefinite matrix
, where
has been factorized by
nag_lapack_dsytrf (f07md).
nag_lapack_dsycon (f07mg) estimates the condition number (in the
-norm) of a real symmetric indefinite matrix
:
Since
is symmetric,
.
The function should be preceded by a computation of
and a call to
nag_lapack_dsytrf (f07md) to compute the Bunch–Kaufman factorization of
. The function then uses Higham's implementation of Hager's method (see
Higham (1988)) to estimate
.
Higham N J (1988) FORTRAN codes for estimating the one-norm of a real or complex matrix, with applications to condition estimation ACM Trans. Math. Software 14 381–396
The computed estimate
rcond is never less than the true value
, and in practice is nearly always less than
, although examples can be constructed where
rcond is much larger.
A call to
nag_lapack_dsycon (f07mg) involves solving a number of systems of linear equations of the form
; the number is usually
or
and never more than
. Each solution involves approximately
floating-point operations but takes considerably longer than a call to
nag_lapack_dsytrs (f07me) with one right-hand side, because extra care is taken to avoid overflow when
is approximately singular.
The complex analogues of this function are
nag_lapack_zhecon (f07mu) for Hermitian matrices and
nag_lapack_zsycon (f07nu) for symmetric matrices.
This example estimates the condition number in the
-norm (or
-norm) of the matrix
, where
Here
is symmetric indefinite and must first be factorized by
nag_lapack_dsytrf (f07md). The true condition number in the
-norm is
.
function f07mg_example
fprintf('f07mg example results\n\n');
uplo = 'L';
a = [ 2.07 0 0 0;
3.87 -0.21 0 0;
4.20 1.87 1.15 0;
-1.15 0.63 2.06 -1.81];
afull = a + a' - diag(diag(a));
anorm = norm(afull,1);
[L, ipiv, info] = f07md( ...
uplo, a);
[rcond, info] = f07mg( ...
uplo, L, ipiv, anorm);
fprintf('Estimate of condition number = %8.2e\n',1/rcond);