function x = BackSolve(U, c)
[rows, columns] = size(U);
[c_rows, c_columns] = size(c); 
x = zeros(rows, c_columns);
for i = columns : -1 : 1
    for j = 1 : c_columns
        left_constants = 0;
        for k = i + 1 : columns
            left_constants = left_constants + U(i, k)*x(k, j);
        end
        x(i, j) = (c(i, j) - left_constants)/U(i, i);
    end
end

