A Hessenberg matrix is a square matrix where the coefficients below the sub-principal diagonal are all 0s. The hessenberg command finds a Hessenberg matrix equivalent to a given square matrix.
SCHUR(A) is equivalent to hessenberg(A,-1), which is compatible with HP calculators.
Examples.
A:=[[3,2,2,2,2],[2,1,2,-1,-1],[2,2,1,-1,1],[2,-1,-1,3,1],[2,-1,1,1,2]]; |
[P,B]:=hessenberg(A) |
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ | , | ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ |
⎡ ⎣ | 1,−10,13,71,−50,−113 | ⎤ ⎦ |
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ | ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ | , |
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
| ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ | ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ |