System of Equations Calculator

Solve two linear equations by Cramer's rule, or detect parallel and identical lines.

Math and PercentUpdated 2026-10-193 min read
System of Equations Calculator
x
...
y...
Determinant...
System type...

What it does

A 2x2 system of equations is two lines, and solving it means finding where they meet. Two lines cross at one point, run parallel and never touch, or lie on top of each other entirely. The determinant, a single number built from the four coefficients, tells you which case you are in before the solving even starts.

The tool takes each equation in the standard form ax + by = c, six numbers in all, and applies Cramer's rule. That rule builds the determinant from the x and y coefficients, then forms two more determinants by swapping in the constants column. Dividing those by the first determinant produces x and y directly, with no substitution or elimination steps to shuffle through.

The default system uses 2x + 3y = 12 and x - y = 1. Its determinant is 2 x (-1) minus 1 x 3, which is -5. Cramer's rule gives x of 3 and y of 2, and substitution confirms both rows: 2(3) + 3(2) = 12 and 3 - 2 = 1.

A determinant of zero is the interesting case. The two rows then describe lines with the same slope, and whether they are parallel or identical comes down to the constants. The tool checks the ratios directly and reports either no solution, when the lines never meet, or infinitely many solutions, when both equations describe the same line.

Decimals and negative coefficients work without fuss, since Cramer's rule never divides by a coefficient, only by the determinant. That makes it robust against zero coefficients that would trip up substitution, such as an equation that has no y term at all.

How to use

  1. Rewrite each equation as ax + by = c.
  2. Enter the first equation's x coefficient, y coefficient, and constant.
  3. Enter the second equation's three numbers the same way.
  4. Press Calculate to see the determinant and the system type.
  5. Read x and y when the determinant is nonzero.
  6. Check by substituting both values into either original equation.

Formula

det = a1 x b2 - a2 x b1. x = (c1 x b2 - c2 x b1) / det. y = (a1 x c2 - a2 x c1) / det.
a1, b1, c1
Coefficients and constant of the first equation, ax + by = c.
a2, b2, c2
Coefficients and constant of the second equation.
det
Determinant a1 b2 minus a2 b1; nonzero means one solution.
x, y
The crossing point, found by Cramer's rule.

Cramer's rule divides each swapped determinant by the main one, which requires a nonzero determinant. At zero, the system is checked row by row: a leftover contradiction such as 0 = 5 means no solution, and a leftover truth such as 0 = 0 means the same line written twice.

Worked example

Example: 2x + 3y = 12 and x - y = 1

Solve the system 2x + 3y = 12 and x - y = 1.

  1. Determinant: 2 x (-1) - 1 x 3 = -5.
  2. x numerator: 12 x (-1) - 1 x 3 = -15, so x = -15 / -5 = 3.
  3. y numerator: 2 x 1 - 1 x 12 = -10, so y = -10 / -5 = 2.
  4. Check the first row: 2(3) + 3(2) = 12.
  5. Check the second row: 3 - 2 = 1.
  6. The determinant of -5 is nonzero, so the system has one solution: (3, 2).

Reference table

What the determinant says about the system
DeterminantSystem typeWhat the lines do
Not zeroOne solutionCross at exactly one point (x, y)
ZeroNo solutionParallel lines that never meet
ZeroInfinitely many solutionsThe same line written twice

Limits

  • Handles exactly two equations in two variables; larger systems need elimination or matrix methods.
  • Coefficients are limited to magnitudes under one million.
  • Uses floating point arithmetic, so near-parallel lines can show tiny rounding noise.
  • Only linear equations; no squares, roots, or products of x and y.

Common mistakes

  • Forgetting to move the constant to the right side before reading off the numbers.
  • Sign errors when an equation is written as x - y = 1: b1 is 1 and b2 is -1 in the default.
  • Judging a zero determinant by the coefficients alone instead of checking the constants ratio.
  • Rounding x and y into the check step and declaring a mismatch from the rounding itself.
  • Assuming one solution when both rows list the same equation in different scaling, such as x + y = 3 and 2x + 2y = 6.

Try it yourself

Quick checks. Answers sit tucked under each question.

Solve 3x + 2y = 16 and x + y = 7.

x = 2 and y = 5, with a determinant of 1.

What happens with x + y = 3 and 2x + 2y = 7?

No solution: the determinant is 0 and the rows contradict each other.

What about x + y = 3 and 2x + 2y = 6?

Infinitely many solutions: the second equation is the first one doubled, the same line twice.

Questions

What is Cramer's rule?

A determinant based shortcut: build the main determinant from the coefficients, swap the constants into each column in turn, and divide.

What does the determinant tell me?

A nonzero determinant means one crossing point. Zero means the lines are parallel or identical, so the system has no solution or infinitely many.

How do I enter an equation like y = 2x + 5?

Rearrange to standard form first: 2x - y = -5. Then the coefficients read 2, -1, and -5.

Can the coefficients be decimals?

Yes. Decimals and negative numbers work the same way, and the answer carries up to four decimal places.

Why did my answer change when I doubled one equation?

Doubling an equation does not change its line, so the solution set stays the same; the determinant doubles because it scales with the coefficients.

Does this handle three variables?

No. Three-variable systems need the 3x3 version of Cramer's rule or elimination, which this page does not cover.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.