System of linear equations calculator
Solves a system of two linear equations in two unknowns by Cramer’s rule.
Fill in the fields and the result will appear here automatically.
Finds the unique pair x, y for a₁x + b₁y = c₁ and a₂x + b₂y = c₂ using Cramer’s rule. If each equation has a nonzero x or y coefficient, this is geometrically the intersection of two lines. An all-zero coefficient row can instead represent an identity or a contradiction. At Δ = 0 there is no unique pair: this calculator stops without classifying no solution versus infinitely many.
How it works
Formula and logic
Δ = a₁b₂ − a₂b₁, Δx = c₁b₂ − c₂b₁, Δy = a₁c₂ − a₂c₁. For Δ ≠ 0, x = Δx/Δ and y = Δy/Δ. At Δ = 0 Cramer’s formulas cannot give a unique pair; another method is needed to classify the system. Zero coefficients are valid and must be entered explicitly rather than left blank.
Example
For 2x + 3y = 13 and 4x − y = 5 the determinant is −14 and the solution is x = 2, y = 3.
Fields and units
- a₁ — coefficient of x in the first equation — unitless
- b₁ — coefficient of y in the first equation — unitless
- c₁ — right-hand side of the first equation — unitless
- a₂ — coefficient of x in the second equation — unitless
- b₂ — coefficient of y in the second equation — unitless
- c₂ — right-hand side of the second equation — unitless
How to use
- — Write both equations in the form ax + by = c.
- — Enter the coefficients of the first equation: a₁, b₁ and c₁.
- — Enter the coefficients of the second equation: a₂, b₂ and c₂.
- — A missing unknown means a coefficient of zero, not an empty field.
Method and limitations
- Calculation method
- Formula and logic
- Data or methodology source
- OpenStax: Cramer’s rule for two equations with nonzero determinant
- Limitation
- Finite coefficients, including negative and decimal values, are accepted. Determinants are calculated from the binary representations of the entered numbers and results are rounded. Small nonzero values use scientific notation. An unrepresentable Δ, x or y gives a range error. A nearly dependent system is sensitive to coefficient uncertainty; more displayed digits do not remove that sensitivity.
FAQ
What does a zero determinant mean?
At Δ = 0 there is no unique pair x, y. There may be no solutions or infinitely many; this model does not distinguish them. Parallel or coincident lines describe only cases where each row actually represents a line. A row 0x + 0y = c can be an identity or a contradiction.
Can coefficients be negative or fractional?
Yes, finite negative and decimal coefficients are valid. A zero determinant is not the only stopping condition: the result must also remain within the number range.
How do I enter an equation with only one unknown?
Put zero as the coefficient of the missing unknown. The equation 3x = 12 becomes a = 3, b = 0, c = 12.
Why Cramer’s rule and not substitution?
For Δ ≠ 0, Cramer’s rule directly gives the unique pair x, y. Substitution or elimination gives the same mathematical result. A zero Δ does not settle existence: another method is needed to distinguish no solutions from infinitely many.