# Can anyone recommend good software for verifying row reduction steps?

I work as a tutor for linear algebra. Students will often have a problem that requires them to row reduce, and they'll make an arithmetic mistake somewhere. Often they'll ask for my help finding their mistake.

I often will go through the operations myself, but it takes a bit of time. Do you have any recommendations for an online app that can check each row operation? Ideally the app would:

• Display previous matrices, and the row operations that led to each.
• Allow you to "go back" if you made a mistake.

I've found a couple ones, like this one: https://www.zweigmedia.com/RealWorld/tutorialsf1/scriptpivotold.html. However, it doesn't print the previous versions of the matrix, and it doesn't let you "go back."

• I think this is a valid question for this site, since educators definitely might ask this (checking this stuff by hand in HW/exams is torture, I've certainly done it enough), but you may want to consider how to make your question more useful specifically for the educational context. Hope you find one! Sep 12, 2019 at 19:48
• One possible solution is to use Sagemath, cfm.brown.edu/people/dobrush/am34/sage/echelon.html Sep 13, 2019 at 8:35
• I have a Sage script that does Gauss's method in the way that a person does. It is at gitlab.com/jim.hefferon/linear-algebra/-/blob/master/src/… and brief instructions are at the top (it optionally outputs LaTeX but using my macros, and it does not do print(...) so you may need to edit it). Feb 12, 2021 at 21:47

There was a nice app at this site by Dan Gries. Unfortunately it required Adobe/Flash.

You could set the matrix size and enter your data. Then the site provides you with three operations: swap two rows, add a multiple of a row to another, or multiply a row by a number. Just the basic elementary row operations. Student is expected to know the Gauss or Gauss-Jordan operation. So that one can perform the process while the app does the arithmetic. A life saver for linear algebra students and teachers, without giving away the final answer!

Edit:

The following apps are not Flash-based:

Pavel Solin, NClab. You need to register first then follow this link.

Michael Eisermann, Stuttgart University.

• Except Flash is EOL at the end of 2020, right? Does anyone know if the site would be updated with HTML5 or other interactive capabilities? Sep 13, 2019 at 18:02
• @kcrisman another app is available, as included in edit. Mar 17, 2020 at 4:45

Not a software exactly, but super useful for those in the process of learning row reduction is the website: Linear Algebra Toolkit, by P. Bogacki. You just choose the number of rows and columns and it will produce the reduced row echelon form, and show each step along the way with the indicated row-op clearly stated. I've used this for years.

For example: • Thanks for this. I found a similar website a few months ago: Matrix Calculator Feb 14, 2021 at 1:34
• @Thierry very nice, I have not seen as nice a matrix multiplier as that. Lots of options as well, I shall add that to my website I think. Feb 14, 2021 at 2:54

I do this with Mathematica. Remember that each row operation is left multiplication by an elementary matrix.

(* This is the number of rows of the matrix. *)
n = 5;

(* This is a matrix with 1 in position (i,j) and 0 everywhere else. *)
e[i_,j_]:=Table[If[{a,b}=={i,j}, 1, 0], {a,n}, {b,n}];

(* This switches rows i and j *)
switch[i_, j_] := IdentityMatrix[n] + e[i, j] + e[j, i] - e[i, i] - e[j, j];

(* This multiplies row i by t *)
mult[i_, t_] := IdentityMatrix[n] + (t - 1) e[i, i];

(* This adds u times row i to row j *)
add[i_, j_, u_] := IdentityMatrix[n] + u e[j, i];


Given a matrix M, I can do one step of row reduction with a computation like add[1,2,-3].M and can do nested steps by add[1,3,5].add[1,2,-3].M etcetera.

Of course, if you just want the final answer, that is RowReduce[M].