Check whether a matrix is a certain shape or not - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Education : Student Package : Numerical Analysis : Computation : Student/NumericalAnalysis/IsMatrixShape

Student[NumericalAnalysis][IsMatrixShape] - Check whether a matrix is a certain shape or not

Calling Sequence

IsMatrixShape(A, shape)

Parameters

A

-

Matrix

shape

-

name; must be one of diagonal, strictlydiagonallydominant, diagonallydominant, hermitian, positivedefinite, symmetric, triangular[upper], triangular[lower], or tridiagonal

Description

• 

The IsMatrixShape command verifies whether the matrix A is a certain "shape".

• 

The only types of "shapes" that the IsMatrixShape command can verify are:

– 

Diagonal : shape = diagonal

– 

Strictly diagonally dominant : shape = strictlydiagonallydominant

– 

Diagonally dominant : shape = diagonallydominant

– 

Hermitian : shape = hermitian

– 

Positive definite : shape = positivedefinite

– 

Symmetric : shape = symmetric

– 

Upper or lower triangular : shape = triangular[upper] or shape = triangular[lower], respectively

– 

Tridiagonal : shape = tridiagonal

Notes

• 

If neither upper nor lower is specified, the triangular option defaults to triangular[upper].

• 

The Student[NumericalAnalysis] subpackage's definition of positive definiteness is as follows.

– 

A complex n-by-n matrix A is positive definite if and only if A is Hermitian and for all n-dimensional complex vectors v, we have 0<v%H·A·v, where  denotes the real part of a complex number.

– 

A real n-by-n matrix A is positive definite if and only if A is symmetric and for all n-dimensional real vectors v, we have 0<vT&period;A&period;v.

• 

To check another "shape" that is not available with the Student[NumericalAnalysis][IsMatrixShape] command see the general IsMatrixShape command.

Examples

withStudent&lsqb;NumericalAnalysis&rsqb;&colon;

A:=Matrix2&comma;1&comma;0&comma;0&comma;1&comma;2&comma;1&comma;0&comma;0&comma;1&comma;2&comma;1&comma;0&comma;0&comma;1&comma;2

A:=2100121001210012

(1)

B:=Matrix1&comma;0&comma;0&comma;0&comma;1&comma;2&comma;0&comma;0&comma;1&comma;1&comma;3&comma;0&comma;1&comma;1&comma;1&comma;4

B:=1000120011301114

(2)

C:=Matrix3&comma;I&comma;1&comma;0&comma;I&comma;4&comma;2I&comma;0&comma;1&comma;2I&comma;5&comma;1&comma;0&comma;0&comma;1&comma;4

C:=3I10I42I012I510014

(3)

IsMatrixShapeA&comma;&apos;diagonal&apos;

false

(4)

IsMatrixShapeA&comma;&apos;strictlydiagonallydominant&apos;

false

(5)

IsMatrixShapeA&comma;&apos;diagonallydominant&apos;

true

(6)

IsMatrixShapeC&comma;&apos;hermitian&apos;

true

(7)

IsMatrixShapeA&comma;&apos;positivedefinite&apos;

true

(8)

IsMatrixShapeB&comma;&apos;positivedefinite&apos;

false

(9)

IsMatrixShapeC&comma;&apos;positivedefinite&apos;

true

(10)

IsMatrixShapeA&comma;&apos;symmetric&apos;

true

(11)

IsMatrixShapeB&comma;&apos;triangular&apos;&apos;upper&apos;

false

(12)

IsMatrixShapeB&comma;&apos;triangular&apos;

false

(13)

IsMatrixShapeLinearAlgebra:-TransposeB&comma;&apos;triangular&apos;

true

(14)

IsMatrixShapeB&comma;&apos;triangular&apos;&apos;lower&apos;

true

(15)

IsMatrixShapeA&comma;&apos;tridiagonal&apos;

true

(16)

See Also

Student[NumericalAnalysis], Student[NumericalAnalysis][ComputationOverview]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam