Previous Up Next

2.46.11  Hessenberg matrix reduction : hessenberg

hessenberg takes as argument a matrix A.
hessenberg returns a matrix B equivalent to A where the coefficients below the sub-principal diagonal are zero. B is a Hessenberg matrix.
Input :

hessenberg([[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]])

Output :

[[3,8,5,10,2],[2,1,1/2,-5,-1],[0,2,1,8,2], [0,0,1/2,8,1],[0,0,0,-26,-3]]

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]] :;
B:= hessenberg(A):; pcar(A); pcar(B)

Output: [1,-7,-66,-24].


Previous Up Next