rcond

Reciprocal condition number estimate of a square matrix in the 1-norm.

Category: Mathematics > Linear Algebra

Syntax

c = rcond(A)

Returns an estimate of 1/cond(A,1).

Description

A small reciprocal condition number warns that solving a linear system with A may lose many digits of accuracy; roughly -log10(c) digits are lost. rcond is the quantity behind the "close to singular" warnings of inv and mldivide.

It is an estimate, cheaper than cond, which needs a full SVD or an explicit inverse. Unlike the determinant, it does not change when the matrix is scaled by a constant.

Input arguments

A
Square numeric matrix.

Output arguments

c
A value between 0 and 1: near 1 for a well-conditioned matrix, near 0 for a nearly singular one, and 0 for a singular one.

Example

Well and badly conditioned

rcond(eye(3))
rcond([1 2; 3 4])
rcond([1 2; 2 4])
Output
ans = 1
ans = 0.0476
ans = 0

See also

cond inv det norm condest