function [U, c] = GaussianElimination(A, b)
U = A;
c = b;
[rows, columns] = size(U);
[c_rows, c_columns] = size(c); 
eliminations = min(rows, columns);
for i = 1 : eliminations
    for j = i + 1 : rows
        multiplier = U(j, i)/U(i, i);
        for k = i : columns
            U(j, k) = U(j, k) - multiplier*U(i, k);
        end
        for k = 1 : c_columns
            c(j, k) = c(j, k) - multiplier*c(i, k);
        end
    end
end

