There used to be a `rref`

function to put a matrix in reduced row echelon form, but it is not available anymore.

Is it in some package, or has it been renamed?

https://github.com/blegat/RowEchelon.jl seems to be what you need

Thanks, that works. Also thanks to B. Legat from Belgium who saved `rref`

from the ongoing slimming of Base.

This code does not work properly under all situations. DO NOT reply on it. I have tested it against Mathematica and with back substitution and it fails occasionally.

This is a pretty old thread but such a comment is probably better suited as an issue on the associated repo, showing actual cases where the package computes the wrong result. I doubt much will be fixed without an actual example

rref form without partial pivoting is well known to be numerically unstable â€” you can easily contrive cases where roundoff errors blow up (for inexact arithmetic, e.g. standard floating-point arithmetic). (The RowEchelon.jl documentation acknowledges that itâ€™s â€śsensitive to numerical imprecisionâ€ť.) rref form is really only useful for pedagogy in comparison to hand calculations for simple cases.

Never use rref form for â€śseriousâ€ť numerical calculations â€” thatâ€™s why itâ€™s not included in the LinearAlgebra standard library or in similar libraries (numpy, LAPACK, â€¦). Use LU and other factorizations instead.

On the other hand, if the *exact* rref is necessary, AFAIK AbstractAlgebra.jl and/or Nemo.jl provide such functionality.