Greetings; the Reduced Row Echelon Form (rref) is a strategy to solve linear equations such as chemical reactions, traffic flow and electric circuits. RowEchelon package has a rref() function. An example how to setup your code is shown below.