Gaussian Elimination Calculator
Gaussian Elimination Calculator systematically transforms augmented matrices to row echelon or reduced forms, solving linear systems, computing rank, and consistency.
[[...],[...]] or one row per line (comma/space separated). Expressions allowed: 1/2, sqrt(2), 3^2. If you check augmented, the last column is treated as b.b.Results
M = [[2,1,5],[1,-1,1]]REF(M) = [[1,0,2],[0,1,3]]RREF(M) = [[1,0,2],[0,1,3]]Unique solution: x = [2, 3]Helping notes
- Gaussian elimination performs forward elimination to REF; RREF (Gauss–Jordan) also eliminates above pivots.
- If treated as augmented (
A|b): unique ⇔ rank(A)=rank(M)=#vars; none ⇔ rank(A)<rank(M); infinite ⇔ rank(A)=rank(M)<#vars. - Decimal places affect formatting only.
What is a Gaussian Elimination Calculator?
A Gaussian Elimination Calculator performs the classic algorithm that converts a matrix into row echelon form (REF) or reduced row echelon form (RREF). For a system \(A\mathbf{x}=\mathbf{b}\), it operates on the augmented matrix \([A\mid \mathbf{b}]\) to create zeros beneath successive pivots, exposing rank, consistency, and—when appropriate—the unique or parametric solution. In REF, nonzero rows appear above zero rows and each pivot lies to the right of the pivot above; RREF further scales pivots to \(1\) and clears every pivot column. Gaussian elimination is fundamental in algebra, data science, engineering, and numerical computing because it unifies solving systems, determining rank, and understanding linear dependence in one systematic procedure.
About the Gaussian Elimination Calculator
The calculator applies elementary row operations (EROs) to produce upper-triangular structure, optionally followed by back-substitution or full reduction to RREF. It supports arbitrary sizes \(m\times n\) and augmented systems. Pivots identify leading variables; non-pivot columns correspond to free variables. Rank is the number of pivots, \(\operatorname{rank}(A)=r\). Consistency is determined by comparing ranks of \(A\) and \([A\mid \mathbf{b}]\).
For best visual results, display formulas with MathJax; run arithmetic with math.js. When MathJax is configured with container-width line breaks, formulas wrap responsively.
How to Use this Gaussian Elimination Calculator
- Enter the matrix \(A\) (and \(\mathbf{b}\) if solving \(A\mathbf{x}=\mathbf{b}\)).
- Choose REF or RREF. The tool performs EROs to create zeros under each pivot.
- Read off pivots, \(\operatorname{rank}(A)\), and (for augmented input) whether the system is consistent.
- If consistent and \(r=n\), the solution is unique; if \(r<n\), express solutions with free parameters via RREF.
Examples (using the same formulas)
Example 1 — Unique solution: System \( \begin{cases} 2x+y=5\\ 4x-2y=2\end{cases}\). $$\left[\begin{array}{cc|c}2&1&5\\4&-2&2\end{array}\right] \xrightarrow{R_2\leftarrow R_2-2R_1} \left[\begin{array}{cc|c}2&1&5\\0&-4&-8\end{array}\right].$$ Divide \(R_2\) by \(-4\): \([0\ 1\ |\ 2]\). Eliminate \(y\) from \(R_1\): \(R_1\leftarrow R_1-1\cdot R_2\Rightarrow [2\ 0\ |\ 3]\). Divide \(R_1\) by \(2\): \([1\ 0\ |\ 3/2]\). $$\text{RREF}= \left[\begin{array}{cc|c}1&0&\tfrac{3}{2}\\0&1&2\end{array}\right] \Rightarrow (x,y)=\left(\tfrac{3}{2},2\right).$$
Example 2 — Infinite solutions: \(x+2y-z=1,\ 2x+4y-2z=2,\ -x-2y+z=-1\). $$\left[\begin{array}{ccc|c} 1&2&-1&1\\ 2&4&-2&2\\ -1&-2&1&-1 \end{array}\right] \xrightarrow{R_2\leftarrow R_2-2R_1,\ R_3\leftarrow R_3+R_1} \left[\begin{array}{ccc|c} 1&2&-1&1\\ 0&0&0&0\\ 0&0&0&0 \end{array}\right].$$ One pivot \(\Rightarrow r=1<n=3\). Let \(y=s,\ z=t\). From \(x+2y-z=1\): \(x=1-2s+t\). $$\mathbf{x}=\big(1-2s+t,\ s,\ t\big),\ \ s,t\in\mathbb{R}.$$
Example 3 — Inconsistent: \(x+y=1,\ 2x+2y=3\). $$\left[\begin{array}{cc|c}1&1&1\\2&2&3\end{array}\right] \xrightarrow{R_2\leftarrow R_2-2R_1} \left[\begin{array}{cc|c}1&1&1\\0&0&1\end{array}\right].$$ Row \([0\ 0\ |\ 1]\) implies \(0=1\Rightarrow\) no solution; \(\operatorname{rank}([A\mid \mathbf{b}])=\operatorname{rank}(A)+1\).