Algosim documentation: subdiagonal

subdiagonal

Represents the subdiagonal in a matrix.

Syntax

The returned value is an lvalue.

Description

If A is a matrix, not necessarily square, then subdiagonal(A) represents the subdiagonal in A, that is, the entries A[i, j] where i = j + 1.

Typewise, subdiagonal(A) is a vector.

subdiagonal(A) is an lvalue, so it may be assigned to. If A is a real matrix, then only a real vector can be assigned to it.

Examples

A ≔ ❨❨1, 2, 3❩, ❨5, 1, 2❩, ❨6, 6, 5❩, ❨4, 2, 1❩❩
⎛1  2  3⎞
⎜5  1  2⎟
⎜6  6  5⎟
⎝4  2  1⎠
subdiagonal(A)
 ⎛5⎞
e⎜6⎟
 ⎝1⎠
subdiagonal(A) ≔ ❨3, 9, 4❩
 ⎛3⎞
e⎜9⎟
 ⎝4⎠
A
⎛1  2  3⎞
⎜3  1  2⎟
⎜6  9  5⎟
⎝4  2  4⎠

See also