hessenberg

Return upper Hessenberg form of a matrix

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Syntax

     H = Matrices.hessenberg(A);
(H, U) = Matrices.hessenberg(A);
 

Description

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.

Example

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]

See also

Matrices.Utilities.toUpperHessenberg

Syntax

(H, U) = hessenberg(A)

Inputs (1)

A

Type: Real[:,size(A, 1)]

Description: Square matrix A

Outputs (2)

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