Algosim documentation: ToUpperHessenberg

ToUpperHessenberg

Makes a matrix upper Hessenberg.

Syntax

Description

If A is a matrix, not necessarily square, then ToUpperHessenberg(A) returns the matrix obtained from A by setting all entries below the main subdiagonal 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⎠
ToUpperHessenberg(A)
⎛5  1  2  3  6⎞
⎜1  2  3  6  7⎟
⎜0  1  2  3  8⎟
⎝0  0  2  6  1⎠

See also