CoCoA:IsDiagonal

From ApCoCoAWiki

IsDiagonal

checks if a matrix is diagonal

Description

This function tests whether the square matrix M is diagonal.

Example

  M := Mat([
           [0, 1, 2],
           [-1, 0, 3],
           [-2, -3, 0]
           ]);
  IsDiagonal(M);
FALSE
-------------------------------

Syntax

IsDiagonal(M: MAT): BOOL
   <type>matrix</type>
   <type>boolean</type>

IsSymmetric

DiagonalMat