Tridiagonal matrix
In linear algebra, a tridiagonal matrix is one that is "almost" diagonal. To be exact, a tridiagonal matrix has nonzero elements only in the main diagonal, the first subdiagonal, and the first superdiagonal.
For example:
is tridiagonal.
A tridiagonal matrix is Hessenberg. Although a general tridiagonal matrix is not necessarily symmetric or Hermitian, many of those that arise when solving linear algebra problems have one of these properties.
Many linear algebra algorithms require significantly less computational effort when applied to diagonal matrices, and this improvement often carries over to tridiagonal matrices as well. A transformation that reduces a general matrix to Hessenberg form will reduce a Hermitian matrix to tridiagonal form. Thus, many eigenvalue algorithms, when applied to a Hermitian matrix, involve reduction to tridiagonal form as a first step.