Row Echelon Form Calculator

Row Echelon Form Calculator transforms matrices using Gaussian elimination, identifying pivots, simplifying systems, and enabling rank, solution, and determinant insights.

You can type a matrix like [[1,2],[3,4]] or rows separated by new lines (values separated by commas or spaces). Expressions like 1/2, sqrt(2) are allowed. All rows must have the same number of columns.
Controls how many digits appear when numbers are displayed. Internal math uses full precision.
Examples
Click an example to autofill the matrix, then press Calculate.

Results

Equation (exact expression)
A = [[1,2,3],[2,4,8],[1,1,2]]
Row Echelon Form (REF)
REF(A) = [[1,2,3],[0,1,2],[0,0,1]]
Rows (m)
3
Columns (n)
3
Rank (r)
3
Pivot Columns
1, 2, 3

Helping notes

  • REF makes zeros below each leading 1. We scale each pivot row and eliminate entries below the pivot.
  • Input may be a matrix like [[1,2],[3,4]] or row-by-row values with commas/spaces.
  • Decimal places affect formatting only.

What is a Row Echelon Form Calculator?

A Row Echelon Form (REF) Calculator converts any matrix into an upper, step-like arrangement that exposes pivot positions and simplifies linear systems. For a matrix \(A\in\mathbb{R}^{m\times n}\), its REF satisfies: (i) all nonzero rows appear above zero rows; (ii) in each nonzero row, the first nonzero entry (the pivot) lies to the right of the pivot in the row above; (iii) all entries below each pivot are zero. Reduced row echelon form (RREF) adds: pivots equal \(1\) and each pivot is the only nonzero entry in its column. REF is central to solving \(A\mathbf{x}=\mathbf{b}\), computing rank, and understanding linear dependence.

$$\textbf{Elementary Row Operations (EROs):}\quad R_i \leftrightarrow R_j,\quad R_i \leftarrow k\,R_i\ (k\neq 0),\quad R_i \leftarrow R_i + k\,R_j.$$

About the Row Echelon Form Calculator

Given a matrix \(A=[a_{ij}]\), the calculator applies Gaussian elimination—systematic EROs—to zero out entries below each pivot and produce \(\operatorname{REF}(A)\). If desired, it can continue to RREF by back-substitution and column clearing. For a system \(A\mathbf{x}=\mathbf{b}\), the augmented matrix is $$[A\mid \mathbf{b}] = \begin{bmatrix} a_{11}&\cdots&a_{1n}&\vline& b_1\\ \vdots & &\vdots &\vline& \vdots\\ a_{m1}&\cdots&a_{mn}&\vline& b_m \end{bmatrix},$$ and the same EROs are applied to both \(A\) and \(\mathbf{b}\). The number of pivots equals the rank: \(\operatorname{rank}(A)=r\). Solutions follow from identifying pivot and free variables after REF/RREF.

$$\textbf{Pivot formula (Gaussian step):}\quad a_{ii}^{(k)}\neq 0,\ \ R_j \leftarrow R_j - \frac{a_{ji}^{(k)}}{a_{ii}^{(k)}}\,R_i \quad (j>i)$$

How to Use this Row Echelon Form Calculator

  1. Enter matrix dimensions \(m\times n\), then fill entries of \(A\) (or the augmented matrix \([A\mid\mathbf{b}]\)).
  2. Choose the operation: REF or RREF. The tool applies EROs to create zeros below successive pivots.
  3. Read the output: pivots, rank \(r\), and (for augmented systems) whether the system is consistent or inconsistent.
  4. Interpret solutions: pivot columns give leading variables; non-pivot columns correspond to free variables and parametric solutions.

Consistency check uses the last row of \([A\mid\mathbf{b}]\): if a row becomes \([0\ \cdots\ 0\mid c]\) with \(c\neq 0\), the system is inconsistent.

Examples (applying the same formulas)

Example 1 (REF only): $$A=\begin{bmatrix} 1&2&1\\ 2&4&0\\ -1&-2&3 \end{bmatrix}.$$ Use pivot \(a_{11}=1\). Eliminate below: $$R_2\leftarrow R_2-2R_1=\begin{bmatrix}0&0&-2\end{bmatrix},\quad R_3\leftarrow R_3+R_1=\begin{bmatrix}0&0&4\end{bmatrix}.$$ REF: $$\operatorname{REF}(A)= \begin{bmatrix} 1&2&1\\ 0&0&-2\\ 0&0&4 \end{bmatrix},\quad \text{pivots in columns }1\text{ and }3,\ \operatorname{rank}(A)=2.$$

Example 2 (Augmented system to REF): $$\left[\begin{array}{cc|c} 2&1&5\\ 4&-2&2\\ -2&5&-1 \end{array}\right].$$ Pivot \(2\). Eliminate: $$R_2\leftarrow R_2-2R_1=\left[\begin{array}{cc|c}0&-4&-8\end{array}\right], \quad R_3\leftarrow R_3+R_1=\left[\begin{array}{cc|c}0&6&4\end{array}\right].$$ Next pivot \(-4\). Eliminate below: $$R_3\leftarrow R_3-\frac{6}{-4}R_2 =\left[\begin{array}{cc|c}0&0&16\end{array}\right].$$ REF: $$\left[\begin{array}{cc|c} 2&1&5\\ 0&-4&-8\\ 0&0&16 \end{array}\right],\quad \text{three pivots}\Rightarrow \operatorname{rank}(A)=2,\ \operatorname{rank}([A\mid\mathbf{b}])=3\ \Rightarrow\ \text{inconsistent.}$$

More Math & Algebra Calculators