For a nonsingular square matrix , its condition number with respect to a matrix
norm is
. The condition number of a singular matrix is taken to be infinite.
For the spectral norm, this is the ratio of the
largest to the smallest singular value. For an
induced norm,
estimates the worst-case loss of base-
digits in solving a linear system with coefficient
matrix
. A matrix with a large condition number is ill-conditioned.
Multiplying
by any nonzero scalar leaves its condition number invariant while generally changing
the magnitudes of its entries and its determinant.
These magnitudes alone therefore do not determine how well-conditioned a matrix is.
For example, the diagonal matrix with diagonal has determinant 1 and spectral-norm condition number
for
.
Condition estimators can approximate using linear solves with
and its conjugate transpose,
without forming the inverse explicitly. Hager (1984) gives a 1-norm estimator, and
Higham (1987) surveys estimators for triangular matrices.
An estimate of the -norm
condition number of a matrix can be computed in the Wolfram
Language prior to Version 11.2 using LinearAlgebra`MatrixConditionNumber[m,
p] for
, 2, or
, where omitting the
is equivalent to specifying Infinity.
A similar approximation for the
condition number can be computed using LUDecomposition[mat][[-1]].
Computation of the condition number of a matrix may be implemented in a future version of the Wolfram Language using MatrixConditionNumber.
LAPACK's DGECON estimates the norm of the inverse using DLACN2, a variant of Higham's (1988) 1-norm estimator.
Individual eigenvalues have their own condition numbers. For a simple eigenvalue with right and left eigenvectors
and
, respectively, the absolute condition
number for perturbations measured in the spectral norm is
The first-order change under a perturbation is
(Smith 1967). For a normal
matrix, each simple eigenvalue has condition number 1.