Algosim documentation: ToLowerTriangular

ToLowerTriangular

Makes a matrix lower triangular.

Syntax

Description

If A is a matrix, not necessarily square, then ToLowerTriangular(A) returns the matrix obtained from A by setting all entries above the main diagonal to 0.

Examples

A ≔ ❨❨5, 1, 2, 3, 6❩, ❨1, 2, 3, 6, 7❩, ❨4, 1, 2, 3, 8❩, ❨0, 1, 2, 6, 1❩❩
⎛5  1  2  3  6⎞
⎜1  2  3  6  7⎟
⎜4  1  2  3  8⎟
⎝0  1  2  6  1⎠
ToLowerTriangular(A)
⎛5  0  0  0  0⎞
⎜1  2  0  0  0⎟
⎜4  1  2  0  0⎟
⎝0  1  2  6  0⎠

See also