← Back to all lessons
Class 10Algebra10:28Published 4 Feb 2025

Solving Linear Equations in Two Variables (Elimination Method)

Three worked examples that solve pairs of linear equations in two variables using the elimination method, including equations with literal coefficients.

This Class 10 lesson works through three pairs of simultaneous linear equations whose coefficients are letters rather than numbers. Each example is solved by elimination: scaling the two equations so one variable cancels, then adding or subtracting them to find the first unknown and back-substituting for the second. A key rule is highlighted, namely whether to add or subtract depending on the signs of the matching terms.

What you'll learn

  • How to eliminate a variable by scaling each equation by the right coefficient
  • When to add the equations and when to subtract, based on the signs of the matching terms
  • How to solve simultaneous equations whose coefficients are letters instead of numbers
  • How to back-substitute to find the second unknown and state the full solution

Lesson chapters

0:00Setting up elimination and the sign rule
0:15Example 1: equations in p and q
2:53Example 2: equations in a, b and c
8:29Example 3: equations in a and b

Lesson notes

This lesson solves three pairs of linear equations in two variables using the elimination method. In each case the coefficients are letters, so we scale the equations to cancel one variable, then add or subtract depending on the signs of the matching terms.

The elimination idea

To eliminate a variable, multiply each equation by the coefficient that variable has in the other equation, so the two terms match. Then:

  • if the matching terms have opposite signs, add the equations,
  • if they have the same sign, subtract them.

Example 1: equations in pp and qq

We are given

px+qy=pq(1)px + qy = p - q \quad (1) qxpy=p+q(2)qx - py = p + q \quad (2)

To eliminate yy, multiply (1)(1) by pp and (2)(2) by qq:

p2x+pqy=p(pq)(3)p^2 x + pq\,y = p(p - q) \quad (3) q2xpqy=q(p+q)(4)q^2 x - pq\,y = q(p + q) \quad (4)

The yy terms have opposite signs, so add (3)(3) and (4)(4):

(p2+q2)x=p(pq)+q(p+q)=p2pq+pq+q2=p2+q2.(p^2 + q^2)\,x = p(p - q) + q(p + q) = p^2 - pq + pq + q^2 = p^2 + q^2.

Therefore

x=p2+q2p2+q2=1.x = \frac{p^2 + q^2}{p^2 + q^2} = 1.

Put x=1x = 1 into (1)(1):   p+qy=pq\;p + qy = p - q, so qy=qqy = -q and

y=1.y = -1.

The solution is x=1, y=1x = 1,\ y = -1.

Example 2: equations in aa, bb and cc

We are given

ax+by=c(1)ax + by = c \quad (1) bx+ay=1+c(2)bx + ay = 1 + c \quad (2)

To eliminate xx, multiply (1)(1) by bb and (2)(2) by aa:

abx+b2y=bc(3)ab\,x + b^2 y = bc \quad (3) abx+a2y=a(1+c)(4)ab\,x + a^2 y = a(1 + c) \quad (4)

The xx terms have the same sign, so subtract (4)(4) from (3)(3):

(b2a2)y=bca(1+c)=bcaac.(b^2 - a^2)\,y = bc - a(1 + c) = bc - a - ac.

Writing the right side as c(ab)+ac(a - b) + a over the rearranged denominator gives

y=c(ab)+aa2b2.y = \frac{c(a - b) + a}{a^2 - b^2}.

To find xx, substitute this yy back into (1)(1) and simplify. Bringing byby across and taking the common denominator a2b2a^2 - b^2 leaves

x=c(ab)ba2b2.x = \frac{c(a - b) - b}{a^2 - b^2}.

Check. Substituting both into ax+byax + by gives c(ab)(a+b)a2b2=c\dfrac{c(a-b)(a+b)}{a^2-b^2} = c, as required.

Example 3: equations in aa and bb

We are given

xayb=0(1)\frac{x}{a} - \frac{y}{b} = 0 \quad (1) ax+by=a2+b2(2)ax + by = a^2 + b^2 \quad (2)

Clearing the fractions in (1)(1) gives bxay=0bx - ay = 0, call it (3)(3). To eliminate yy, multiply (3)(3) by bb and (2)(2) by aa:

b2xaby=0(4)b^2 x - ab\,y = 0 \quad (4) a2x+aby=a(a2+b2)(5)a^2 x + ab\,y = a(a^2 + b^2) \quad (5)

Add (4)(4) and (5)(5):

(a2+b2)x=a(a2+b2),x=a.(a^2 + b^2)\,x = a(a^2 + b^2), \qquad x = a.

Put x=ax = a into (3)(3):   baay=0\;ba - ay = 0, so ay=abay = ab and

y=b.y = b.

The solution is x=a, y=bx = a,\ y = b.

Key takeaways

  • To eliminate a variable, scale each equation by that variable's coefficient in the other equation so the terms match.
  • Add the equations when the matching terms have opposite signs; subtract when they share the same sign.
  • After finding one unknown, back-substitute into an original equation to find the other.