System of Equations (2×2)
This solver handles a system of two linear equations, a₁x + b₁y = c₁ and a₂x + b₂y = c₂. It computes the coefficient determinant D, then x and y from the ratios Dₓ/D and Dᵧ/D. When D = 0 the lines are parallel or identical and no unique solution exists.
A closed form rather than a procedure
Two linear equations in two unknowns describe two lines, and solving the system means finding where they cross. Usually there is exactly one crossing point. Occasionally the lines are parallel and never meet, or identical and meet everywhere.
This solver uses Cramer's rule, which reaches the answer through determinants rather than by elimination or substitution. It computes three of them and divides.
Elimination and substitution are algorithms: a sequence of steps whose length depends on the numbers. Cramer's rule is a formula — each unknown is a ratio of two determinants, computed directly with no intermediate rearrangement and no choice about which variable to eliminate first.
That makes it well suited to a system of fixed size entered as coefficients. It also makes one determinant do double duty: the same value that appears in every denominator is what decides whether a unique solution exists at all.
How to use this calculator
- Rearrange both equations into standard form Each as a coefficient on x, a coefficient on y, and a constant on the right. Terms on the wrong side must be moved before the coefficients are read off.
- Enter the six coefficients Three per equation, in the order they appear. A missing variable is a coefficient of zero, not a blank.
- Read the determinant first It is computed before anything else and decides whether a unique solution exists. A zero value ends the calculation with an explanation.
- Read the two ratios Each unknown is its own determinant divided by the coefficient determinant, and both divisions are shown.
The formula, and where it comes from
D = a₁b₂ − a₂b₁ Dₓ = c₁b₂ − c₂b₁ Dᵧ = a₁c₂ − a₂c₁ x = Dₓ/D, y = Dᵧ/D
The coefficient determinant is built from the four coefficients of the unknowns, ignoring the constants entirely. It measures whether the two equations point in genuinely different directions — and if they do not, no single crossing point exists.
Each unknown's determinant is the coefficient determinant with that unknown's column replaced by the constants. The pattern is worth seeing rather than memorising: to solve for x, substitute the right-hand side into x's position and take the determinant of what results.
Dividing gives the answer directly, with no back-substitution. That is the appeal of the method at this size — the two unknowns are found independently of each other, so an error in one does not propagate into the other.
A zero determinant makes both divisions impossible. Geometrically the two lines are parallel or identical, so there is either no crossing point or infinitely many, and the solver reports that rather than attempting to distinguish the two cases.
What each input means
- a₁, b₁, c₁ First equation — form field “a₁ (eq 1, x)”
- The coefficients of x and y and the constant on the right. A variable absent from the equation has coefficient zero.
- a₂, b₂, c₂ Second equation — form field “a₂ (eq 2, x)”
- The same three values for the second equation.
- D Coefficient determinant
- Built from the four coefficients of the unknowns. Non-zero exactly when a unique solution exists.
Worked examples
Every number below is produced by the same calculation engine the tool above runs. Nothing here is typed by hand, so the walkthrough cannot drift from what you get when you enter the same values yourself.
A system with a unique solution
Two equations whose coefficient determinant is non-zero, so the lines cross at exactly one point.
Inputs a₁ (eq 1, x) = 2, b₁ (eq 1, y) = 1, c₁ (eq 1, =) = 5, a₂ (eq 2, x) = 1, b₂ (eq 2, y) = -1, c₂ (eq 2, =) = 1
- Equation 1 2x + 1y = 5
- Equation 2 1x − 1y = 1
- Determinant D = a₁b₂ − a₂b₁ = 2·-1 − 1·1 = -3
- Dₓ c₁b₂ − c₂b₁ = -6
- Dᵧ a₁c₂ − a₂c₁ = -3
- x Dₓ / D = -6 / -3 = 2
- y Dᵧ / D = -3 / -3 = 1
Result x = 2, y = 1
The coefficient determinant comes out non-zero, so the two lines have genuinely different gradients and meet once. Both unknowns then follow from their own ratios.
Substituting the answer back into both original equations is the check worth running. Cramer's rule computes the two unknowns independently, so a single substitution would not catch an error in the other.
A system with a missing variable
One equation contains no y term at all, so its coefficient is zero rather than absent.
Inputs a₁ (eq 1, x) = 3, b₁ (eq 1, y) = 0, c₁ (eq 1, =) = 9, a₂ (eq 2, x) = 1, b₂ (eq 2, y) = 2, c₂ (eq 2, =) = 7
- Equation 1 3x + 0y = 9
- Equation 2 1x + 2y = 7
- Determinant D = a₁b₂ − a₂b₁ = 3·2 − 1·0 = 6
- Dₓ c₁b₂ − c₂b₁ = 18
- Dᵧ a₁c₂ − a₂c₁ = 12
- x Dₓ / D = 18 / 6 = 3
- y Dᵧ / D = 12 / 6 = 2
Result x = 3, y = 2
The zero coefficient is a value the determinant needs, not a gap. It makes the first equation fix x on its own, and the second then determines y — but Cramer's rule reaches both without noticing that shortcut.
The determinant is non-zero despite that zero entry. Zeros among the coefficients say nothing about whether a unique solution exists; only the determinant does.
Reading the result
The determinant is the whole test
Non-zero means one crossing point; zero means the two lines are parallel or coincident. Nothing else about the coefficients affects which case applies, and the constants play no part in it.
What a zero determinant does not tell you
Whether there are no solutions or infinitely many. Distinguishing them means comparing the constants against the same proportion as the coefficients, which this method does not do — the general linear-system solver classifies both cases explicitly.
A near-zero determinant is worth noticing
It means the two lines are nearly parallel, so the crossing point is highly sensitive to small changes in the coefficients. The answer is arithmetically correct and may be unreliable as a model.
When you would use this
Two constraints in two quantities
A mixture meeting a total and a proportion, or two costs balancing, reduce to exactly this shape. Rearranging both into standard form is usually the harder half of the work.
Finding where two lines meet
Given two lines as equations, their intersection is the solution of the system. This is the algebraic counterpart of reading a crossing point off a graph.
Assumptions and limitations
What this calculator assumes
- Both equations are linear in x and y and are entered in standard form.
- The coefficients are finite real numbers; an absent variable has coefficient zero.
- A unique solution exists exactly when the coefficient determinant is non-zero.
- The two unknowns are computed independently, each as a ratio of determinants.
Where it stops being the right tool
- Exactly two equations in two unknowns; the 3×3 solver handles the next size up.
- A zero determinant ends the calculation without distinguishing no solution from infinitely many.
- Coefficients are entered rather than parsed, so equations must be rearranged by hand first.
- No parametric description is produced for a dependent system.
Common mistakes
Reading coefficients from an unrearranged equation
Why it happens. An equation with terms on both sides still has recognisable coefficients, so they get entered as they appear rather than after collection.
How to avoid it. Move every variable term to the left and every constant to the right first. The echoed equations show what was actually solved.
Leaving a missing variable blank
Why it happens. An equation containing only x looks as though the y field has nothing to put in it.
How to avoid it. Enter zero. An absent variable has a coefficient of zero, which is a value the determinant needs rather than an absence.
Replacing the wrong column
Why it happens. The two replaced determinants look similar, and which column takes the constants has to be tracked deliberately when working by hand.
How to avoid it. The unknown being solved for is the column replaced. Swapping them exchanges the two answers, which substitution into the original equations exposes at once.
Frequently asked questions
What method is used?
Cramer's rule. Each unknown is the coefficient determinant with that unknown's column replaced by the constants, divided by the coefficient determinant itself. It is a closed form rather than a step-by-step elimination.
What does a zero determinant mean?
That the two lines are parallel or identical, so there is no single crossing point. Either no solution exists or infinitely many do, and the division that Cramer's rule requires is impossible in both cases.
How do I enter my equations?
Rearrange each into the form with the x term, the y term and a constant, then enter the six coefficients in that order. A variable missing from an equation has a coefficient of zero.
Which case does a zero determinant indicate?
It does not say. Distinguishing an inconsistent system from a dependent one requires comparing the constants, which this method skips. The general linear-system solver reports which case applies and gives a parametric form when there are infinitely many solutions.