(matrix_l, matrix_b)
return matrix_y
Forward substitution method for the solution of linear systems.

    Solves the equation :math:`Ly = b` using forward substitution method
    where :math:`L` is a lower triangular matrix and :math:`b` is a column matrix.

    :param matrix_l: L, lower triangular matrix
    :type matrix_l: list, tuple
    :param matrix_b: b, column matrix
    :type matrix_b: list, tuple
    :return: y, column matrix
    :rtype: list
Forward substitution method for the solution of linear systems.
Forward substitution method for the solution of linear systems .
def forward_substitution(matrix_l, matrix_b):
    """ Forward substitution method for the solution of linear systems.

    Solves the equation :math:`Ly = b` using forward substitution method
    where :math:`L` is a lower triangular matrix and :math:`b` is a column matrix.

    :param matrix_l: L, lower triangular matrix
    :type matrix_l: list, tuple
    :param matrix_b: b, column matrix
    :type matrix_b: list, tuple
    :return: y, column matrix
    :rtype: list
    """
    q = len(matrix_b)
    matrix_y = [0.0 for _ in range(q)]
    matrix_y[0] = float(matrix_b[0]) / float(matrix_l[0][0])
    for i in range(1, q):
        matrix_y[i] = float(matrix_b[i]) - sum([matrix_l[i][j] * matrix_y[j] for j in range(0, i)])
        matrix_y[i] /= float(matrix_l[i][i])
    return matrix_y
def forward_substitution ( matrix_l , matrix_b ) : q = len ( matrix_b ) matrix_y = [ 0.0 for _ in range ( q ) ] matrix_y [ 0 ] = float ( matrix_b [ 0 ] ) / float ( matrix_l [ 0 ] [ 0 ] ) for i in range ( 1 , q ) : matrix_y [ i ] = float ( matrix_b [ i ] ) - sum ( [ matrix_l [ i ] [ j ] * matrix_y [ j ] for j in range ( 0 , i ) ] ) matrix_y [ i ] /= float ( matrix_l [ i ] [ i ] ) return matrix_y