CONDITION
Matrix Condition Number Estimation
CONDITION
is a MATLAB library which
implements methods for computing or estimating the condition number of a matrix.
Let * be a matrix norm, let A be an invertible matrix, and inv(A) the inverse of A.
The condition number of A with respect to the norm * is defined to be
kappa(A) = A * inv(A)
If A is not invertible, the condition number is taken to be infinity.
Facts about the condition number include:

1 <= kappa(A) for all matrices A.

1 = kappa(I), where I is the identity matrix.

for the L2 matrix norm, the condition number of any orthogonal matrix is 1.

for the L2 matrix norm, the condition number is the ratio of the maximum
to minimum singular values;
MATLAB includes a function cond() which computes the condition number of
a matrix, with respect to a particular matrix norm:

cond(a,1) uses the L1 matrix norm;

cond(a,2) uses the L2 matrix norm;

cond(a,inf) uses the Loo matrix norm;

cond(a,'fro') uses the Frobenius matrix norm;
Licensing:
The computer code and data files described and made available on this
web page are distributed under
the GNU LGPL license.
Languages:
CONDITION is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
LINPACK_D,
a MATLAB library which
solves linear systems using double precision real arithmetic;
NAPACK,
a FORTRAN77 library which
includes many routines for applied numerical linear algebra tasks,
including the matrix condition number,
by William Hager.
TEST_MAT,
a MATLAB library which
defines test matrices for which some of the determinant, eigenvalues, inverse,
null vectors, P*L*U factorization or linear system solution are already known.
Reference:

Alan Cline, Cleve Moler, Pete Stewart, James Wilkinson,
An estimate for the Condition Number of a Matrix,
Technical Report TM310,
Argonne National Laboratory, 1977.

Alan Cline, Russell Rew,
A set of counterexamples to three condition number estimators,
SIAM Journal on Scientific and Statistical Computing,
Volume 4, Number 4, December 1983, pages 602611.

William Hager,
Condition Estimates,
SIAM Journal on Scientific and Statistical Computing,
Volume 5, Number 2, June 1984, pages 311316.

Nicholas Higham,
A survey of condition number estimation for triangular matrices,
SIAM Review,
Volume 9, Number 4, December 1987, pages 575596.

Diane OLeary,
Estimating matrix condition numbers,
SIAM Journal on Scientific and Statistical Computing,
Volume 1, Number 2, June 1980, pages 205209.

Pete Stewart,
Efficient Generation of Random Orthogonal Matrices With an Application
to Condition Estimators,
SIAM Journal on Numerical Analysis,
Volume 17, Number 3, June 1980, pages 403409.
Source Code:

combin.m
returns the COMBIN matrix.

combin_inverse.m
returns the inverse of the COMBIN matrix A.

cond_test.m,
tests MATLAB's cond() function.

condition_hager.m,
estimates the matrix L1 condition number using Hager's method.

condition_hager_test.m

condition_linpack.m,
estimates the matrix L1 condition number using a method from LINPACK.

condition_linpack_test.m

condition_sample1.m,
estimates the matrix L1 condition number using sampling.

condition_sample1_test.m

conex1.m
returns a 4 by 4 LINPACK condition number counterexample matrix.

conex1_inverse.m
returns the inverse of the CONEX1 matrix.

conex2.m
returns a 3 by 3 LINPACK condition number counterexample matrix.

conex2_inverse.m
returns the inverse of the CONEX2 matrix.

conex3.m
returns a LINPACK condition number counterexample matrix.

conex3_inverse.m
returns the inverse of the CONEX3 matrix.

conex4.m
returns a 4 by 4 condition number matrix.

conex4_inverse.m
returns the inverse of the CONEX4 matrix.

kahan.m
returns the KAHAN matrix.

kahan_inverse.m
returns the inverse of the KAHAN matrix.

r8_sign.m,
returns the sign of an R8.

r8ge_fa.m,
factors a matrix stored in general storage.

r8mat_uniform_01.m,
returns a unit pseudorandom R8MAT;

r8vec_max_abs_index.m,
returns the index of the maximum absolute value entry in an R8VEC;

r8vec_normal_01.m,
returns an R8VEC of unit pseudonormal values;

r8vec_uniform_01.m,
returns an R8VEC of unit pseudouniform values;

r8vec_uniform_unit.m,
returns a random unit vector.

timestamp.m
returns the YMDHMS date as a timestamp.
Examples and Tests:
You can go up one level to
the MATLAB source codes.
Last revised on 08 April 2012.