Direct Solver

Direct solvers are a class of algorithms designed to compute the exact solution to a linear system in a finite number of steps, up to numerical precision. In the context of optimization and simulation, the coefficient matrix is often symmetric positive definite (SPD), making direct solvers both robust and efficient for moderate-sized problems.

Forward and Backward Substitution for Triangular Matrices

Solving is particularly straightforward when is triangular. If is lower triangular, i.e. the system can be solved by forward substitution. The -th variable is solved as: This process proceeds from to , using previously computed for .

If is upper triangular, the system is solved by backward substitution: This process proceeds from down to , using already computed for .

Cholesky Decomposition

For general SPD matrices, we can reduce the problem to triangular systems using the Cholesky decomposition. Given SPD, we can factor , where is lower triangular.

Method 34.1.1 (Cholesky Decomposition). Given a symmetric positive definite matrix , the Cholesky decomposition computes a lower triangular matrix such that . The algorithm is as follows:

Algorithm 34.1.1 (The Cholesky Decomposition Algorithm).

Once the decomposition is computed, solving reduces to two triangular systems:

  1. Forward substitution: Solve for .
  2. Backward substitution: Solve for .

Cholesky decomposition takes advantage of the symmetry and positive definiteness of , reducing both computational cost and memory usage compared to general-purpose methods like LU decomposition. Direct solvers are widely used when the system size is not too large, or when high accuracy is required for ill-conditioned systems. For very large or highly sparse systems, iterative solvers may be preferred, as discussed in the next section.