Mathwords logoMathwords

Hessenberg Matrix — Definition, Formula & Example

A Hessenberg matrix (usually meaning an upper Hessenberg matrix) is a square matrix that is almost upper triangular. All entries below the main diagonal are zero except those on the diagonal directly beneath it.

An n×nn \times n matrix H=(hij)H = (h_{ij}) is upper Hessenberg if hij=0h_{ij} = 0 whenever i>j+1i > j + 1. It is lower Hessenberg if hij=0h_{ij} = 0 whenever j>i+1j > i + 1; equivalently, HH is lower Hessenberg exactly when H⊤H^\top is upper Hessenberg. An upper Hessenberg matrix is called unreduced if every subdiagonal entry hi+1, ih_{i+1,\,i} is nonzero.

Key Formula

hij=0for all i>j+1h_{ij} = 0 \quad \text{for all } i > j + 1
Where:
  • hijh_{ij} = The entry in row i, column j of the matrix H
  • ii = Row index, from 1 to n
  • jj = Column index, from 1 to n

Worked Example

Problem: Let H=[120312014]H = \begin{bmatrix} 1 & 2 & 0 \\ 3 & 1 & 2 \\ 0 & 1 & 4 \end{bmatrix} and U=[211013001]U = \begin{bmatrix} 2 & 1 & 1 \\ 0 & 1 & 3 \\ 0 & 0 & 1 \end{bmatrix}. Confirm that HH is upper Hessenberg, compute HUHU, and check whether HUHU is upper Hessenberg.
Step 1: In a 3×3 matrix, the condition i > j + 1 applies only to the (3,1) position. In H that entry is 0, so H is upper Hessenberg. The subdiagonal entries 3 and 1 may be nonzero. U has zeros everywhere below its diagonal, so it is upper triangular.
h31=0h_{31} = 0
Step 2: Multiply row by column. For example, the (1,3) entry is (1)(1) + (2)(3) + (0)(1) = 7, and the (2,3) entry is (3)(1) + (1)(3) + (2)(1) = 8.
HU=[237648017]HU = \begin{bmatrix} 2 & 3 & 7 \\ 6 & 4 & 8 \\ 0 & 1 & 7 \end{bmatrix}
Step 3: Check the only position that must be zero. The (3,1) entry is row 3 of H times column 1 of U.
(0)(2)+(1)(0)+(4)(0)=0(0)(2) + (1)(0) + (4)(0) = 0
Answer: HU=[237648017]HU = \begin{bmatrix} 2 & 3 & 7 \\ 6 & 4 & 8 \\ 0 & 1 & 7 \end{bmatrix}. Its (3,1) entry is 0, so HUHU is upper Hessenberg. In general, an upper Hessenberg matrix times an upper triangular matrix (in either order) is upper Hessenberg.

Why It Matters

Numerical linear algebra courses use Hessenberg form as the first stage of the QR algorithm for eigenvalues. Any square matrix can be reduced to Hessenberg form by similarity transformations, which preserve eigenvalues. Each QR step then costs about n2n^2 operations instead of about n3n^3, because the Hessenberg form survives every iteration. This shortcut sits inside software such as MATLAB and NumPy.

Common Mistakes

Mistake: Thinking a Hessenberg matrix must have nonzero subdiagonal entries, or that it cannot be triangular.
Correction: The definition only requires zeros below the first subdiagonal. Subdiagonal entries may be zero, so every upper triangular matrix is also upper Hessenberg. A Hessenberg matrix with all subdiagonal entries nonzero has a separate name: unreduced.

Related Terms