Writing a Line as Ax + By = C

Both intercepts fall straight out.

The same line, rearranged

The line y = 6 − 2x can be written another way. Add 2x to both sides: 2x + y = 6. Now both letter terms are on the left and the number is on the right.

An equation written as Ax + By = C, where A, B and C are numbers, is in standard form. Here A = 2, B = 1 and C = 6.

Rearranging does not change which points satisfy the equation, so it is still the same line. For example, (1, 4) satisfies y = 6 − 2x, because 6 − 2 × 1 = 4, and it satisfies 2x + y = 6, because 2 × 1 + 4 = 6.

Both intercepts at once

Standard form makes the two points where the line meets the axes easy to find. These points are called the intercepts: the x-intercept is on the x-axis and the y-intercept is on the y-axis.

Every point on the y-axis has x = 0. Put x = 0 into 2x + y = 6: the 2x term becomes 0 and y = 6. So the line meets the y-axis at (0, 6).

Every point on the x-axis has y = 0. Put y = 0 into 2x + y = 6: 2x = 6, so x = 3. The line meets the x-axis at (3, 0).

Two points are enough to draw a straight line. Plot (0, 6) and (3, 0), and draw the line through them.

xy(0, 6)(3, 0)

The line 2x + y = 6 meets the y-axis at (0, 6), where x = 0, and the x-axis at (3, 0), where y = 0.

Share the number out by the coefficient

Take 3x + 4y = 12. Put x = 0: 4y = 12, so y = 12 / 4 = 3, and the line meets the y-axis at (0, 3). Put y = 0: 3x = 12, so x = 12 / 3 = 4, and the line meets the x-axis at (4, 0).

Each time, the number on the right is divided by the coefficient of the letter that is left, the number multiplying it. The line does not cross the axes at 12.

xy(0, 3)(4, 0)

The line 3x + 4y = 12 meets the y-axis at (0, 3) and the x-axis at (4, 0).

Back to y = mx + c

To find the gradient, rearrange the equation into y = mx + c. Undo the moves: first get the y term alone, then divide both sides by its coefficient.

Take 4x + 2y = 10. Subtract 4x from both sides: 2y = 10 − 4x. Divide both sides by 2, and divide every term: y = 5 − 2x. The gradient is −2 and the y-intercept is 5.

The same steps turn 3x + 4y = 12 into 4y = 12 − 3x, and then y = 3 − 3x/4. Its gradient is −3/4: the line falls 3 for every 4 across, as it does from (0, 3) to (4, 0).

A line that y = mx + c cannot write

The vertical line through (4, 0) is the set of points with x = 4. Its equation is x = 4, which is standard form with A = 1, B = 0 and C = 4. It cannot be written as y = mx + c: it never crosses the y-axis, and moving along it gives a run of 0, so its gradient would mean dividing by 0 and has no value.

The usual mistakes

Mixing up the two intercepts. Setting y = 0 gives the point on the x-axis, and setting x = 0 gives the point on the y-axis.

Stopping at C. In 3x + 4y = 12, the 12 is shared out by the coefficient: the intercepts are 4 and 3.

Changing more than the term that moved. y = 7 − 3x becomes 3x + y = 7 when 3x is added to both sides. Only the x term moves, so y keeps its plus sign and the 3 stays with x: 3x − y = 7 and x + 3y = 7 are different lines.

Dividing only part of the equation. In 2y = 10 − 4x, both 10 and 4x are divided by 2.

Worked example: A Fixed Budget Spent on Two Kinds of Food

Question A club committee has exactly $120 to spend on food for a party. A pizza costs $8 and a salad costs $6. The committee buys x pizzas and y salads and spends all of the money. (a) Write an equation connecting x and y, find where its graph meets each axis, and say what these two points mean. (b) The committee decides to buy 9 pizzas. How many salads can it buy?

  1. 1.x pizzas cost 8x dollars and y salads cost 6y dollars. All of the money is spent, so 8x + 6y = 120.

    051015202505101520pizzas, xsalads, yx pizzas cost 8x dollars, y salads cost 6y dollars8x + 6y = 120
    051015202505101520pizzas, xsalads, yx pizzas cost 8x dollars, y salads cost 6y dollars8x + 6y = 120
    x pizzas cost 8x dollars and y salads cost 6y dollars. Spending all of the money gives 8x + 6y = 120.
  2. 2.Put x = 0 to find where the line meets the y-axis: 6y = 120, so y = 20. Put y = 0 to find where it meets the x-axis: 8x = 120, so x = 15.

    051015202505101520pizzas, xsalads, y(0, 20)(15, 0)x = 0: 6y = 120, so y = 20y = 0: 8x = 120, so x = 15
    051015202505101520pizzas, xsalads, y(0, 20)(15, 0)x = 0: 6y = 120, so y = 20y = 0: 8x = 120, so x = 15
    Put x = 0 to find where the line meets the y-axis, y = 20. Put y = 0 to find where it meets the x-axis, x = 15.
  3. 3.(a) The equation is 8x + 6y = 120, and its graph joins (0, 20) and (15, 0). The point (0, 20) means 20 salads and no pizzas. The point (15, 0) means 15 pizzas and no salads.

    051015202505101520pizzas, xsalads, y8x + 6y = 120(0, 20)(15, 0)20 salads and no pizzas, or 15 pizzas and no saladsevery point on the line spends exactly $120
    051015202505101520pizzas, xsalads, y8x + 6y = 120(0, 20)(15, 0)20 salads and no pizzas, or 15 pizzas and no saladsevery point on the line spends exactly $120
    (a) The line joins (0, 20) and (15, 0): the money buys 20 salads and no pizzas, or 15 pizzas and no salads.
  4. 4.For 9 pizzas, put x = 9 into the equation: 72 + 6y = 120. Subtract 72 from both sides: 6y = 48, so y = 8.

    051015202505101520pizzas, xsalads, y8x + 6y = 120(0, 20)(15, 0)x = 9: 72 + 6y = 1206y = 48, so y = 8
    051015202505101520pizzas, xsalads, y8x + 6y = 120(0, 20)(15, 0)x = 9: 72 + 6y = 1206y = 48, so y = 8
    Put x = 9 into the equation: 72 + 6y = 120, so 6y = 48 and y = 8.
  5. 5.(b) The committee can buy 8 salads. Check: 8 × 9 + 6 × 8 = 72 + 48 = 120, so the point (9, 8) is on the line.

    051015202505101520pizzas, xsalads, y8x + 6y = 120(0, 20)(15, 0)(9, 8)9 pizzas leave money for 8 saladscheck: 8 × 9 + 6 × 8 = 72 + 48 = 120
    051015202505101520pizzas, xsalads, y8x + 6y = 120(0, 20)(15, 0)(9, 8)9 pizzas leave money for 8 saladscheck: 8 × 9 + 6 × 8 = 72 + 48 = 120
    (b) With 9 pizzas the committee can buy 8 salads. The point (9, 8) is on the line.

Answer: (a) 8x + 6y = 120, which meets the axes at (15, 0) and (0, 20): 15 pizzas and no salads, or 20 salads and no pizzas; (b) 8 salads

Common mistakes

  • Writing x + y = 120. That equation counts items, not dollars. Each term must be a number of items multiplied by its price, so that both sides are amounts of money.
  • Reading the intercepts the wrong way round, as 15 salads or 20 pizzas. At (15, 0) it is y, the number of salads, that is zero, so the 15 is a number of pizzas.

More graphs of equations problems, worked step by step →

Practice Writing a Line as Ax + By = C in the app