System of Equations Solver
Enter two linear equations in ax + by = c form and get the solution instantly, complete with a step-by-step elimination walkthrough. If you only have a single line to work with, try the slope calculator to find its slope and equation, or use the quadratic formula calculator when your equation involves a squared term instead of two linear equations.
Equation 1:
Equation 2:
Solution for x
Solution for y
Verify the Solution
Step-by-Step Solution
What Is a System of Linear Equations?
A system of linear equations is a set of two or more equations that share the same variables, where every variable appears only to the first power (no squares, roots, or products of variables). This tool focuses on the most common case in algebra classes: two equations, two unknowns — typically x and y. Each equation on its own describes a straight line when graphed, and "solving the system" means finding the point (or points) where those lines meet.
Methods for Solving Systems
There are three standard methods taught for solving a 2×2 system by hand, and this calculator uses a fourth, closely related shortcut behind the scenes.
Graphing
Plot both equations as lines on the same coordinate plane. Wherever the lines cross is the solution. Graphing is intuitive and great for building intuition, but it's imprecise by hand unless the intersection happens to fall on a nice grid point.
Substitution
Solve one equation for one variable (say, y in terms of x), then substitute that expression into the other equation. This collapses the system into a single equation with one unknown, which you can solve directly and then back-substitute to find the other variable.
Elimination
Multiply one or both equations by a constant so that the coefficients of one variable become opposites, then add the equations together so that variable cancels out ("eliminates"). This leaves a single-variable equation, just like substitution does, but arrives there by combining whole equations rather than swapping in an expression.
This calculator solves your system using elimination in its algebraic form, known as Cramer's Rule. It computes a value called the determinant, D = a₁b₂ − a₂b₁, from the coefficients of both equations. As long as D ≠ 0, the unique solution is given directly by x = (c₁b₂ − c₂b₁) / D and y = (a₁c₂ − a₂c₁) / D — no substitution required. It's the fastest way to solve a 2×2 system by formula, which is why it's what runs under the hood here.
One Solution, No Solution, or Infinite Solutions
Every 2×2 linear system falls into exactly one of three geometric cases:
One solution — intersecting lines. The two lines have different slopes, so they cross at exactly one point. This is the most common case, and it's what happens whenever the determinant D is not zero.
No solution — parallel lines. The two lines have the same slope but different y-intercepts, so they run side by side forever and never touch. Algebraically, D = 0 but the equations are not proportional to each other.
Infinite solutions — identical lines. Both equations describe the exact same line, just written differently (for example, one might be exactly double the other). Every point on the line satisfies both equations, so there are infinitely many solutions. Algebraically, D = 0 and the equations are proportional to each other.
Frequently Asked Questions
What does it mean when a system has no solution?
It means the two equations describe parallel lines that never intersect. There is no (x, y) pair that satisfies both equations at once. You'll often see this show up algebraically as a contradiction, such as simplifying down to 0 = 6.
What's a real-world example of a system of equations?
Break-even analysis is a classic one: one equation represents your total cost (fixed costs plus cost per unit), and the other represents your total revenue (price per unit times units sold). The solution to that system — where cost equals revenue — is your break-even point. You can explore that specific scenario further with the break-even calculator. Systems of equations also show up in mixing problems, comparing phone or subscription plans, and distance/rate/time problems involving two moving objects.
Can this solve three equations with three unknowns?
No — this tool is built specifically for 2×2 systems (two equations, two unknowns: x and y). Solving three equations in three unknowns requires a 3×3 version of Cramer's Rule or matrix row-reduction, which is a different calculation than what's implemented here.
What's the difference between substitution and elimination?
Substitution isolates one variable in one equation and plugs that expression into the other equation. Elimination instead scales and combines the two equations so that one variable cancels out entirely. Both methods reduce the system to one equation in one unknown — they just get there by different routes. Substitution tends to be quicker when a variable already has a coefficient of 1; elimination tends to be quicker when coefficients line up neatly for cancellation.
How do I know which method to use by hand?
If one of the equations is already solved for a variable (or easily can be, because a coefficient is 1 or -1), substitution is usually fastest. If the coefficients of x or y are the same or simple multiples of each other across the two equations, elimination is usually fastest. If you just need a quick visual sense of where two lines roughly meet, graphing is fine — but for an exact answer, substitution and elimination (or a calculator like this one) are more reliable.