IsUpperTriangular
Tests if a matrix is upper triangular.
Syntax
-
IsUpperTriangular(A[, ε])
-
A
is a matrix -
ε
is a positive number
-
Description
If A
is a matrix, not necessarily square, then IsUpperTriangular(A, ε)
is true
iff i > j
implies A[i, j] = 0
(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⎠
IsUpperTriangular(A)
true