hessenbergReturn upper Hessenberg form of a matrix |
This information is part of the Modelica Standard Library maintained by the Modelica Association.
H = Matrices.hessenberg(A); (H, U) = Matrices.hessenberg(A);
Function hessenberg computes the Hessenberg matrix H of matrix A as well as the orthogonal transformation matrix U that holds H = U'*A*U. The Hessenberg form of a matrix is computed by repeated Householder similarity transformation. The elementary reflectors and the corresponding scalar factors are provided by function "Utilities.toUpperHessenberg()". The transformation matrix U is then computed by LAPACK.dorghr.
A = [1, 2, 3; 6, 5, 4; 1, 0, 0]; (H, U) = hessenberg(A); results in: H = [1.0, -2.466, 2.630; -6.083, 5.514, -3.081; 0.0, 0.919, -0.514] U = [1.0, 0.0, 0.0; 0.0, -0.9864, -0.1644; 0.0, -0.1644, 0.9864] and therefore, U*H*transpose(U) = [1.0, 2.0, 3.0; 6.0, 5.0, 4.0; 1.0, 0.0, 0.0]
A |
Type: Real[:,size(A, 1)] Description: Square matrix A |
---|
H |
Type: Real[size(A, 1),size(A, 2)] Description: Hessenberg form of A |
---|---|
U |
Type: Real[size(A, 1),size(A, 2)] Description: Transformation matrix |