ConditionNumber - Maple Help

# Online Help

###### All Products    Maple    MapleSim

LinearAlgebra

 ConditionNumber
 compute the condition number of a Matrix with respect to a norm

 Calling Sequence ConditionNumber(A, p, in, c)

Parameters

 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

Description

 • The ConditionNumber(A) function computes the scalar quantity equal to the condition number of A as $\mathrm{Norm}\left(A,\mathrm{\infty }\right)\mathrm{Norm}\left(\mathrm{MatrixInverse}\left(A\right),\mathrm{\infty }\right)$.
 • The ConditionNumber(A, p, c) function computes the scalar quantity equal to the condition number of A as $\mathrm{Norm}\left(A,p,c\right)\mathrm{Norm}\left(\mathrm{MatrixInverse}\left(A\right),p,c\right)$.
 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](..).

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $A≔\mathrm{HilbertMatrix}\left(3\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1}& \frac{{1}}{{2}}& \frac{{1}}{{3}}\\ \frac{{1}}{{2}}& \frac{{1}}{{3}}& \frac{{1}}{{4}}\\ \frac{{1}}{{3}}& \frac{{1}}{{4}}& \frac{{1}}{{5}}\end{array}\right]$ (1)
 > $\mathrm{ConditionNumber}\left(A\right)$
 ${748}$ (2)
 > $B≔⟨⟨3I,-0.1⟩|⟨0,1⟩⟩$
 ${B}{≔}\left[\begin{array}{cc}{3}{}{I}& {0}\\ {-0.1}& {1}\end{array}\right]$ (3)
 > $\mathrm{ConditionNumber}\left(B,2\right)$
 ${3.003749414}$ (4)
 > $\mathrm{ConditionNumber}\left(B,2,\mathrm{conjugate}=\mathrm{false}\right)$
 ${3.003749414}$ (5)

To determine the condition number using prefactored LU input:

 > $C≔\mathrm{RandomMatrix}\left(250,\mathrm{datatype}=\mathrm{float}\left[8\right]\right):$
 > $v,M≔\mathrm{LUDecomposition}\left(C,\mathrm{output}='\mathrm{NAG}'\right):$
 > $\mathrm{ConditionNumber}\left(C,1,\mathrm{factors}=\left[v,M\right]\right)$
 ${34584.31079}$ (6)

To determine the condition number using prefactored Cholesky input:

 > $C≔\mathrm{Matrix}\left(3,3,\left[\left[53,-6,-5\right],\left[-6,90,34\right],\left[-5,34,13\right]\right],\mathrm{shape}=\mathrm{symmetric},\mathrm{datatype}=\mathrm{float},\mathrm{attributes}=\left['\mathrm{positive_definite}'\right]\right)$
 ${C}{≔}\left[\begin{array}{ccc}{53.}& {-6.}& {-5.}\\ {-6.}& {90.}& {34.}\\ {-5.}& {34.}& {13.}\end{array}\right]$ (7)
 > $\mathrm{IsDefinite}\left(C\right)$
 ${\mathrm{true}}$ (8)
 > $L≔\mathrm{LUDecomposition}\left(C,\mathrm{output}='\mathrm{NAG}'\right)$
 ${L}{≔}\left[\begin{array}{ccc}{7.28010988928052}& {-0.824163383692134}& {-0.686802819743445}\\ {-0.824163383692134}& {9.45096580868755}& {3.53762387262238}\\ {-0.686802819743445}& {3.53762387262238}& {0.116272192052527}\end{array}\right]$ (9)
 > $\mathrm{ConditionNumber}\left(C,\mathrm{factors}=\left[L\right]\right)$
 ${13715.00000}$ (10)

References

 de Boor, Carl. "An Empty Exercise." ACM SIGNUM Newsletter 25, (April 1990): 3-7.

 See Also