A Hessenberg matrix is a square matrix where the coefficients below the sub-principal diagonal are all zeros. 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.
Let
A= |
| . |
Input:
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) |
|
Indeed, pcar(A) and pcar(B) both return [1,−10,13,71,−50,−113] and it is easily verified that B=P−1AP.
B:=epsilon2zero(hessenberg(A,-1)) |
Output (to 2 digits):
|