add backward_substitute, change solution output type to matrix for solve_partial_pivoting