I was trying the following code to obtain the Gaussian elimination matrix. (the Echelon form, not the reduce echelon form). Since Mathematica does not have a build in function for it, but I used this code from this post https://community.wolfram.com/groups/-/m/t/475750

I know that Gaussian elimination phase is not unique. Two people can get different output. However, one should still be able to obtain one output from the other, using some allowed row operations, correct?

The output I get from the above code, I am not able to transform to the output I get by hand, also checked with Maple. The output of Maple’s Gaussian elimination, I can transform to the one I got by hand.

So I am not sure what is going on. Here is the code is used as is from the above link, I just changed the matrix to the one I am using

```
(mat = {{2, -1, 3}, {3, 1, -2}, {2, -2, 1}}) // MatrixForm
{lu, p, c} = LUDecomposition(mat)
u = Normal(lu*SparseArray({i_, j_} /; j >= i -> 1, Dimensions(mat)))
MatrixForm(u)
```

The second Matrix above is the Gaussian elimination. I will now show Maple’s output (which agrees with mine, after transformation)

```
restart
A:=Matrix(((2,-1,3),(3,1,-2),(2,-2,1)));
LinearAlgebra:-GaussianElimination(A)
```

The second matrix above is the Gaussian elimination. We see the first row is the same. Multiplying the last row given by Mathematica by `2/5`

gives the last row from Maple’s result. So far so good.

But the second row is the problem. Multiplying the second row given by Mathematica by `-5/2`

gives `0,5/2,5`

and not as Maple shows which is `0,5/2,-13/2`

. The last entry is not the same.

There should be a way to transform Maple’s result to Mathematica’s and vis verse, using the allowed row operations. Correct?

I do not see how to do this.

Is Mathematica’s Gaussian elimination result given from the above code correct? If so, what legal row operations can be used to transform it to Maple’s output (which I know is correct, as it agrees with what I obtained by hand). I also verified Maple’s result using code posted in find-elementary-matrices-that-produce-rref

Version 12.3