Algosim documentation: IsIdentity

IsIdentity

Tests if a matrix is an identity matrix.

Syntax

Description

If A is a matrix then IsDiagonal(A, ε) is true iff A is square and A[i, j] is equal to 1 if i = j and equal to 0 otherwise (all comparisons made with epsilon ε).

Examples

IsIdentity(❨❨1, 0❩, ❨0, 2❩❩)
false

See also