# RowReduce : Record of all the row operations for RREF

I read "for what right-hand sides $b=(a,b,c)$ does $Ax=b$ have a solution", but that question pertains to solving for the unknown vector. I'd like a record of all of the row operations required to put a matrix in reduced row echelon form without LU Decomposition.

When I input RowReduce[{{3, 1, a}, {2, 1, b}}], Mathematica returns:
{{1, 0, a - b}, {0, 1, -2 a + 3 b}}

Howbeit, when I input RowReduce[{{1, 2, r_1}, {2, 3, r_2}, {2, 4, r_3}, {2, 5, r_4}}], Mathematica doesn't manifest explicitly the resource vector $(r_1, r_2, r_3, r_4)$ in :
{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {0, 0, 0}} ?
How can I oblige it to, whenever matrices are input and not only for this one?

• Possible duplicate of: mathematica.stackexchange.com/q/148/131 Dec 2, 2013 at 13:09
• To get full information you might augment with an identity matrix, then row reduce. mat = {{1, 2}, {2, 3}, {2, 4}, {2, 5}}; augmat = Join[mat, IdentityMatrix[Length[mat]], 2]; RowReduce[augmat] Dec 2, 2013 at 16:33