5.1 Forward Substitution

The equation Ly = b is solved by forward substitution as follows.

$$y_{i}=\frac{b_{i}-\displaystyle\sum_{j=1}^{i-1}l_{ij}y_{i}}{l_{ii}},\mbox{ where }1 \leq i \leq n$$ (62)

Algorithm 4 implements Equation 62.

Algorithm 4: Forward Substitution
for $i=1,\cdots,n$
   $\alpha=b_{i}$
   for $j=1,\cdots,i-1$
      $\alpha=\alpha-l_{ij}y_{j}$
   $y_{i}=\displaystyle\frac{\alpha}{l_{ii}}$

If L is unit lower triangular, the division by lii is unnecessary (since lii is 1). Notice that the update to yi is accumulated as an inner product in $\alpha$.