What this calculator does
Find the values of x and y (or x, y and z) that make all your equations true at once. A system of linear equations is a set of equations that must all hold at the same time. With two unknowns, each equation is a straight line, and the solution is where the lines cross. With three unknowns, each equation is a flat surface called a plane. The solution is the single point all three planes share. Sometimes there's no such point, and sometimes there are infinitely many, with no end to them.
Enter the numbers from two equations in x and y, or three equations in x, y and z. These numbers in front of each letter are called coefficients. The calculator solves the system exactly. Answers stay as fractions such as 5/7 instead of rounded decimals, even when you type decimals. You can follow the working as elimination (Gauss–Jordan), one row change at a time. Or you can follow it as Cramer's rule, with every determinant shown. If the equations clash or repeat each other, the calculator tells you. When they repeat, it writes out the general solution.
Where it's used
Why this math matters outside the classroom:
- Ticket sales. If 2 adult and 3 child tickets cost $54 and adult tickets cost $2 more, solving gives $12 for adults and $10 for children.
- Mixing solutions. A chemist mixing 10% and 30% acid into 20 L of 25% acid solves x + y = 20 and 0.1x + 0.3y = 5 to get 5 L and 15 L.
- Break-even point. A business with costs of 500 + 5x dollars and revenue of 15x dollars breaks even where the lines meet, at x = 50 units.
- Coin puzzles. Twelve nickels and dimes worth 95 cents satisfy n + d = 12 and 5n + 10d = 95, so there are 5 nickels and 7 dimes.
- Nutrition planning. A cook combining two foods to hit 20 g of protein and 30 g of carbohydrate solves a 2×2 system for the serving sizes.
Grade level and standards: Grades 8–10; Common Core State Standards for Mathematics HSA.REI.C.6, 8.EE.C.8.b. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.
How to use it
- Choose a 2×2 system (x and y) or a 3×3 system (x, y and z), and the method you want to see in the working.
- Write each equation in the form ax + by (+ cz) = d. Then type the number in front of each letter and the constant on the right. Use 0 for a missing letter and a negative number for a subtracted term.
- Read the solution at the top. Fractions are exact, and the decimal value of each unknown is listed below it.
- Open the working to follow the row changes or the determinants. You can also check the system type and the determinant.
What the inputs mean
- Show the working by
- Both methods give the same answer. Elimination works for every system. Cramer's rule only works when the determinant is not zero, so for other systems the working switches to elimination.
- Equation 1: x coefficient
- Move every letter term to the left side first. For example, y = 2x − 1 becomes −2x + y = −1. So the x coefficient is −2, the y coefficient is 1 and the constant is −1.
Formula and method
a₁x + b₁y = d₁, a₂x + b₂y = d₂ D = a₁b₂ − a₂b₁, Dx = d₁b₂ − d₂b₁, Dy = a₁d₂ − a₂d₁ x = Dx ÷ D, y = Dy ÷ D (Cramer's rule, when D ≠ 0) Row operations: swap two rows, scale a row, add a multiple of one row to another
In the formulas, a₁ and b₁ are the numbers in front of x and y in the first equation, and d₁ is its right-hand side. a₂, b₂ and d₂ are the same for the second equation. D is the determinant: a single number made from the coefficients that tells you whether there's exactly one answer. Dx and Dy are determinants made by swapping in the constants, as described below.
Elimination writes the system as a grid of numbers called an augmented matrix. The numbers in front of the letters go on the left of a bar, and the constants go on the right. Then it simplifies the grid with row operations. None of the three operations changes the solutions. You keep repeating them until each column has a single 1 and zeros elsewhere (called reduced row echelon form). At that point you can read the answer straight off the right-hand column.
Cramer's rule writes each unknown as one determinant divided by another. D uses only the numbers in front of the letters. Dx replaces the x column with the constants, and the same goes for y and z. For three equations the determinants are 3×3, worked out the same way.
When D = 0, the lines are parallel or identical (or the planes don't meet in a single point). Elimination then gives one of two results. A row reading 0 = a nonzero number means there's no solution. A row of all zeros leaves at least one unknown free, which gives infinitely many solutions.
Worked example
Two adult tickets and three child tickets cost $54, and an adult ticket costs $2 more than a child ticket. What does each ticket cost?
- Let x be the adult price and y the child price: 2x + 3y = 54 and x − y = 2.
- Augmented matrix: [2, 3 | 54], [1, −1 | 2]. Scale row 1 by 1/2 to get [1, 3/2 | 27].
- Subtract row 1 from row 2: [0, −5/2 | −25]. Scale row 2 by −2/5: [0, 1 | 10], so y = 10.
- Subtract 3/2 of row 2 from row 1: [1, 0 | 12], so x = 12. By Cramer's rule, D = −5, Dx = −60 and Dy = −50 give the same x = 12 and y = 10.
Result: An adult ticket costs $12 and a child ticket costs $10. Check: 2 × 12 + 3 × 10 = 54 and 12 − 10 = 2.
Understanding the result
One solution means the system is consistent and independent: the lines or planes meet in exactly one point. No solution means it's inconsistent. The equations ask for two things that can't both be true, like parallel lines that never meet. Infinitely many solutions means it's dependent: at least one equation adds no new information.
In the infinite case, the answer is written with free unknowns, for example x = 6 − (3/2)y with y free. Pick any value for y and work out x, and you have one of the solutions.
Assumptions and limitations
- Every equation is linear. The unknowns appear only to the first power (no x² or x³), and they're never multiplied together.
- The numbers you type are used exactly as typed and turned into exact fractions before solving.
- Up to three equations in three unknowns. Larger systems need a matrix tool.
- Non-linear equations, such as one containing x² or xy, can't be entered here.
- The system must have as many equations as unknowns. If you have only two equations in three unknowns, enter a third equation or use the matrix calculator.
Frequently asked questions
Which method should I use, substitution, elimination or Cramer's rule?
All three give the same answer. Substitution is quick when one equation already gives a letter on its own. Elimination works for every system, and it's what this calculator's row operations show. Cramer's rule is a tidy formula for small systems, but it fails when the determinant is zero.
How can I tell whether a system has no solution?
In two unknowns, the lines have the same slope but cross the y-axis at different points, so they never meet. During elimination, this shows up as a row where every number in front of a letter is zero, but the constant isn't. That row reads 0 = something, which is impossible.
Why are my answers fractions?
Because they're exact. The calculator solves with whole-number fractions throughout, so 5/7 is shown as 5/7 rather than 0.714286. The decimal value of each unknown is listed below the solution if you need it.
What does the determinant tell me?
If the determinant of the coefficients is not zero, the system has exactly one solution. If it's zero, the system has either no solution or infinitely many, and elimination decides which.
Can I enter decimals such as 0.1x + 0.2y = 0.3?
Yes. Each decimal is turned into its exact fraction (0.1 becomes 1/10) before solving. So the small rounding errors that decimal-only methods pick up don't appear in the answer.
How this calculator is checked
Method: Gauss–Jordan elimination to reduced row echelon form and Cramer's rule, computed in exact rational arithmetic; consistency classified by comparing pivots of the coefficient and augmented matrices. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.
Embed this calculator
Put this System of Equations Calculator on your own website or blog for free. Paste this code where you want it to appear: