Cramer's Rule Calculator: Solve Any 2×2 Linear System
Solve ax+by=e, cx+dy=f instantly with Cramer's Rule. Enter the 6 coefficients and get x, y, and the determinant — plus a step-by-step explanation.
See step-by-step calculation
When to use this calculator
- Finding the exact intersection point of two straight lines in coordinate geometry (e.g., supply and demand curves in economics)
- Solving electrical circuit equations from Kirchhoff's Voltage Law where two loop currents are unknown
- Computing 2D affine transformation coefficients (scale/shear) when two control-point pairs are given
- Determining break-even quantities for two competing products with shared resource constraints in operations research
Cramer's Rule answer key — solved 2×2 systems with their determinants
Plug these coefficients into the calculator to verify it, or check your hand-worked solution against a known-correct result. Every D, x and y below is exact.
| System | a | b | c | d | e | f | D = ad − bc | x | y |
|---|---|---|---|---|---|---|---|---|---|
| x + y = 5 ; 2x + 3y = 13 | 1 | 1 | 2 | 3 | 5 | 13 | 1 | 2 | 3 |
| 2x + 3y = 12 ; 4x − y = 10 | 2 | 3 | 4 | -1 | 12 | 10 | -14 | 3 | 2 |
| 5x + 2y = 16 ; 3x + 7y = 27 | 5 | 2 | 3 | 7 | 16 | 27 | 29 | 2 | 3 |
| x − 4y = −9 ; 6x + y = 4 | 1 | -4 | 6 | 1 | -9 | 4 | 25 | 0.28 | 2.32 |
| 4I₁ − 2I₂ = 12 ; −2I₁ + 6I₂ = 0 | 4 | -2 | -2 | 6 | 12 | 0 | 20 | 3.6 | 1.2 |
| x + y = 3 ; 2x + 2y = 8 | 1 | 1 | 2 | 2 | 3 | 8 | 0 | — | no solution (parallel) |
| x + y = 3 ; 2x + 2y = 6 | 1 | 1 | 2 | 2 | 3 | 6 | 0 | — | ∞ solutions (same line) |
Solutions computed as x = (ed − bf)/D and y = (af − ec)/D with D = ad − bc. When D = 0 the system is degenerate: if Dₓ or D_y is non-zero the lines are parallel (no solution); if both are zero the lines coincide (infinitely many solutions). The Kirchhoff row (I₁, I₂) shows two mesh currents in amps from a resistor network.
How it works
How Cramer's Rule Works
Given the 2×2 linear system:
a·x + b·y = e
c·x + d·y = fStep 1 — Compute the coefficient determinant (D):
D = |a b| = a·d − b·c
|c d|Step 2 — Compute Dₓ (replace the x-column with the constants):
Dₓ = |e b| = e·d − b·f
|f d|Step 3 — Compute D_y (replace the y-column with the constants):
D_y = |a e| = a·f − e·c
|c f|Step 4 — Apply Cramer's Rule:
x = Dₓ / D = (e·d − b·f) / (a·d − b·c)
y = D_y / D = (a·f − e·c) / (a·d − b·c)If D = 0 and Dₓ ≠ 0 or D_y ≠ 0 → inconsistent (parallel lines, no solution).
If D = 0 and Dₓ = 0 and D_y = 0 → dependent (same line, infinitely many solutions).
---
Quick Reference Table — Common Systems
| System | a | b | c | d | e | f | D | x | y |
|---|---|---|---|---|---|---|---|---|---|
| x+y=5, 2x+3y=13 | 1 | 1 | 2 | 3 | 5 | 13 | 1 | 2 | 3 |
| 3x−y=4, x+2y=13 | 3 | −1 | 1 | 2 | 4 | 13 | 7 | 3 | 5 |
| 4I₁−2I₂=12, −2I₁+6I₂=0 | 4 | −2 | −2 | 6 | 12 | 0 | 20 | 3.6 | 1.2 |
| 0.5x+1.5y=4, 2x−y=1 | 0.5 | 1.5 | 2 | −1 | 4 | 1 | −3.5 | ≈1.571 | ≈2.143 |
| x+y=3, 2x+2y=8 | 1 | 1 | 2 | 2 | 3 | 8 | 0 | — | — (no solution) |
| x+y=3, 2x+2y=6 | 1 | 1 | 2 | 2 | 3 | 6 | 0 | — | — (∞ solutions) |
---
Determinant Interpretation
| D value | Dₓ / D_y | Geometric meaning | Solution type |
|---|---|---|---|
| D ≠ 0 | Any | Lines intersect at exactly one point | Unique solution |
| D = 0 | Dₓ = 0, D_y = 0 | Lines are identical (coincident) | Infinite solutions |
| D = 0 | Dₓ ≠ 0 or D_y ≠ 0 | Lines are parallel (never meet) | No solution |
---
Detailed Worked Examples
Example 1 — Classic textbook system
System: x + y = 5 and 2x + 3y = 13
Example 2 — Kirchhoff circuit loop equations
System: 4I₁ − 2I₂ = 12 and −2I₁ + 6I₂ = 0
Example 3 — No solution (parallel lines)
System: 2x + 4y = 6 and x + 2y = 5
---
Common Mistakes
1. Swapping rows vs. columns when forming Dₓ and D_y. The constants (e, f) replace the column of the target variable, not a row.
2. Sign errors. Remember: D = ad − bc, NOT ad + bc. A single missed minus sign flips the entire solution.
3. Dividing by zero without checking D first. Always verify D ≠ 0 before computing x and y.
4. Assuming D = 0 always means no solution. Check Dₓ and D_y to distinguish inconsistent from dependent systems.
5. Not rewriting in standard form. If the system is written as y + 2x = 7, rewrite it as 2x + y = 7 before extracting coefficients.
---
Related Calculators
Worked Example
Frequently asked questions
What is Cramer's Rule and how do you apply it to a 2×2 system?
What is the formula for solving a 2×2 system with Cramer's Rule?
When does a 2×2 system have no solution vs. infinitely many solutions?
How do I verify the solution x, y is correct?
Can Cramer's Rule handle decimal or fractional coefficients?
Is Cramer's Rule the most efficient method for 2×2 systems?
What does the determinant D represent geometrically?
How do I enter a system where a variable has an implied coefficient of 1 or is missing?
Why does the calculator show determinant 0 for x+y=3, 2x+2y=6?
Sources & references
Methodology & trust
Calculadora de matemática revisada por el equipo editorial de Hacé Cuentas, contrastada con Wikipedia — Cramer's Rule, según nuestra política editorial y metodología.
Última revisión: June 22, 2026. Los parámetros se verifican periódicamente con las fuentes citadas.
Calculations run 100% in your browser. We do not store or transmit your data.
Indicative results. For critical decisions, consult a professional.
Rodríguez, M. (2026). Cramer's Rule Calculator: Solve Any 2×2 Linear System. Hacé Cuentas. https://hacecuentas.com/2x2-linear-system-cramer-rule
Contenido bajo licencia CC-BY 4.0 — reutilizable citando la fuente con enlace a Hacé Cuentas.