Algosim documentation: IsLowerTriangular

IsLowerTriangular

Tests if a matrix is lower triangular.

Syntax

Description

If A is a matrix, not necessarily square, then IsLowerTriangular(A, ε) is true iff i < j implies A[i, j] = 0 (with epsilon ε).

Examples

A ≔ ❨❨1, 0, 0, 0, 0❩, ❨2, 3, 0, 0, 0❩, ❨4, 5, 1, 0, 0❩, ❨3, 0, 1, 2, 0❩, ❨5, 2, 3, 1, 2❩❩
⎛1  0  0  0  0⎞
⎜2  3  0  0  0⎟
⎜4  5  1  0  0⎟
⎜3  0  1  2  0⎟
⎝5  2  3  1  2⎠
IsLowerTriangular(A)
true

See also