title: Forward substitution of lower triangular matrix. How?
body: <p>Not sure if this is the right place to ask but here goes.</p>
  
  <p>Does anyone know how the following code is able to solve for x <code>Lx=y</code> where L and y are a given matrix and a vector, respectively?</p>
  
  <p>If you know, could you break it down and compare each step to how you would solve it with pen and paper?</p>
  
  <pre><code>def forward(L, y):
      x = []
      for i in range(len(y)):
          x.append(y[i])
          for j in range(i):
              x[i]=x[i]-(L[i, j]*x[j])
          x[i] = x[i]/L[i, i]
      return x
  </code></pre>