linear algebra calculators

2x2 System of Linear Equations Solver

Solve a system of two linear equations in two unknowns using Cramer's rule or substitution. Ideal for algebra homework, engineering problems, and quick verification of hand calculations.

About this calculator

A 2×2 linear system has the form a₁x + b₁y = c₁ and a₂x + b₂y = c₂. Cramer's rule solves it using determinants: first compute the coefficient determinant D = a₁b₂ − a₂b₁. Then x = Dₓ/D where Dₓ = c₁b₂ − c₂b₁, and y = D_y/D where D_y = a₁c₂ − a₂c₁. If D = 0, the lines are either parallel (no solution) or identical (infinite solutions). This calculator uses the formula x = (c₁b₂ − c₂b₁) / (a₁b₂ − a₂b₁) to find x, then back-substitutes for y. Cramer's rule is elegant for 2×2 systems and provides a direct, closed-form answer without row reduction.

How to use

Solve the system: 3x + 2y = 12 and x + 4y = 10. Enter a₁=3, b₁=2, c₁=12, a₂=1, b₂=4, c₂=10. Compute D = 3·4 − 1·2 = 12 − 2 = 10. Then Dₓ = 12·4 − 10·2 = 48 − 20 = 28, so x = 28/10 = 2.8. For y, D_y = 3·10 − 1·12 = 30 − 12 = 18, so y = 18/10 = 1.8. Verify: 3(2.8) + 2(1.8) = 8.4 + 3.6 = 12 ✓ and 2.8 + 4(1.8) = 2.8 + 7.2 = 10 ✓.

Frequently asked questions

What is Cramer's rule and when should you use it to solve linear equations?

Cramer's rule is an explicit formula for the solution of a linear system expressed as ratios of determinants. It is most practical for 2×2 and 3×3 systems where computing a few small determinants is straightforward. For larger systems (4×4 and above), Gaussian elimination or LU decomposition is far more computationally efficient because the number of determinant evaluations grows factorially. Cramer's rule is also valuable in theoretical derivations, such as proving that solutions depend continuously on the coefficients when the determinant is non-zero.

How do you know if a 2×2 linear system has no solution or infinitely many solutions?

Both cases arise when the coefficient determinant D = a₁b₂ − a₂b₁ = 0, meaning the two lines are parallel. If D = 0 and the numerators Dₓ and D_y are also zero, the equations are multiples of each other and describe the same line — infinitely many solutions exist. If D = 0 but at least one numerator is non-zero, the lines are distinct and parallel — no solution exists. You can also check geometrically: the lines have the same slope (a₁/b₁ = a₂/b₂) but different intercepts in the no-solution case.

Why is it important to verify the solution after solving a linear system?

Verification catches arithmetic errors that can slip through even careful hand calculations, especially with fractions or negative coefficients. Simply substitute the computed x and y back into both original equations and check that both equalities hold. A mismatch usually means a sign error or a transcription mistake in the coefficients. For applied problems — such as circuit analysis or mixture problems — an incorrect solution can propagate into further calculations, so back-substitution is a critical final step. This calculator performs verification automatically, giving you confidence in the result.