Write both equations as a·x + b·y = c. The determinant D = a₁b₂ − a₂b₁ decides whether there is a unique answer; if it is not zero, x = (c₁b₂ − c₂b₁) ÷ D and y = (a₁c₂ − a₂c₁) ÷ D. For 2x + y = 5 and x − y = 1 that gives x = 2 and y = 1.
The numbers at a glance
Held fixed: Equation 1 — coefficient of x (a₁) 2.0000, Equation 1 — coefficient of y (b₁) 1.0000, Equation 1 — right-hand side (c₁) 5.0000, Equation 2 — coefficient of x (a₂) 1.0000, Equation 2 — coefficient of y (b₂) -1.0000.
x = (c₁b₂ − c₂b₁) ÷ D, y = (a₁c₂ − a₂c₁) ÷ D, D = a₁b₂ − a₂b₁
1StepBring both equations into the form a·x + b·y = c and enter the six coefficients.
2StepCompute the determinant D = a₁·b₂ − a₂·b₁. If it is zero, there is no unique solution.
3StepOtherwise x = (c₁·b₂ − c₂·b₁) ÷ D and y = (a₁·c₂ − a₂·c₁) ÷ D.
4ResultSubstitute both values back into the original equations as a check.
What this number means
Two linear equations in two unknowns describe two straight lines, and solving the system means finding where they cross. Cramer's rule does that with determinants: the denominator is always D = a₁·b₂ − a₂·b₁, formed from the four coefficients on the left-hand sides. Each unknown is then a ratio of two determinants — the numerator is D with that variable's column replaced by the right-hand sides c₁ and c₂. So x = (c₁·b₂ − c₂·b₁) ÷ D and y = (a₁·c₂ − a₂·c₁) ÷ D. The rule works for every system whose determinant is not zero, no matter how awkward the numbers, and it needs no elimination steps. When D is zero the two lines have the same direction. Either they are parallel and never meet, so there is no solution at all, or they are the same line and every point on it is a solution — infinitely many. Cramer's rule cannot separate the two cases and cannot divide by zero, so this page shows no result rather than a number. Coefficients may be negative, decimal or zero; a zero simply means that variable is absent from that equation.
Determinant zero: no unique solution
When a₁·b₂ equals a₂·b₁ the two lines are parallel or identical. There is then either no solution or an infinite number of them, and the page shows no result.
Zero coefficients are fine
A zero simply means that variable does not appear in that equation, as in 0x + 1y = 4. Only a determinant of zero blocks the calculation.
Check by substituting
Put x and y back into both original equations. For x = 2, y = 1 in 2x + y = 5 and x − y = 1 both sides match, so the answer holds.
Commonly misread
A determinant of zero means the system has no solution.
It means there is no UNIQUE solution. Parallel lines have none, identical lines have infinitely many, and the determinant alone does not separate the two.
The right-hand sides belong in the determinant D.
D uses only the four coefficients on the left, a₁b₂ − a₂b₁. The values c₁ and c₂ appear only in the numerators.
The two equations may be entered in any arrangement.
Both must first be in the form a·x + b·y = c, with the unknowns on the left and the constant on the right.
Reference table
Equation 1
Equation 2
D
Solution
2x + y = 5
x − y = 1
−3
x = 2, y = 1
x + y = 3
x − y = 1
−2
x = 2, y = 1
−2x + 3y = 1
4x − y = 2
−10
x = 0.7, y = 0.8
3x + 2y = 7
x − y = 1
−5
x = 1.8, y = 0.8
5x + 7y = 12
3x − 2y = 1
−31
x = 1, y = 1
y = 4
x = 2
−1
x = 2, y = 4
2x + y = 5
4x + 2y = 3
0
no unique solution
Questions
How do I solve a 2×2 system of equations?
Write both equations as a·x + b·y = c, then apply Cramer's rule. Compute D = a₁·b₂ − a₂·b₁, then x = (c₁·b₂ − c₂·b₁) ÷ D and y = (a₁·c₂ − a₂·c₁) ÷ D; for 2x + y = 5 and x − y = 1 that gives x = 2 and y = 1.
What is Cramer's rule?
It is a formula that solves a linear system with determinants. Each unknown is a ratio of two determinants: the denominator is the coefficient determinant D, and the numerator is D with that variable's column replaced by the right-hand sides.
What does a determinant of zero mean?
The two lines are parallel or identical, so there is either no solution or infinitely many. Cramer's rule cannot divide by zero, so this page returns no result in that case.
Can the coefficients be negative or zero?
Yes, all six may be negative, zero or decimal. A zero coefficient simply means that variable is absent from that equation; only a determinant of zero stops the calculation.
What do x and y represent?
They are the unique values that make both equations true at the same time. Geometrically each equation is a straight line, and the pair (x, y) is the single point where the two lines intersect.
How can I check my answer?
Substitute x and y back into both original equations and compare each side. For x = 2 and y = 1: 2·2 + 1 = 5 and 2 − 1 = 1, so both hold.