Skip to content
Helper

Linear Equations in Two Variables

Equations like ax + by + c = 0, their graphs, and how to solve a pair

Class 9 and 10Worked examples Checked 23 Nov

Linear equations in two variables can always be rearranged to ax + by + c = 0 (a or b non-zero), and each one has infinitely many solutions that lie on a straight line. When two such equations are taken together as a pair, they usually meet at exactly one point, and that point (x, y) is the solution of the pair.

This page explains a single equation first, then shows how to solve a pair by substitution, by elimination and by graph, and how to tell in advance whether a pair has one solution, none or infinitely many. Every example is solved in full and checked.

Two crossing threads showing linear equations in two variables meeting at a point
Two straight lines usually meet at one point, the solution of the pair.

At a glance

  • General form

    ax + by + c = 0
  • Graph

    A straight line
  • Solutions of one equation

    Infinitely many
  • Pair: one solution

    a1/a2 ≠ b1/b2
  • Pair: no solution

    Parallel lines
  • Methods

    Substitution, elimination, graph

What linear equations in two variables look like

ax + by + c = 0

Here x and y are the two variables, while a, b and c stand for fixed numbers, and at least one of a and b must be non-zero. The word linear means each variable appears only to the power 1: no x2, no xy, no 1/x. So 2x + 3y = 12, x = 4y and y - 5 = 0 can all be written in this form, but x2 + y = 3 cannot.

A solution is a pair of values (x, y) that makes the equation true. For 2x + 3y = 12, the pair (3, 2) works because 6 + 6 = 12, and so does (0, 4). Choose any x, work out y, and you get another solution. That is why one equation alone has infinitely many solutions.

Each equation is a straight line

Plot the solutions of 2x + y = 6 and they fall on one straight line. To draw it, pick a few values of x and find y.

Solutions of 2x + y = 6
xy = 6 - 2xCheck
062(0) + 6 = 6
142(1) + 4 = 6
222(2) + 2 = 6
302(3) + 0 = 6
xyOQuadrant I(+, +)Quadrant II(-, +)Quadrant III(-, -)Quadrant IV(+, -)P(3, 2)
Coordinate plane with the four quadrants and the point P(3, 2)

Every point on the line is a solution, and every solution is a point on the line. The points (0, 6) and (3, 0) are where the line cuts the y axis and the x axis, and they are the quickest two points to plot. Our coordinate geometry notes cover plotting in more detail.

Two equations together: three possible cases

a1x + b1y + c1 = 0
a2x + b2y + c2 = 0

Two lines on the same graph can do only three things. They can cross once, they can run side by side forever, or one can sit exactly over the other. Which case you have shows up before drawing anything by dividing matching coefficients.

One solution: a1/a2 ≠ b1/b2
No solution: a1/a2 = b1/b2 ≠ c1/c2
Infinitely many: a1/a2 = b1/b2 = c1/c2

A pair with at least one solution is called consistent. Take x + 2y = 3 with 2x + 4y = 7: the x and y ratios are both one half, yet 3 over 7 is not, so the two lines never touch. Now take 2x + 4y = 8 with x + 2y = 4: every ratio comes to 2, which means one line drawn twice. Finally, x + y = 5 with 2x - y = 1 has x ratio one half and y ratio minus one, so the lines cut once, at (2, 3).

Solving by substitution

  1. Make x or y the subject of one equation.
  2. Put that expression into the other equation.
  3. Solve the single variable equation you get.
  4. Use that value in the expression from step 1.
  5. Check in both original equations.

Example 1. Solve 2x + 3y = 12 and x - y = 1.

  1. From the second: x = 1 + y.
  2. Substitute: 2(1 + y) + 3y = 12.
  3. 2 + 5y = 12, so 5y = 10 and y = 2.
  4. x = 1 + 2 = 3.
  5. Check: 2(3) + 3(2) = 12 and 3 - 2 = 1. Answer: x = 3, y = 2.

Solving by elimination

Elimination is quicker when one variable has equal or opposite coefficients, or can be made so by multiplying.

