Function: math[isDiagonal] - checks if a matrix is diagonal

Calling Sequence:

isDiagonal(A);

Parameters:

A - an array

Description:

IsDiagonal checks whether A (an array or matrix ) is a diagonal matrix. If so, it returns true and false otherwise.

This function is part of the math package, and so can be used only after performing the command with(math) or with(math, isDiagonal).

Examples:

> with(math):

> A := dim([1, 2, 3], diagonal);

[Maple Math]

> isDiagonal(A);

[Maple Math]

> vecvert:

> v := V(1, 2, 3);

[Maple Math]

> isDiagonal(v);

[Maple Math]

See Also:

math/isIdentity , math/isSymmetric , math/isAntiSymmetric , math/isQuadratic .

Version History:

Version 1.0 - March 17, 1998