LinearAlgebra
ConditionNumber
compute the condition number of a Matrix with respect to a norm
Calling Sequence
Parameters
Description
Examples
References
ConditionNumber(A, p, in, c)
A
-
Matrix
p
(optional) 1, 2, infinity, Euclidean, or Frobenius; norm selector
in
(optional) equation of the form factors = list where list contains Matrix factors in NAG format as returned by LUDecomposition
c
(optional) equation of the form conjugate=true or false; specifies if the result in the 2-norm case uses the Hermitian transpose
The ConditionNumber(A) function computes the scalar quantity equal to the condition number of A as Norm⁡A,∞⁢Norm⁡MatrixInverse⁡A,∞.
The ConditionNumber(A, p, c) function computes the scalar quantity equal to the condition number of A as Norm⁡A,p,c⁢Norm⁡MatrixInverse⁡A,p,c.
For floating-point Matrices, the norm of the inverse is computed by using estimates of the norms of the inverses of the triangular factors of the Matrix obtained by LU or Cholesky factorization.
If p is included in the calling sequence, p must be one of 1, 2, infinity, Frobenius, or Euclidean.
If in is included in the calling sequence, then the list must contain the NAG format factors as returned by LUDecomposition; the list items are:
A list of Vector, Matrix items, [ipiv,LU], for an LU decomposition.
A list of a Matrix item, [L], for a Cholesky decomposition.
For the 2-norm case, c may be included in the calling sequence to select between the transpose and the Hermitian transpose of A. The 2-norm case can also be specified by using Euclidean.
This function is part of the LinearAlgebra package, and so it can be used in the form ConditionNumber(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[ConditionNumber](..).
with⁡LinearAlgebra:
A≔HilbertMatrix⁡3
A≔11213121314131415
ConditionNumber⁡A
748
B≔3⁢I,−0.1|0,1
B≔3⁢I0−0.11
ConditionNumber⁡B,2
3.003749414
ConditionNumber⁡B,2,conjugate=false
To determine the condition number using prefactored LU input:
C≔RandomMatrix⁡250,datatype=float8:
v,M≔LUDecomposition⁡C,output=NAG:
ConditionNumber⁡C,1,factors=v,M
34584.31079
To determine the condition number using prefactored Cholesky input:
C≔Matrix⁡3,3,53,−6,−5,−6,90,34,−5,34,13,shape=symmetric,datatype=float,attributes=positive_definite
C≔53.−6.−5.−6.90.34.−5.34.13.
IsDefinite⁡C
true
L≔LUDecomposition⁡C,output=NAG
L≔7.28010988928052−0.824163383692134−0.686802819743445−0.8241633836921349.450965808687553.53762387262238−0.6868028197434453.537623872622380.116272192052527
ConditionNumber⁡C,factors=L
13715.00000
de Boor, Carl. "An Empty Exercise." ACM SIGNUM Newsletter 25, (April 1990): 3-7.
See Also
LinearAlgebra[LUDecomposition]
LinearAlgebra[MatrixInverse]
LinearAlgebra[MatrixNorm]
Download Help Document