Example 2. Solve 3x + 2y = 16 and 5x - 2y = 16.

  1. The y terms are +2y and -2y. Add the equations.
  2. 8x = 32, so x = 4.
  3. Put x = 4 in the first: 12 + 2y = 16, so y = 2.
  4. Check in the second: 20 - 4 = 16. Answer: (4, 2).

Example 3. Solve x + y = 10 and x - y = 4.

  1. Add: 2x = 14, so x = 7.
  2. Taking the second away from the first leaves 2y = 6, so y = 3.
  3. Check: 7 + 3 = 10 and 7 - 3 = 4.

Word problems that lead to a pair

Name the two unknowns, write one equation for each fact in the question, then solve.

Example 4. At a fruit stall, 3 mangoes and 2 guavas cost ₹110, while 2 mangoes and 3 guavas cost ₹115. What does one of each cost?

  1. Call the mango price m and the guava price g, in rupees.
  2. 3m + 2g = 110 and 2m + 3g = 115.
  3. To match the g terms, triple the first and double the second: 9m + 6g = 330 and 4m + 6g = 230.
  4. Take one from the other: 5m = 100, so m = 20.
  5. Back in the first: 60 + 2g = 110, 2g = 50, g = 25.
  6. Mango ₹20, guava ₹25. Check: 40 + 75 = 115.

Example 5. Two whole numbers add up to 50, and one is 14 more than the other. Find them.

  1. Bigger number x, smaller y: x + y = 50 and x - y = 14.
  2. Adding gives 2x = 64, so x = 32.
  3. Then y = 50 - 32 = 18. The numbers are 32 and 18.

Where this topic sits in school books

In the class 10 book this is Chapter 3, on pairs of such equations, with Exercises 3.1 to 3.3 on forming pairs, the graphical method and the algebraic methods; see our class 10 maths chapter 3 notes. In the earlier class 9 edition, Chapter 4 was Linear Equations in Two Variables, about single equations and their graphs. The new class 9 book has a chapter titled Two Variables, One Line, Chapter 13. Before this, revise linear equations in one variable; for the wider picture see what is algebra.

Mistakes and checks

  • Sign errors when subtracting equations. Subtracting -2y means adding 2y. Write the subtraction in brackets.
  • Multiplying only one side of an equation. Every term on both sides must be multiplied.
  • Stopping after finding one variable. The answer needs both x and y.
  • Not checking. Put the pair into both equations; if one fails, there is a slip.

Practice:

Practice 1. Solve x + 2y = 8 and 3x - y = 3.

Show answer

From the second, y = 3x - 3. Then x + 6x - 6 = 8, so 7x = 14, x = 2 and y = 3.

Practice 2. Solve 5x + 2y = 19 and 3x - 2y = 5.

Show answer

Adding removes y: 8x = 24, x = 3. Then 15 + 2y = 19, so y = 2.

Practice 3. Adult tickets and child tickets: 2 adults and 3 children pay ₹360, and one adult ticket plus one child ticket cost ₹150. Find each price.

Show answer

2a + 3c = 360 and a + c = 150. Double the second: 2a + 2c = 300. Subtract: c = 60, so a = 90. Adult ₹90, child ₹60.

Practice 4. Does the pair 3x - y = 2 and 6x - 2y = 5 have a solution?

Show answer

3/6 = (-1)/(-2) = 1/2 but 2/5 is not 1/2, so the lines are parallel. No solution.

Frequently asked questions

What is a linear equation in two variables?

Any equation you can rearrange into ax + by + c = 0, where a and b are not both 0, is one. Both variables have power 1, and its graph is a straight line.

How many solutions does a linear equation in two variables have?

Infinitely many. Every point on its line is a solution. Only a pair of such equations can pin down a single solution.

What is a pair of linear equations in two variables?

Two linear equations in the same two variables, considered together. Their common solution is the point where their lines meet, if they meet.

Which method is best for solving a pair?

Use elimination when the coefficients of one variable match or are easy to match. Use substitution when one equation already gives x or y on its own. Both give the same answer.

How do I know if a pair has no solution?

Divide matching coefficients. When the x ratio equals the y ratio but the constant ratio is different, you have two parallel lines that never meet, so no solution exists.

Is y = 3 a linear equation in two variables?

Yes. It can be written as 0x + 1y - 3 = 0. Its graph is a horizontal line through (0, 3).