Lower Hessenberg Matrix Checker
Check whether a square matrix has zero entries everywhere beyond the first diagonal above the main diagonal.
Check whether a square matrix has zero entries everywhere beyond the first diagonal above the main diagonal.
How Lower Hessenberg Matrix Checker Works
A looser version of lower triangular — instead of requiring everything above the main diagonal to be zero, it only requires everything beyond the first superdiagonal to be zero, so one extra non-zero band above the diagonal is allowed.
Who Uses Lower Hessenberg Matrix Checker and Why
- Confirming a matrix has been correctly reduced to Hessenberg form as a preprocessing step before an eigenvalue algorithm.
- Checking a textbook or homework matrix against the loosened triangular-like definition used in numerical linear algebra courses.
- Verifying that a sparse matrix structure produced by an algorithm matches the expected "almost triangular" band pattern.
Mistakes to Avoid
- Expecting the same strict zero pattern as lower triangular — Hessenberg form deliberately allows one extra non-zero diagonal band (the first superdiagonal) above the main diagonal.
- Assuming a matrix that fails the lower triangular check will also fail this one — a matrix with non-zero entries only on the first superdiagonal is lower Hessenberg even though it isn't lower triangular.
- Confusing lower Hessenberg with upper Hessenberg — they restrict opposite regions of the matrix, and a matrix can be one without being the other.
Tips for Best Results
- Any matrix that passes the lower triangular check will automatically pass this one too, since lower triangular is a stricter condition — use that as a quick sanity check.
- Reducing a general matrix to Hessenberg form first is a standard trick for speeding up eigenvalue computation, so this check is often run as a validation step in that pipeline rather than on its own.
Fixing Common Problems
I expected my matrix to fail but it passed. — Remember Hessenberg form is looser than triangular — one non-zero band beyond the main diagonal is still allowed. Check whether the non-zero entries you're worried about are confined to that single first superdiagonal.
Terms Explained
Superdiagonal: The diagonal band of entries immediately above the main diagonal, one position up and one position right of each diagonal entry.
Hessenberg form: A matrix structure almost triangular except for one extra allowed non-zero band, commonly used as an intermediate step in eigenvalue algorithms.