Symmetric LDL Block Factorization
Use scalar and two-by-two pivots to factor symmetric matrices of mixed sign.
By Riano · Published · Updated · Report a correction
Symmetric LDL Block Factorization
The block LDL factorization decomposes a real symmetric matrix into the product L D LT, where L is a unit lower triangular matrix (or block triangular) and D is a block diagonal matrix composed of 1x1 or 2x2 blocks. Unlike the Cholesky decomposition which is restricted to positive definite matrices and requires computing square roots, the LDL block factorization is square-root-free and works for any symmetric matrix (indefinite, positive, negative, or singular) by using 1x1 scalar pivots when possible and full 2x2 blocks to pivot past zero or small diagonals.
Worked Example
Consider the indefinite matrix A:
A = [ 1 2 ]
[ 2 1 ]We want to factor this as A = L D LT. The top-left entry is a = 1. Since a ≠ 0, we can use a standard 1x1 scalar pivot.
- Set the first diagonal entry of D to D11 = a = 1.
- Compute the multiplier for L: L21 = A21 / a = 2 / 1 = 2.
- Compute the Schur complement for the rest of D: D22 = A22 - L212 * D11 = 1 - 22 * 1 = 1 - 4 = -3.
The resulting factorization is:
L = [ 1 0 ] D = [ 1 0 ]
[ 2 1 ] [ 0 -3 ]We can find the inertia from D. There is one positive entry (1) and one negative entry (-3), so the inertia is (positive: 1, negative: 1, zero: 0), confirming the matrix is indefinite.
Experiment
You can interact with the Symmetric LDL Block Factorization module to explore different matrices.
- Select the "Indefinite" matrix preset and verify the L and D factors match the worked example above.
- Change the "Matrix" to "Zero pivot" and observe that the algorithm automatically falls back to a 2x2 pivot block (Largest D block = 2) to handle the 0 on the diagonal.
- Adjust the "Scale" to 0 or -1 and observe how the inertia responds. Congruence transformations preserve the sign of inertia, but scaling by a negative number swaps positive and negative counts.
Limitations
This module implements a bounded deterministic convention for 2x2 symmetric matrices to demonstrate the concept of block pivoting. It is not a complete or general-purpose Bunch-Kaufman pivoting strategy for arbitrary N x N matrices. Specifically, the fallback to 2x2 block pivoting is triggered explicitly when the top-left entry is zero and the off-diagonal is non-zero, rather than using full or partial pivoting with matrix permutations to guarantee numerical stability across a wide range of condition numbers.
References
These references provide the theoretical background and algorithmic details for computing symmetric block LDL factorizations. They detail the numerical stability and pivot choices which form the foundation of these methods.
- SciPy ldl reference:https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.ldl.html
- Golub, G. H., & Van Loan, C. F. (2013). Matrix Computations (4th ed.). Johns Hopkins University Press. (Section 4.4, Symmetric Indefinite Systems)
Experience it interactively
Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Symmetric LDL Block Factorization module.
Try Symmetric LDL Block Factorization on Riano →