def rref_solve(matlist, variable, constant, K):
 new_matlist = copy.deepcopy(matlist)
 augmented = augment(new_matlist, constant, K)
 solution = rref(augmented, K)
 return col(solution, (-1))

def rref_solve ( matlist , variable , constant , K ) : new_matlist = copy . deepcopy ( matlist ) augmented = augment ( new_matlist , constant , K ) solution = rref ( augmented , K ) return col ( solution , ( - 1 ) )
solves a system of equations using reduced row echelon form given a matrix of coefficients .