2x2 Cramers Rule Calculator
Enter the coefficients of two linear equations to solve for x and y.
Result
How it is calculated
The system is written as a1·x + b1·y = c1 and a2·x + b2·y = c2. All six numbers are required and can be positive, negative or decimal.
D = a1·b2 − a2·b1x = (c1·b2 − c2·b1) ÷ Dy = (a1·c2 − a2·c1) ÷ D
The numerators are the determinants Dx and Dy, formed by replacing the x column or the y column with the constants. If D is exactly 0 the two lines are parallel or identical, and the tool gives no result at all; it does not say whether there is no solution or infinitely many. Answers are rounded to two decimals, so a very small x or y such as 0.001 appears as 0.00. The determinant is shown as well, so you can see how close to singular the system is.
Worked example
Solve 3x + 2y = 12 and x − y = 1, so a1 = 3, b1 = 2, c1 = 12, a2 = 1, b2 = −1, c2 = 1. Determinant: D = 3 × (−1) − 1 × 2 = −5. For x: (12 × (−1) − 1 × 2) ÷ (−5) = −14 ÷ −5 = 2.80. For y: (3 × 1 − 1 × 12) ÷ (−5) = −9 ÷ −5 = 1.80. Check in the first equation: 3 × 2.8 + 2 × 1.8 = 8.4 + 3.6 = 12.
Common mistakes
- Typing the equations in a different form without rearranging. Each must be
ax + by = c; for 2x = 8 − 3y enter a = 2, b = 3, c = 8. - Leaving out a coefficient that equals 1 or 0. Both the x and y coefficient fields are required: write 1 for "x" and 0 for a missing term.
- Dropping a minus sign. For x − y = 1, b2 must be −1; entering 1 gives a different system.
- Moving a constant to the wrong side. The constants c1 and c2 are the right-hand sides, and a term moved across the equals sign changes sign.
- Reading a blank result as an error. When D = 0 (for example 2x + 4y = 6 and x + 2y = 3) there is no unique solution, so nothing is shown.
About this calculator
Cramer's rule, named after the Swiss mathematician Gabriel Cramer, solves a system of linear equations using determinants instead of substitution or elimination. For a 2×2 system (two equations, two unknowns x and y), you first compute the determinant D of the coefficient matrix, then form two more matrices by replacing one column at a time with the constants from the right-hand side of the equations, giving determinants Dx and Dy; the solution is simply x = Dx/D and y = Dy/D, provided D is not zero.
Cramer's rule is taught widely in algebra and linear algebra courses as a clean, formulaic alternative to elimination, and it's used in engineering, physics and economics whenever a small system of linear equations, such as balancing forces, currents in a circuit, or supply-and-demand equations, needs a quick, direct solution without row-reducing a matrix by hand.
Enter the coefficients of your two linear equations and this calculator finds x, y and the determinant using Cramer's rule.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)