A triangular matrix has zeros above or below its diagonal. Follow forward and back substitution, read its determinant and eigenvalues, and use a triangular covariance factor.
Triangular matrix
A triangular matrix is a square matrix with zeros everywhere on one side of its main diagonal. A lower triangular matrix has zeros above the diagonal; an upper triangular matrix has zeros below it. The diagonal itself may contain zeros.
The practical payoff is an order in which to solve a system of linear equations: one unknown at a time. Risk calculations use triangular factors both to solve systems and to build correlated return shocks.
For example,
L=(2103),U=(2013)
are lower and upper triangular, respectively. Here U=L⊤: a transpose reverses the triangular orientation. Neither matrix is diagonal or symmetric. A diagonal matrix is both lower and upper triangular.
Solve in the direction the zeros allow
Suppose a hypothetical exposure model has two instruments. Per unit held, instrument 1 contributes 2 units of exposure A and 1 unit of exposure B; instrument 2 contributes no A and 3 units of B. To reach targets of 4 units of A and 8 units of B, the holdings solve
Lx=b,(2103)(x1\x2)=(48).
The first row contains only x1, so 2x1=4 gives x1=2. Substitute that into the second row:
x2=38−x1=38−2=2.
This is forward substitution: work from the first row down. Checking the original targets gives 2(2)=4 and 1(2)+3(2)=8. This toy model matches only its two stated exposures; it says nothing about cost, funding, omitted risks or whether the holdings are permitted.
For a general lower triangular matrix with nonzero diagonal, the same rule is
xi=Liibi−∑j=1i−1Lijxj,i=1,…,n.
The sum is empty when i=1. All the unknowns needed for row i have already been found.
For an upper triangular system, start at the last row and move up: back substitution. With U above and a different target (6,6)⊤, first solve 3x2=6, then 2x1+x2=6. Again the solution is (2,2)⊤.
Lower triangular L has rows 2,0 and 1,3. With target (4,8), solve x1=2 before x2=2. Upper triangular U has rows 2,1 and 0,3. With target (6,6), solve x2=2 before x1=2. The two targets differ.
Original synthetic systems, with dimensionless coefficients and targets for comparison. The highlighted zeros determine which unknown can be solved first. Transposing the matrix changes the system, so the right-hand side also differs here.
A dense triangular solve takes O(n2) arithmetic work. That is why algorithms often factor a more complicated matrix once and reuse its triangular factors for many targets. There is no need to form an explicit matrix inverse just to solve each system. Easy substitution does not guarantee an accurate answer when the system is poorly conditioned.
The diagonal gives two shortcuts
For either triangular orientation, the determinant is the product of the diagonal entries:
det(T)=i=1∏nTii.
Thus det(L)=2×3=6. A triangular matrix is invertible if and only if every diagonal entry is nonzero. If one is zero, the matrix is still triangular, but some right-hand sides have no solution and the solvable ones have nonunique solutions. Dividing by zero is not a way to continue substitution.
Its eigenvalues, counted with multiplicity, are also the diagonal entries: T−λI stays triangular, so its determinant is ∏i(Tii−λ). The eigenvalues of L are therefore 2 and 3.
These are not generally its singular values. Those depend on L⊤L, which here is
L⊤L=(5339).
Its eigenvalues are 7+13 and 7−13, so the singular values of L are their positive square roots. Also, reducing a general matrix to triangular form by ordinary row elimination preserves its solutions when the right-hand side is transformed consistently, but generally changes its eigenvalues. You cannot read the original matrix's eigenvalues from those pivots.
A triangular factor can create covariance
Consider a separate synthetic return model over one fixed horizon. Let z have mean zero and covariance matrix I, and set centred decimal returns to R=Cz, where
C=0.1L=(0.20.100.3).
Then R1=0.2z1 and R2=0.1z1+0.3z2. The first shock feeds both returns; the second feeds only the second return. Their population covariance is
Σ=CIC⊤=CC⊤=(0.040.020.020.10).
The entries of C convert dimensionless shocks to decimal returns; entries of Σ are in squared decimal-return units. The second variance is 0.12+0.32=0.10, not just the square of the second diagonal entry. The triangular factor is not itself the covariance matrix.
This is the structure used by Cholesky decomposition. A real symmetric positive definite matrix has a unique lower triangular Cholesky factor with positive diagonal. An arbitrary triangular matrix need not have a positive diagonal, and a singular covariance does not admit that strictly positive-diagonal factor. The covariance identity requires uncorrelated unit-variance shocks; assuming independent standard normal shocks additionally makes these returns jointly normal. A finite simulated sample will generally have a covariance different from the population target.
For the construction and its use in two successive triangular solves, see Cholesky Factorisation. The full lesson requires membership, with a public preview.
Sources
Gilbert Strang, Introduction to Linear Algebra, 5th edition (2016), §2.2, worked example 2.2B, and §2.6: triangular systems, nonzero pivots and forward/back substitution. §6.1, “Introduction to Eigenvalues,” p. 294 explains triangular eigenvalues and why elimination generally changes eigenvalues.
Lloyd N. Trefethen and David Bau III, Numerical Linear Algebra (SIAM, 1997), Lecture 17, Algorithm 17.1 and equation (17.2), on successive substitution and its operation count; Lecture 23, Theorem 23.1, on Cholesky factorisation.