Audited 05 Aug 2026·Last updated 28 Oct 2026·3 citations·Tier 2·0 uses

Systems Of Equations Calculator

Solve two linear equations in x and y by Cramer's rule: enter each equation's coefficients and constant for x, y and the determinant that decides solvability.

Systems Of Equations Calculator

x solution
2
The value of x that satisfies both equations at once, the x-coordinate of the point where the lines cross.
y solution
1
Coefficient determinant
-3

Background.

Plenty of everyday puzzles have two unknowns and two facts that tie them together. A cinema sold 30 tickets for $300; adults pay $12 and children $8. How many of each? Each fact is a linear equation, and the answer is the one pair of numbers that satisfies both at once.

Drawn on a graph, each equation is a straight line, and the solution is the point where the two lines cross. That picture explains the three ways a pair of equations can turn out. Lines with different slopes cross exactly once, giving a single answer. Parallel lines never meet, so no pair works and the equations contradict each other. Two equations that are the same line in disguise, one a multiple of the other, agree everywhere and leave infinitely many answers.

The page solves the pair with Cramer's rule, which reduces the problem to three small determinants. The key one, a₁b₂ − a₂b₁, is built from the x and y coefficients alone and decides which case you are in. If it is anything but zero, the lines cross once and the solution follows directly. If it is zero, the lines are parallel or identical, and the page returns an error instead of inventing an answer; it does not say which of the two it is.

A determinant that is not zero but tiny next to the coefficients is a warning of another kind. The lines are nearly parallel, and small changes in the constants can swing the crossing point a long way, so answers built on measured or rounded data deserve caution.

Before entering anything, put each equation in the form ax + by = c, unknowns on the left and the constant on the right. A missing variable has coefficient 0, and a term moved across the equals sign changes sign.

What is systems of equations calculator?

A system of two linear equations in two unknowns is a pair of statements, a₁x + b₁y = c₁ and a₂x + b₂y = c₂, that must hold at the same time. Solving it means finding the x and y that make both true. When the coefficient determinant a₁b₂ − a₂b₁ is non-zero there is exactly one such pair, the point where the two lines intersect; when it is zero the system has either no solution or infinitely many.

How to use this calculator.

  1. Rewrite each equation as ax + by = c. For y = 3x − 2, subtract 3x from both sides to get −3x + y = −2, so the x coefficient is −3, the y coefficient 1 and the constant −2.
  2. Enter the first equation's x coefficient, y coefficient and constant, then the second equation's. Use 0 for a variable that does not appear, and keep every minus sign.
  3. Read off x and y, then substitute them back into both original equations. It takes seconds and catches sign errors made while rearranging.
  4. Look at the determinant. If the page refuses the system, the lines are parallel or coincide; if the determinant is very small compared with the coefficients, treat the answer as sensitive to rounding in the inputs.

The formula.

For a1x+b1y=c1 and a2x+b2y=c2, use Cramer's rule

With D = a₁b₂ − a₂b₁, Cramer's rule gives x = (c₁b₂ − c₂b₁) ÷ D and y = (a₁c₂ − a₂c₁) ÷ D. Each numerator is the determinant D with one column of coefficients swapped for the constants: the x column when solving for x, the y column when solving for y. D measures how far the two lines are from parallel. It is zero exactly when one row of coefficients is a multiple of the other, and then the division cannot be done, so the page stops with an error. Elimination and substitution reach the same x and y, since for two equations the methods are algebraically equivalent. For large systems Cramer's rule becomes very costly and Gaussian elimination is the usual choice, but for a 2 × 2 system it is the most direct route. Coefficients and constants can be any numbers from −1,000,000 to 1,000,000, decimals and negatives included.

A worked example.

Example

Solve 2x + y = 5 and x − y = 1. The coefficients are a₁ = 2, b₁ = 1, c₁ = 5 and a₂ = 1, b₂ = −1, c₂ = 1. The determinant is D = 2 × (−1) − 1 × 1 = −2 − 1 = −3. For x, the numerator is c₁b₂ − c₂b₁ = 5 × (−1) − 1 × 1 = −6, and −6 ÷ −3 = 2. For y, it is a₁c₂ − a₂c₁ = 2 × 1 − 1 × 5 = −3, and −3 ÷ −3 = 1. So x = 2 and y = 1. Checking: 2 × 2 + 1 = 5 and 2 − 1 = 1, both true, so the two lines cross at the point (2, 1). Change the second equation to 4x + 2y = 7 and the determinant becomes 2 × 2 − 4 × 1 = 0. The lines are now parallel, since 4x + 2y would have to equal 10 to match the first equation, and the page returns an error instead of a solution.

a12
b2-1
a21
c15
b11
c21

Frequently asked questions.

How do I turn a word problem into two equations?
Give each unknown a letter and write one equation per fact. For 30 cinema tickets totalling $300 at $12 per adult and $8 per child: x + y = 30 and 12x + 8y = 300. The determinant is −4, and the page returns x = 15 adults and y = 15 children.
The page says the determinant must be non-zero. What went wrong?
Your two equations describe parallel lines or the same line. Compare them: if one equation's coefficients and constant are all the same multiple of the other's, every point on that line is a solution. If the coefficients match in ratio but the constants do not, there is no solution at all.
Why is the determinant negative, and does that matter?
The sign only reflects the order of the equations and has no bearing on whether a solution exists. Swap the two equations and the determinant changes sign, from −3 to 3 in the default example, while x and y stay exactly the same, because both numerators flip sign too.
Can I solve three equations in three unknowns here?
No, the page handles two equations in x and y only. Cramer's rule does extend to three unknowns using 3 × 3 determinants, but by that size elimination is usually quicker by hand. A system with more equations than unknowns generally has no exact solution and calls for least squares instead.
Why can a tiny change in one number move the answer so much?
Because the lines are nearly parallel. With x + y = 2 and x + 1.001y = 2.001, the solution is x = 1, y = 1. Change the last constant to 2.002 and it jumps to x = 0, y = 2. The determinant here is only 0.001, which is the warning sign.

How this page was produced

Published by
Quanta Calculator
Primary sources
3 cited below
Method
For a1x+b1y=c1 and a2x+b2y=c2, use Cramer's rule
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon