Given a matrix with at least as many columns as it has rows, the ref( command uses a technique called Gaussian elimination to put the matrix into row-echelon form.
This means that the leftmost N columns (if the matrix has N rows) of the matrix are upper triangular - all entries below the main diagonal are zero. What's more, every entry on the main diagonal is either 0 or 1.
[[1,2,5,0][2,2,1,2][3,4,6,2]] [[1 2 5 0] [2 2 1 2] [3 4 6 2] ref(Ans)►Frac [[1 4/3 2 2/3] [0 1 9/2 -1 ] [0 0 0 0 ]]
In theory, a system of linear equations in N variables can be solved using the ref( command - an equation of the form <math>a_1x_1+\dots + a_nx_n = b</math> becomes a row <math>a_1, \dots, a_n, b</math>, and is put into the matrix. If there is a sufficient number of conditions, the last row of the reduced matrix will give you the value of the last variable, and back-substitution will give you the others.
In practice, it's easier to use Rref( instead for the same purpose.
- ERR:INVALID DIM is thrown if the matrix has more rows than columns.
- |- and other row operations.