Alternating right and left Householder transformations reduce a real square matrix to a bidiagonal matrix. For a lower-bidiagonal result, first clear row beyond column using a right transformation on trailing columns. Then clear column below row using a left transformation on trailing rows. Previously completed rows and columns are preserved. Since is a symmetric tridiagonal matrix, its eigenvalues are the squares of the singular values of . This explains the reduction structurally; explicitly forming is unnecessary and can worsen numerical conditioning.
The singular value decomposition gives
Therefore , counting multiplicities. These are the nonnegative square roots: zero singular values must be included if is singular. Strict positivity requires full rank, which the question does not assume.
Write the lower bidiagonal matrix entries as and . Its columns and have disjoint supports if , so has no entries outside the three central diagonals. More explicitly,
This proves both symmetry and the tridiagonal matrix structure.
Use banded Gaussian elimination followed by back substitution. To distinguish the right-hand side from the upper-diagonal coefficients , write it as . If the modified pivot elements are nonzero, the tridiagonal elimination recurrences are
They eliminate just the one entry below each pivot element. Solve the resulting upper bidiagonal matrix system by
There is a bounded number of arithmetic operations per row in each sweep, giving arithmetic operations and storage. The unpivoted recurrences cost arithmetic operations under the usual scalar-operation count.
For a general tridiagonal matrix, nonsingularity alone does not guarantee these pivot elements. If a zero or unsafe pivot element occurs, use partial pivoting between the current row and the next row. These are the only possible nonzero candidates in the current column; adjacent row swaps introduce at most a second upper diagonal. Tracking that fill-in keeps both Gaussian elimination and back substitution at arithmetic operations. For example, is invertible but requires a row swap. If the input is singular, report a zero final pivot element; a unique solution cannot be promised, and compatibility or free-variable analysis is a separate issue. No nonsingularity or safe-pivot assumption is silently inferred from the word tridiagonal.
Let . Store the tridiagonal matrix by its diagonal , lower diagonal , and upper diagonal . The linear system is
with the nonexistent endpoint terms omitted. Initialize and . For , compute the elimination multiplier, modified pivot element, and modified right-hand side:
These recurrence relations apply the elementary row operation after the preceding row has already been reduced. The transformed linear system is an upper bidiagonal matrix:
Thus back substitution is especially short:
For , only remains. Check each pivot element before its first division, including before back substitution.
Figure 1.
Tridiagonal elimination preserves the narrow band: only one row and one diagonal coefficient change per step
. Details.
Equivalently, this constructs an LU decomposition with unit lower bidiagonal matrix , whose lower diagonal is , and upper bidiagonal matrix , whose diagonal is and upper diagonal is . The sweep is forward substitution in . There is no fill-in outside these bands when no rows are interchanged. LAPACK's DGTSV source uses these same coefficient and right-hand-side updates in its branch without row interchange.[ref]