I'm working in a linear algebra software, but I have a problem.
If I try to reduce the matrix to reduced echelon form, many resources will be consumed. That is, if I perform many basic operations such as change rows positions, multiply, sum, etc, then this would be very expensive to implement.
So I'm looking for a more effective procedure such as a formula or something more elegant.
Is there any way?
There is no formula to get the row echelon form of a matrix. You can implement the intermediate steps as matrix multiplications with elementary matrices.
You should look into linear algebra libraries for whatever language you are working in. There are almost certainly efficient implementations for any common operation.