AI Glossary / Mathematics and optimization / Intermediate
Bidiagonal matrix
Definition
A bidiagonal matrix is a matrix whose only potentially nonzero entries lie on the main diagonal and one immediately neighboring diagonal. An upper bidiagonal matrix uses the diagonal just above the main one; a lower bidiagonal matrix uses the one just below. This narrow structure makes several computations simpler and is an important intermediate form in algorithms for singular value decomposition.
What it means
The main diagonal runs from the top-left toward the bottom-right. “Bidiagonal” identifies where nonzero entries may occur; it does not require every permitted entry to be nonzero. A diagonal matrix therefore also fits the pattern.
An upper bidiagonal matrix is a special upper triangular matrix. Most upper triangular matrices are not bidiagonal because they may contain nonzero values farther above the main diagonal. Similarly, a tridiagonal matrix allows both neighboring diagonals, whereas a bidiagonal matrix allows only one of them.
How it works
For a square upper bidiagonal matrix, store diagonal entries d1 through dn and superdiagonal entries e1 through e(n−1). Matrix - vector multiplication then gives output_i = d_i x_i + e_i x_(i+1), except for the last row, which is d_n x_n.
When every diagonal entry is nonzero, solve an upper bidiagonal linear system by backward substitution. A lower bidiagonal system uses forward substitution.
In numerical linear algebra, orthogonal transformations can reduce a general real matrix to bidiagonal form. Specialized routines then compute its singular values or singular vectors. The transformation preserves singular values; it is not the same operation as simply deleting the original matrix's off-band entries.
Three practical examples
1. An SVD implementation first reduces a dense data matrix to a simpler bidiagonal form before continuing with a specialized singular-value algorithm.
2. A numerical model with one-sided nearest-neighbor coupling produces a bidiagonal coefficient matrix, allowing a compact representation and a direct substitution solve.
3. A linear-algebra lesson compares storage and multiplication for a dense matrix and its bidiagonal counterpart, while keeping their different mathematical contents explicit.
Think of it this way
Think of a row of stations where each output depends on its own input and, at most, the next station's input. That captures the upper bidiagonal multiplication pattern. The analogy does not describe every physical chain, and it should not imply that the inverse has the same local pattern: solving can propagate dependence through many stations.
Worked example
Consider the upper bidiagonal matrix B with rows (2,1,0), (0,3,−1), and (0,0,4). Its main diagonal is (2,3,4), and its superdiagonal is (1,−1). All remaining entries are zero.
Multiply B by x = (1,2,3). The first output is 2 × 1 + 1 × 2 = 4. The second is 3 × 2 − 1 × 3 = 3. The third is 4 × 3 = 12. Thus Bx = (4,3,12).
Recover x from this output by working upward. The last equation gives x3 = 12/4 = 3. The second gives 3x2 − 3 = 3, so x2 = 2. The first gives 2x1 + 2 = 4, so x1 = 1.
The matrix is nonsingular because its triangular determinant is 2 × 3 × 4 = 24. However, its diagonal entries are not automatically its singular values. For example, B-transpose times B has rows (4,2,0), (2,10,−3), and (0,−3,17), so its singular-value calculation involves the off-diagonal couplings too.
The example also distinguishes structure from appearance. Changing the top-right zero to 5 keeps the matrix upper triangular but destroys bidiagonality. Changing the central diagonal value to zero preserves bidiagonality but makes this square triangular matrix singular. These are independent properties, checked here by arithmetic rather than software execution.
Illustrative case study
Fictional case: Hazel Analytics builds a teaching implementation of an SVD pipeline. A developer tries to “bidiagonalise” a matrix by setting all distant entries to zero, obtaining a much smaller reconstruction error only on a specially chosen test.
The reviewers replace this with the intended transformation-based reduction and verify that the original matrix can be reconstructed from the factors within numerical tolerance. They also distinguish the stored reflector information from the visible bidiagonal entries in the library's work array. The case illustrates a common conceptual mistake; it is not a report of an actual software incident.
Common misconceptions and mistakes
Do not read “two diagonals” as any two arbitrary diagonal lines. The standard bidiagonal form uses the main diagonal and one immediately adjacent diagonal.
Do not assume bidiagonal matrices are symmetric. A nonzero superdiagonal without a corresponding subdiagonal is generally asymmetric.
Sparsity does not ensure numerical stability or invertibility. Tiny diagonal values can make a substitution sensitive, and singular-value computations need appropriate routines. Also, the eigenvalues of a square triangular matrix are its diagonal entries, but singular values are a different concept and must not be substituted for them.
Business use
Understanding bidiagonal structure helps teams choose suitable numerical routines and interpret intermediate results in data analysis. The direct business relevance is often inside libraries used for low-rank approximation, least squares, and matrix decomposition.
Use a tested implementation for large or sensitive calculations. Check dimensions, whether the form is upper or lower, and what the library stores in each output array. When evaluating a decomposition, examine reconstruction and orthogonality residuals rather than assuming that a matrix with many zeros must be the correct transformed result.
People also ask
Must both permitted diagonals contain nonzero values?
No. The definition restricts where nonzeros may appear; allowed entries can themselves be zero.
Is every upper triangular matrix bidiagonal?
No. Entries farther than one position above the main diagonal must be zero for upper bidiagonality.
Does bidiagonalisation preserve the original entries?
Not individually. Orthogonal transformations change the entries while preserving relevant properties such as singular values.
Check your understanding
If the top-right entry of the worked matrix becomes 5, is it still upper bidiagonal?
Answer: No. That entry lies two positions above the main diagonal. The matrix remains upper triangular but no longer satisfies the bidiagonal pattern.
Related terms
- Singular value decomposition
- Sparse matrix
- Diagonal matrix
- triangular matrix
- tridiagonal matrix
- orthogonal transformation
- backward substitution
- band matrix
Learn next
Study triangular solves next. Transpose the worked matrix and solve the corresponding lower bidiagonal system by forward substitution. Then explain why its singular values remain unchanged by transposition even though the substitution order changes.
More in Mathematics and optimization
- Absolute error loss - Absolute error loss measures a numerical prediction's error as the absolute difference between its predicted and reference values: L(y,y-hat)=|y-y-hat|.
- Active-set method - An active-set method is an optimization approach that works with a changing subset of constraints believed to be tight at the solution.
- Adjoint state method - The adjoint state method computes how a chosen objective changes when the parameters of a mathematical model change.
- Σ-algebra
- Algebraic connectivity - Algebraic connectivity is the second-smallest eigenvalue of a graph's Laplacian matrix.
- Algorithm IMED - Algorithm IMED, short for Indexed Minimum Empirical Divergence, is a method for choosing actions in a stochastic multi-armed bandit problem.
Sources
Primary documentation opened: LAPACK DLASDQ, https://www.netlib.org/lapack/explore-html/d9/d97/group__lasdq_ga823693abe0fbca565c62eeeb19ef289f.html; and AMD AOCL LAPACK SVD routines, https://docs.amd.com/r/en-US/63860-AOCL-LAPACK/SVD-Computational-Routines-APIs. These describe bidiagonal SVD and reduction. The matrix arithmetic and fictional case are original hand-checked illustrations.
Previous: Bicubic Next: Bidirectional