RREF Calculator
Reduced row echelon form or REF with each row operation, rank, nullity and linear system solutions.
Solve a system of 2 to 4 linear equations, such as and , with every step shown.
Solution
The system has exactly one solution, x = 2, y = 1. Graphically, the two lines cross at this single point.
Open these lines in the graphing calculator to zoom, trace and find the intersection yourself.
| x | y | Constant |
|---|---|---|
| 1 | 0 | 2 |
| 0 | 1 | 1 |
Write each equation in standard form
Collect the unknowns on the left and the constants on the right, in the same order in every equation.
Write the augmented matrix
Each row is one equation; the bar separates the coefficients from the constants.
Swap rows 1 and 2
Row 2 has a simpler x-coefficient, so it becomes the pivot row for x.
Eliminate x from the other rows
Subtract multiples of row 1 so every other entry in the x-column becomes 0: R2 → R2 − 2R1.
Make the y-pivot equal to 1
Divide row 2 by 5.
Eliminate y from the other rows
Subtract multiples of row 2 so every other entry in the y-column becomes 0: R1 → R1 + R2.
Read off the solution
The coefficient part is now the identity matrix, so each row states the value of one unknown.
Check by substitution
Substitute the solution into every original equation. 2x + 3y = 7: 2(2) + 3(1) = 7 ✓; x − y = 1: (2) − (1) = 1 ✓.
This systems of equations solver row-reduces the augmented matrix by Gaussian (Gauss–Jordan) elimination in exact fractions, says whether there is one solution, none or infinitely many, graphs the lines for two unknowns and checks the answer by substitution.
2x + 3y - z = 5; x - y + 2z = 5; 3x + y + z = 8. Terms may be on either side, as in 2x = 7 - 3y.x/2 or 3/4.Augmented matrix
Plain-text formula: {a_11x + a_12y = b_1; a_21x + a_22y = b_2 ⇔ [a_11, a_12, |, b_1; a_21, a_22, |, b_2]
A linear system is stored as the coefficient matrix A with the constants b attached as an extra column. Row operations on this matrix are the same as combining equations.
Elementary row operations
Plain-text formula: R_i ↔ R_j, R_i → kR_i (k ≠ 0), R_i → R_i − kR_j
Swapping rows, scaling a row by a nonzero number and subtracting a multiple of one row from another never change the solution set. Gauss–Jordan elimination uses them to reach reduced row echelon form.
Classification by rank
Plain-text formula: rank(A) = rank[A∣b] = n ⇒ one solution
If the two ranks differ, a row reduces to 0 = c with c ≠ 0 and there is no solution. If they are equal but smaller than the number of unknowns n, there are free variables and infinitely many solutions.
Cramer’s rule for two unknowns
Plain-text formula: x = (det A_x)/(det A), y = (det A_y)/(det A), det A ≠ 0
Each unknown is a ratio of two determinants. It applies only when det A is not zero, which is exactly when the system has one solution.
A unique solution (a consistent, independent system) gives one value for every unknown: the single point where all the lines or planes meet. No solution (an inconsistent system) means the equations contradict each other, and elimination ends in a row such as 0 = 3. Infinitely many solutions (a consistent, dependent system) means at least one equation is redundant; the answer is written with parameters such as t, and every value of t gives a valid solution.
The reduced row echelon form in the table summarizes everything: each leading 1 marks a pivot unknown, a column without a pivot is a free variable, and a row of zeros with a nonzero constant signals an inconsistent system. To row-reduce any matrix, not only a system, use the RREF calculator.
Because all arithmetic uses exact fractions, answers such as are exact, not rounded decimals.
There are four standard methods, and they all give the same answer. The table applies each one to and .
Substitution and elimination are quickest by hand for two equations. With three or four unknowns, elimination organized as row operations on the matrix is the method that stays manageable, which is why this calculator uses it. Gaussian elimination clears the entries below each pivot to reach row echelon form and then back-substitutes; Gauss–Jordan elimination, shown in the steps above, also clears the entries above each pivot so the answer can be read straight off the matrix. The guide to two-variable systems and the guide to three-variable systems work through more examples by hand.
Cramer’s rule is a fifth route for square systems. Here , so and . It needs one determinant per unknown and fails when , exactly the cases with no solution or infinitely many. The determinant calculator works out each one. When the solution is also , and the inverse matrix calculator finds .
| Method | What you do | On this system |
|---|---|---|
| Graphing | Draw both lines and read where they cross | The lines meet at (2, 1) |
| Substitution | Solve one equation for a variable and put it into the other | x = 1 + y, so 2(1 + y) + 3y = 7, 5y = 5, y = 1 and x = 2 |
| Elimination | Add multiples of the equations to cancel a variable | Add 3 × (x − y = 1) to the first equation: 5x = 10, so x = 2 and y = 1 |
| Matrices (Gaussian elimination) | Row-reduce the augmented matrix until each row gives one unknown | [2 3 | 7; 1 −1 | 1] reduces to [1 0 | 2; 0 1 | 1] |
Most wrong answers by hand come from a few slips. A substitution check at the end catches every one of them, which is why the calculator always finishes with one.
| Mistake | What goes wrong | How to avoid it |
|---|---|---|
| Dropping a sign when subtracting rows | R2 − 2R1 must double and subtract every entry of row 1, negatives included | Write the multiplied row out in full before subtracting |
| Forgetting the right-hand side | Changing the coefficients but not the constant gives a different system | Treat the constant as one more column of the row |
| Misaligned variables | Terms in a different order, or a missing unknown, end up in the wrong column | Write each equation as ax + by + cz = d, with 0 for a missing unknown |
| Reading 0 = 0 as no solution | A row of zeros with a zero constant only means one equation repeats another | Only 0 = c with c ≠ 0 means there is no solution |
| Giving one answer for a dependent system | A free variable means infinitely many solutions, not one | Write the answer with a parameter, such as x = 2 − t, y = t |
A boat travels 36 miles downstream in 2 hours and the same 36 miles back upstream in 3 hours. How fast is the boat in still water, and how fast is the current?
Let b be the speed of the boat and c the speed of the current, both in miles per hour. Downstream the current adds to the boat’s speed, so b + c = 36 ÷ 2 = 18. Upstream it subtracts, so b − c = 36 ÷ 3 = 12.
Enter b + c = 18; b - c = 12. Adding the equations gives 2b = 30, so the boat moves at 15 mph and the current at 3 mph. Check: 2 × (15 + 3) = 36 and 3 × (15 − 3) = 36.
Mixture, ticket and investment problems follow the same pattern: name one unknown per quantity you need, write one equation per fact you are given, then solve.
Find x, y and z.
Answer: The unique solution is x = 1, y = 2, z = 3. The determinant of the coefficient matrix is 5, which is nonzero, confirming there is exactly one solution.
During elimination a row turns into zeros on the left with a nonzero number on the right, such as 0 = 3. That is a contradiction, so no values satisfy every equation. For two unknowns it means the lines are parallel.
At least one unknown has no pivot and becomes a free parameter. For example, x + y = 2 and 2x + 2y = 4 describe the same line, so the solution is x = 2 − t, y = t for any number t.
Yes. It handles 2, 3 or 4 unknowns and up to 6 typed equations, so 3 × 3 and 4 × 4 systems both work, as do systems with more equations than unknowns. Extra equations either agree with the others (and reduce to 0 = 0) or contradict them, in which case there is no solution.
Yes, for two unknowns. The result draws each line and marks the point where they cross; parallel lines mean no solution, and a single shared line means infinitely many. With three or more unknowns the equations describe planes, so the row operations and the reduced matrix tell the story instead. For other curves, use the graphing calculator.
A linear equation only adds numbers times unknowns. Products of unknowns (xy), powers (), unknowns in a denominator (1/x) and functions such as sin x make it non-linear. Use the equation solver for a single non-linear equation.
Yes. Every coefficient is converted to an exact fraction and every row operation is done with fractions, so a solution such as x = 7/3 is exact. Decimal values are listed separately for convenience.
For a square system, a nonzero determinant of the coefficient matrix means exactly one solution. A zero determinant means either no solution or infinitely many, and elimination tells you which. The determinant calculator shows how it is computed.
Reduced row echelon form or REF with each row operation, rank, nullity and linear system solutions.
Exact determinants of 2x2 to 6x6 matrices by row reduction or cofactor expansion, with every step.
Exact inverses of 2x2 to 6x6 matrices by Gauss–Jordan elimination, with every row operation and a check.
Solve any equation in x: exact steps for linear and quadratic equations, numerical roots for the rest.
Plot functions, equations, inequalities, parametric and polar curves; find roots and intersections.
Free worked solutions for equations, systems, inequalities, factoring, derivatives, integrals, limits and matrices.
Results are calculated in your browser with methods checked by automated tests, and are intended for learning and general use. For engineering, medical, financial, legal or safety-critical decisions, verify important values independently and follow the rounding rules your work requires. How accurate are these results?