System of Two Linear Equations with Two Unknowns Calculator
Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 9/9/2026
A system of two linear equations with two unknowns (a1x+b1y=c1 and a2x+b2y=c2) is solved with Cramer's rule: x = (c1b2−c2b1)/D and y = (a1c2−a2c1)/D, where D = a1b2−a2b1. For the system 2x+3y=13 and 4x−y=5, the solution is x=2, y=3.
Explanation
Cramer's rule solves a system of two linear equations with two unknowns using determinants, without going through the successive substitutions usually taught in school. The main determinant D = a1b2 − a2b1 — calculated exactly as in our 2×2 matrix determinant calculator, applied here to the coefficient matrix (a1,b1;a2,b2) — plays a central role: it indicates whether the system has a unique solution. The two unknowns are then obtained by replacing, in turn, the corresponding column of the coefficient matrix with the column of right-hand-side values (c1,c2), then dividing the resulting determinant by the main determinant. Geometrically, each equation represents a line in the plane (see our distance between two points calculator for a related two-point calculation), and solving the system amounts to finding the intersection point of these two lines: a nonzero determinant D means the two lines have different slopes and cross at a single point, while a zero determinant means they're parallel — in which case the system has either no solution (distinct parallel lines) or infinitely many solutions (the same line written differently), two cases this calculator doesn't distinguish further and simply flags as not uniquely solvable.
Example: system 2x+3y=13, 4x-y=5
Inputs
Equation 1: 2x + 3y = 13. Equation 2: 4x − y = 5.
Calculation
D = 2×(−1) − 4×3 = −2 − 12 = −14. x = (13×(−1) − 5×3) ÷ (−14) = (−13−15) ÷ (−14) = −28 ÷ (−14) = 2. y = (2×5 − 4×13) ÷ (−14) = (10−52) ÷ (−14) = −42 ÷ (−14) = 3.
Result
The solution to this system is x = 2 and y = 3.
Frequently asked questions
What does a determinant D equal to zero mean?
It means the system has no unique solution: the two lines represented by the equations are parallel. If they are strictly parallel and distinct, the system has no solution (the two equations contradict each other). If they are actually the same line written differently, the system has infinitely many solutions (any pair (x,y) on that line works).
Why use Cramer's rule rather than substitution?
Cramer's rule offers a direct formula, with no intermediate step of isolating one variable and then substituting it into the other equation: it's particularly convenient to program or apply quickly once the six coefficients are identified, even though the substitution method often remains more intuitive to understand for a first introduction.
Does this method work for a system with three or more unknowns?
Yes, Cramer's rule generalizes to any number of equations and unknowns, provided you calculate determinants of larger matrices (3×3, 4×4, etc.), which quickly becomes costly by hand. This calculator deliberately limits itself to the two-unknown case, the most common and the only one whose 2×2 determinant is computed in a single subtraction.