IsTriangular
Tests if a matrix is triangular.
Syntax
-
IsTriangular(A[, ε])
-
A
is a matrix -
ε
is a positive number
-
Description
If A
is a matrix, not necessarily square, then IsTriangular(A, ε)
is true
iff A
is upper triangular or lower triangular (with epsilon ε
).
Examples
A ≔ ❨❨5, 3, 2, 1, 0❩, ❨0, 2, 4, 5, 3❩, ❨0, 0, 1, 2, 3❩, ❨0, 0, 0, 5, 1❩, ❨0, 0, 0, 0, 4❩❩
⎛5 3 2 1 0⎞ ⎜0 2 4 5 3⎟ ⎜0 0 1 2 3⎟ ⎜0 0 0 5 1⎟ ⎝0 0 0 0 4⎠
IsTriangular(A)
true