MATLAB Function Reference
hess

Hessenberg form of a matrix

Syntax

• ```[P,H] = hess(A)
H = hess(A)
```

Description

```H = hess(A) ``` finds `H`, the Hessenberg form of matrix `A`.

```[P,H] = hess(A) ``` produces a Hessenberg matrix `H` and a unitary matrix `P` so that `A` `=` `P*H*P'` and `P'*P` = `eye(size(A))`.

Definition

A Hessenberg matrix is zero below the first subdiagonal. If the matrix is symmetric or Hermitian, the form is tridiagonal. This matrix has the same eigenvalues as the original, but less computation is needed to reveal them.

Examples

`H` is a 3-by-3 eigenvalue test matrix:

• ```H =
-149    -50   -154
537    180    546
-27     -9    -25
```

Its Hessenberg form introduces a single zero in the (3,1) position:

• ```hess(H) =
-149.0000    42.2037   -156.3165
-537.6783   152.5511   -554.9272
0     0.0728      2.4489
```

Algorithm

`hess` uses LAPACK routines to compute the Hessenberg form of a matrix:

 Matrix A Routine Real symmetric `DSYTRD``DSYTRD`, `DORGTR`, (with output `P`) Real nonsymmetric `DGEHRD``DGEHRD`, `DORGHR` (with output `P`) Complex Hermitian `ZHETRD``ZHETRD`, `ZUNGTR` (with output `P`) Complex non-Hermitian `ZGEHRD``ZGEHRD`, `ZUNGHR` (with output `P`)

`eig`, `qz`, `schur`