Algebra
Advanced

System of Two Linear Equations

Cramer-rule solution for two simultaneous equations.

Formula

x=c1b2−c2b1a1b2−a2b1x = \frac{c_1 b_2 - c_2 b_1}{a_1 b_2 - a_2 b_1}

Variables

a,b,cEquation coefficients

Example

Solves a₁x+b₁y=c₁ pair

How it works

This formula gives the value of x when you solve a pair of simultaneous linear equations by elimination or Cramer’s rule. It comes from treating the two equations as a linear system and combining them so that y cancels out; the denominator a₁b₂ − a₂b₁ is the determinant of the coefficient matrix, and it must be nonzero for a unique solution to exist. If that determinant is zero, the lines are either parallel or identical, so this formula cannot produce a single x-value.

When to use it

Use it when you have two linear equations in two unknowns and you want the x-coordinate of their intersection point. It is especially useful in algebra, coordinate geometry, physics, and any situation where two constraints must be satisfied at once.

Worked example, step by step

Solve the system: 2x + 3y = 13 5x - 4y = 2 Here a₁=2, b₁=3, c₁=13, and a₂=5, b₂=-4, c₂=2. Substitute into the formula: x = (c₁b₂ - c₂b₁) / (a₁b₂ - a₂b₁) x = (13·(-4) - 2·3) / (2·(-4) - 5·3) x = (-52 - 6) / (-8 - 15) x = -58 / -23 x = 58/23 So the solution for x is 58/23.

Common mistakes to avoid

  • Mixing up which coefficients belong to equation 1 and equation 2
  • Forgetting the minus signs on negative coefficients when substituting into the formula
  • Using the formula when a₁b₂ - a₂b₁ = 0, where no unique x-value exists

Did You Know?

Simultaneous equations were solved in ancient China using counting rods in a method essentially identical to modern matrices.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026