gives the Hessenberg decomposition of a numerical matrix m.

Details and Options

  • The result is given in the form {p,h} where p is a unitary matrix such that p.h.ConjugateTranspose[p]==m.
  • The matrix m must be square.


open allclose all

Basic Examples  (1)

Find the Hessenberg decomposition of a 4×4 matrix:

The matrix is upper Hessenberg, meaning it has only zeros beneath the first subdiagonal:

Verify that is unitary and p.h.TemplateBox[{p}, ConjugateTranspose]=m:

Scope  (9)

Basic Uses  (5)

Find the Hessenberg decomposition of a machine-precision matrix:

Format the result:

Hessenberg decomposition of a complex matrix:

Hessenberg decomposition for an arbitrary-precision matrix:

Exact matrices must be numericized to be used with HessenbergDecomposition:

The Hessenberg decomposition of a large numerical matrix is computed efficiently:

Special Matrices  (4)

Find the Hessenberg decomposition for sparse matrices:

Hessenberg decompositions of structured matrices:

Hessenberg decomposition of an identity matrix consists of two identity matrices:

Hessenberg decomposition of HilbertMatrix:

Applications  (2)

The Hessenberg decomposition is particularly useful for Hermitian matrices because the resulting matrix is tridiagonal. Generate a random 6×6 Hermitian matrix:

Verify that the matrix is Hermitian:

Compute the Hessenberg decomposition:

If small numerical errors are ignored, the matrix is manifestly tridiagonal:

A matrix is tridiagonal if it is both upper and lower Hessenberg. The following shows that the small numbers discarded by Chop were in fact numerically insignificant:

A simple method for computing the Schur decomposition is the unshifted QR algorithm. Starting with , at each stage compute the QR decomposition of , then let t_(k+1)=r.TemplateBox[{q}, Transpose]. In the limit, converges to the desired matrix (for well-behaved input matrices). A modification to speed up this algorithm is to let be the matrix of Hessenberg decomposition. Because so many entries are already zero, each QR step is much faster. Explore this for a randomly generated 25×25 real symmetric matrix:

The matrix is real and symmetric:

Do 2000 iterations of the unshifted QR algorithm using QRDecomposition:

As the eigenvalues of are real, they make up the diagonal of up to small numerical error:

The modification where the Hessenberg decomposition is computed first is roughly twice as fast:

It also produces a smaller numerical error:

Properties & Relations  (7)

A random 4×4 matrix:

Compute its Hessenberg decomposition:

The matrix is unitary:

The matrix is upper Hessenberg:

The original matrix is given by p.h.ConjugateTranspose[p]:

For an upper Hessenberg matrix h, HessenbergDecomposition[h] returns :

All 2×2 matrices are upper Hessenberg, and are returned unchanged by HessenbergDecomposition:

Det[m] equals the determinant of the matrix of HessenbergDecomposition[m]:

Tr[m] equals the trace of the matrix of HessenbergDecomposition[m]:

The Hessenberg decomposition of a Hermitian matrix is tridiagonal:

Both the Hessenberg and Schur decompositions reduce real matrices to a Hessenberg matrix:

HessenbergDecomposition is based on row operations and preserves the top-left corner:

SchurDecomposition is based on eigenvalues; entries below the diagonal indicate complex values:

Possible Issues  (1)

HessenbergDecomposition works only with matrices of approximate numerical values:

Use JordanDecomposition for exact matrices:

Wolfram Research (2004), HessenbergDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/HessenbergDecomposition.html.


Wolfram Research (2004), HessenbergDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/HessenbergDecomposition.html.


Wolfram Language. 2004. "HessenbergDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/HessenbergDecomposition.html.


Wolfram Language. (2004). HessenbergDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HessenbergDecomposition.html


@misc{reference.wolfram_2023_hessenbergdecomposition, author="Wolfram Research", title="{HessenbergDecomposition}", year="2004", howpublished="\url{https://reference.wolfram.com/language/ref/HessenbergDecomposition.html}", note=[Accessed: 01-October-2023 ]}


@online{reference.wolfram_2023_hessenbergdecomposition, organization={Wolfram Research}, title={HessenbergDecomposition}, year={2004}, url={https://reference.wolfram.com/language/ref/HessenbergDecomposition.html}, note=[Accessed: 01-October-2023 ]}