System of Equations Solver (2 or 3 Variables)
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free system of equations solver. Type linear equations like 2x + 3y = 13, one per line, to solve 2 to 6 unknowns, with the determinant and coefficient matrix.
- Determinant
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the system of equations solver
- Type each equation on its own line, such as
2x + 3y = 13andx - y = -1. - Use single letters for unknowns (x, y, z or any other letter) and numbers for coefficients. Decimals and negative numbers work;
3.5z,-yandyare all fine. - Use as many equations as unknowns: two equations for two unknowns, three for three, up to six.
- Read the solution. The system of equations solver shows the value of each unknown, the determinant of the coefficient matrix, and the matrix itself.
Terms can appear on either side of the equals sign: 2x = 13 - 3y works too.
What is a system of linear equations?
A system of linear equations is a set of equations with the same unknowns, which must all be true at the same time. For example:
- 2x + 3y = 13
- x − y = −1
The solution is the pair of values that satisfies both: x = 2, y = 3. Check: 2(2) + 3(3) = 13 ✓, and 2 − 3 = −1 ✓.
Graphically, each linear equation in two unknowns is a straight line, and the solution is where the lines cross.
How many solutions can a system have?
| Case | Graph (two unknowns) | Determinant |
|---|---|---|
| Exactly one solution | Lines cross at one point | Not zero |
| No solution | Lines are parallel | Zero |
| Infinitely many solutions | Lines are the same | Zero |
When the determinant of the coefficient matrix is zero, the system doesn't have a single unique solution, and the solver tells you so. For example, x + y = 2 and 2x + 2y = 4 describe the same line, so there are infinitely many solutions.
Methods for solving systems
Substitution
Solve one equation for one unknown and substitute into the other. From x − y = −1, x = y − 1. Substituting: 2(y − 1) + 3y = 13, so 5y = 15 and y = 3, then x = 2.
Elimination
Add or subtract multiples of the equations to eliminate one unknown. Multiply x − y = −1 by 3 to get 3x − 3y = −3, then add it to 2x + 3y = 13: 5x = 10, so x = 2.
Cramer's rule
For a system with a non-zero determinant D, each unknown equals a ratio of determinants. For two equations:
- a₁x + b₁y = c₁
- a₂x + b₂y = c₂
D = a₁b₂ − a₂b₁, x = (c₁b₂ − c₂b₁) ÷ D, y = (a₁c₂ − a₂c₁) ÷ D.
For the example: D = 2(−1) − 1(3) = −5; x = (13(−1) − (−1)(3)) ÷ −5 = (−13 + 3) ÷ −5 = 2; y = (2(−1) − 1(13)) ÷ −5 = 3.
Gaussian elimination (matrices)
Write the system as a matrix and use row operations to reduce it, then back-substitute. This is the method computers use for larger systems, and it's what the system of equations solver uses internally (with partial pivoting for accuracy). Our matrix calculator shows determinants and inverses.
Three equations, three unknowns
The solver handles larger systems the same way:
- x + y + z = 6
- 2x − y + z = 3
- x + 2y − z = 2
Solution: x = 1, y = 2, z = 3, with a determinant of 7. Graphically, each equation is a plane in 3D space, and the solution is the point where all three planes meet.
Writing equations the solver understands
- Put each equation on a new line.
- Write the coefficient before the letter:
3x, notx3. - Use
-yfor −1y andyfor 1y. - Combine terms however you like; the solver collects like terms:
2x + y - x = 5is read asx + y = 5. - Don't use products of unknowns (
xy) or powers (x^2): those aren't linear equations. For quadratics, use the quadratic formula calculator.
Real-world uses
Systems of equations appear whenever several conditions must be satisfied at once:
- Mixture problems: how much of two solutions or ingredients to combine to reach a target concentration or cost.
- Pricing: working out individual prices from combined totals (2 coffees and 3 muffins cost 13; 1 coffee and 1 muffin cost 5).
- Business: finding the break-even point where cost and revenue lines meet.
- Engineering and physics: circuits (Kirchhoff's laws), forces in structures, and balancing chemical equations.
- Economics: supply and demand equilibrium.
A worked example
A café sells two kinds of gift box. On Monday it sold 4 small boxes and 3 large boxes for 103 in total. On Tuesday it sold 2 small and 5 large boxes for 125. What does each box cost?
Let s be the price of a small box and l the price of a large box:
- 4s + 3l = 103
- 2s + 5l = 125
In the system of equations solver: l = 21, s = 10. The determinant is −14 (the solver lists unknowns alphabetically, l then s; in the order s, l it would be 4 × 5 − 3 × 2 = 14). Either way it isn't zero, so there's exactly one solution.
Check by substituting back: 4(10) + 3(21) = 40 + 63 = 103 ✓, and 2(10) + 5(21) = 20 + 105 = 125 ✓. Substituting the answer back into every equation is a good habit: if a total had been typed wrongly, the check would fail and show you which equation to look at.
Who uses a system of equations solver
Students use it to check algebra homework. Teachers use it to create problems with clean answers. Engineers, scientists and economists use systems of equations in models. Business owners use simple systems for pricing and mixture problems.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit is a Google Ads agency that does PPC and nothing else: we build the campaigns, block the searches that waste money, write the ads, set up conversion tracking and send you a short report every week. Request a free PPC audit and we will show you, in dollars, what we would fix first.
Substitution in detail
Substitution works well when one equation is easy to rearrange. Take x + y = 10 and 2x − y = 5. From the first equation, y = 10 − x. Substitute that into the second: 2x − (10 − x) = 5, so 3x − 10 = 5, which gives 3x = 15 and x = 5. Then y = 10 − 5 = 5. Always check by putting both values back into both original equations: 5 + 5 = 10 and 2 × 5 − 5 = 5. Both hold, so the solution is correct.
Elimination in detail
Elimination works well when the coefficients line up neatly. Take 3x + 2y = 16 and x − 2y = 0. Adding the two equations removes y: 4x = 16, so x = 4. Substituting back into the second equation gives 4 − 2y = 0, so y = 2. When the coefficients don't match, multiply one or both equations first. For 2x + 3y = 12 and 3x + 2y = 13, multiply the first by 3 and the second by 2 to get 6x + 9y = 36 and 6x + 4y = 26. Subtracting gives 5y = 10, so y = 2, and then 2x + 6 = 12 gives x = 3.
Cramer's rule
For small systems, Cramer's rule gives each unknown as a ratio of two determinants. For a two-variable system ax + by = e and cx + dy = f, the main determinant is D = ad − bc. Then x = (ed − bf) ÷ D and y = (af − ec) ÷ D. With 2x + 3y = 12 and 3x + 2y = 13, D = 2 × 2 − 3 × 3 = −5, so x = (12 × 2 − 3 × 13) ÷ −5 = −15 ÷ −5 = 3 and y = (2 × 13 − 12 × 3) ÷ −5 = −10 ÷ −5 = 2, matching the elimination result. If D is zero, Cramer's rule can't be used, because the system has either no solution or infinitely many. That's the same test the system of equations solver uses to tell you when there's no unique answer.
Checking for errors in your setup
Most wrong answers come from setting up the equations, not solving them. Before you use the system of equations solver, check that:
- Each equation describes one fact from the problem, such as a total quantity or a total cost.
- Units match across each equation. Don't mix hours with minutes or pounds with pence.
- You have as many independent equations as unknowns. Two copies of the same fact, written differently, don't count as two equations.
- Signs are right, especially when moving terms from one side to the other.
Once the system of equations solver gives you an answer, check it makes sense in the real problem. Negative ticket sales or a fraction of a person usually mean the equations need another look.
Sources and further reading
- System of linear equations on Wikipedia: methods and types of solutions.
- Cramer's rule on Wikipedia: solving with determinants.
- Gaussian elimination on Wikipedia: the row-reduction method.
Frequently asked questions
How do I solve a system of two equations?
Use substitution, elimination or Cramer's rule, or type the equations into the system of equations solver.
How many equations do I need?
As many independent equations as there are unknowns: two for x and y, three for x, y and z.
What does it mean if there's no solution?
The equations contradict each other: for two unknowns, the lines are parallel.
What does a determinant of zero mean?
The system has no unique solution: either no solution or infinitely many.
Can the solver handle three variables?
Yes, and up to six unknowns.
Is the system of equations solver free?
Yes. It's free, needs no sign-up, and works in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.