All Solvers/System of Equations Solver
Cramer's Rule, Live

System of Equations Solver Linear, 2 Variables

Solve any 2×2 system of linear equations using Cramer's rule. Get x, y, and the determinant with each step shown clearly.

Linear system

a₁x + b₁y = c₁

a₂x + b₂y = c₂

For complex problems, use the photo solver.

Two equations, two unknowns

Cramer's Rule (2×2)

x = (c₁b₂ − c₂b₁)/D,   y = (a₁c₂ − a₂c₁)/D

D = a₁b₂ − a₂b₁ is the determinant of the coefficient matrix. The system has a unique solution exactly when D ≠ 0.

A system of two linear equations in two variables has the form a₁x + b₁y = c₁, a₂x + b₂y = c₂. Three classical methods solve it: substitution, elimination, and Cramer's rule. The calculator uses Cramer's rule because it gives the result in one direct formula.

Each equation is a line in the plane. Solutions correspond to intersection points: one solution = lines cross at a single point, no solution = parallel lines, infinitely many = the same line written two ways.

Worked Examples

Five linear systems, all degeneracies covered

Unique solutions, no solution (parallel lines), infinitely many solutions, and decimal coefficients.

Example 1, Two-variable linear system

{ 2x + 3y = 12, x − y = 1 }

x = 3, y = 2
  1. 1

    Determinant

    det = (2)(−1) − (1)(3) = −5
  2. 2

    x via Cramer

    x = (12·(−1) − 1·3) / −5 = −15/−5 = 3
  3. 3

    y via Cramer

    y = (2·1 − 1·12) / −5 = −10/−5 = 2
  4. 4

    Verify

    Plug back: 2(3)+3(2)=12 ✓, 3−2=1 ✓

Standard textbook problem solvable by substitution or Cramer's rule.

Example 2, System with negative solutions

{ x + 2y = 5, 3x − y = 1 }

x = 1, y = 2
  1. 1

    Determinant

    det = (1)(−1) − (3)(2) = −7
  2. 2

    x

    x = (5·(−1) − 1·2) / −7 = −7/−7 = 1
  3. 3

    y

    y = (1·1 − 3·5) / −7 = −14/−7 = 2

Substitution: from eq1, x = 5 − 2y; substitute into eq2.

Example 3, No solution (parallel lines)

{ 2x + 4y = 6, x + 2y = 5 }

No solution
  1. 1

    Determinant

    det = (2)(2) − (1)(4) = 0
  2. 2

    Check consistency

    Eq1 says 2(x + 2y) = 6 → x + 2y = 3, but Eq2 says x + 2y = 5
  3. 3

    Contradiction

    Lines are parallel and distinct, no solution

Determinant is zero AND right-hand sides don't satisfy the ratio.

Example 4, Infinite solutions (same line)

{ 2x + 4y = 8, x + 2y = 4 }

Infinite solutions
  1. 1

    Determinant

    det = (2)(2) − (1)(4) = 0
  2. 2

    Check ratio

    Eq1 / 2 = Eq2 exactly
  3. 3

    Conclusion

    Same line, infinitely many solutions, all points on x + 2y = 4

Determinant is zero AND right-hand sides are proportional.

Example 5, Decimal coefficients

{ 0.5x + y = 4, 2x − y = 1 }

x = 2, y = 3
  1. 1

    Determinant

    det = (0.5)(−1) − (2)(1) = −0.5 − 2 = −2.5
  2. 2

    x via Cramer

    x = (4·(−1) − 1·1) / −2.5 = −5/−2.5 = 2
  3. 3

    y via Cramer

    y = (0.5·1 − 2·4) / −2.5 = −7.5/−2.5 = 3
  4. 4

    Verify

    0.5(2) + 3 = 4 ✓; 2(2) − 3 = 1 ✓

Decimal coefficients work the same way as integers.

Linear system solver, free with step-by-step solutions

Two-variable linear systems are the building block of more advanced linear algebra. This solver handles any 2×2 system: integer, fractional, or decimal coefficients, positive or negative, with a unique solution or one of the degenerate cases. Each solve shows the determinant, applies Cramer's rule, and gives a quick verification.

Cramer's rule explained

For a system [a₁x + b₁y = c₁; a₂x + b₂y = c₂], Cramer's rule gives x = (c₁b₂ − c₂b₁) / det and y = (a₁c₂ − a₂c₁) / det, where det = a₁b₂ − a₂b₁. It's a direct formula that works whenever the determinant is nonzero. When det = 0, the system has either zero solutions or infinitely many.

Substitution and elimination methods

Substitution: solve one equation for one variable, plug into the other. Elimination: scale equations so a variable cancels when you add or subtract them. Both produce the same answer as Cramer's rule but show different aspects of the structure. Most algebra courses cover all three.

Interpreting no solution vs infinite solutions

When the determinant is zero, the two lines are parallel or identical. If their constant terms aren't proportional to the same ratio as their coefficients, the lines are distinct and parallel: no solution. If everything is proportional, they're the same line drawn twice: infinitely many solutions, all points on that line.

Practical applications

Linear systems appear everywhere: balancing chemical reactions, computing equilibrium prices in economics, fitting lines to data, computer graphics transformations, robotic arm kinematics. Mastering 2×2 systems is the gateway to higher-dimensional systems and matrix methods used throughout science and engineering.

Need help with a more complex problem?

Upload a photo or type your question on our main solver, our AI handles algebra, calculus, geometry, statistics, and word problems.

Larger systems or word problem?

Photo solver handles 3×3 systems, matrix form, and translation from words.

Try Photo Solver