Lantern Tutor Sign in

Maths · 4 Coordinate geometry

4.4 Equations of linear graphs

Before you start

  • Plotting and reading coordinates in all four quadrants (4.1).
  • Finding the gradient of a line from a graph and from the coordinates of two points (4.2).
  • Changing the subject of a formula, for example making y the subject (2.5).
  • Working with negative numbers and fractions without a calculator.
Syllabus objectives covered (1)
  • Interpret and obtain the equation of a straight-line graph.

Part 1 of 8

What the equation of a line says

  1. The equation of a line is a rule that connects x and y. Every point on the line obeys the rule, and no point off the line does.
  2. Take y=2x+1. The point (3,7) is on the line, because 2×3+1=7. The point (3,5) is not on it, because the rule gives 7 when x=3, not 5.
  3. So to test whether a point lies on a line, substitute its x and its y into the equation. If the two sides are equal, the point is on the line. If they are not, it is not.
  4. The test works whatever form the equation is in. For 3x+2y=12, the point (2,3) gives 3×2+2×3=12, so (2,3) is on that line.
  5. In the equation of a straight line, x and y appear only to the power 1 and are never multiplied together. An x2, a 1x or an xy term means the graph is a curve, not a line.

Part 2 of 8

The form y = mx + c

  1. When y is on its own on one side, the equation is in the form y=mx+c, and the two numbers m and c describe the whole line.
    y=mx+c
  2. m, the number that multiplies x, is the gradient. Each time x goes up by 1, y goes up by m.
  3. c, the number on its own, is the **y-intercept**: the line crosses the y-axis at (0,c). The reason is that every point on the y-axis has x=0, and putting x=0 into y=mx+c leaves y=c.
  4. For y=2x+1, the gradient is 2 and the line crosses the y-axis at (0,1).
    graph diagram — not drawn yet

    Axes from x = -3 to 3 and y = -5 to 7, one unit per square, with the line y = 2x + 1 drawn; the point (0, 1) marked where the line crosses the y-axis, and a gradient triangle from (1, 3) across to (2, 3) and up to (2, 5), labelled 'run 1' and 'rise 2'.

    The intercept is where the line meets the y-axis. The gradient is how far the line rises for each 1 across.
  5. The order of the terms does not matter. y=5−3x is the same equation as y=−3x+5, so its gradient is −3, not 5. The gradient is the number that multiplies x, with its sign, wherever it sits.
  6. If there is no number on its own, then c=0. The line y=4x passes through the origin (0,0).
  7. A positive gradient means the line goes up from left to right. A negative gradient means it goes down. Compare the sign with the graph or a quick sketch before you write the answer.
  8. Fractions work in the same way. y=x3−2 is y=13x−2, so the gradient is 13 and the y-intercept is −2.

Part 3 of 8

Horizontal and vertical lines

  1. A horizontal line has the same y-coordinate at every point. The line through (1,3), (4,3) and (−2,3) has the equation y=3, whatever the value of x.
  2. This fits y=mx+c with m=0 and c=3. The gradient of a horizontal line is zero.
  3. A vertical line has the same x-coordinate at every point. The line through (−2,0) and (−2,5) has the equation x=−2.
  4. A vertical line cannot be written as y=mx+c. Between any two of its points the change in x is zero, and you cannot divide by zero, so its gradient is not defined. That is why x=k is a form of its own.
  5. The trap is to mix the two up. Ask which coordinate stays fixed along the line: that letter goes on the left. On the vertical line through (4,1) the x-coordinate is always 4, so the equation is x=4, not y=4.
    graph diagram — not drawn yet

    Axes from -5 to 5 on both, one unit per square, with the horizontal line y = 3 and the vertical line x = -2 drawn and each labelled with its equation; the two lines meet at (-2, 3), which is marked.

    On y = 3 every point has y-coordinate 3. On x = -2 every point has x-coordinate -2.
  6. The axes are lines too. The x-axis is y=0, because every point on it has y-coordinate 0. The y-axis is x=0.

Part 4 of 8

Reading the gradient and intercept from ax + by = c

  1. Lines are also written in the form ax+by=c, for example 3x+2y=12. In this form the gradient is not on show. The 3 is not the gradient.
  2. To find the gradient, make y the subject. That turns the equation into the form y=mx+c, where you can read m and c.
  3. First subtract 3x from both sides, so that only the y term is left on the left.
    2y=−3x+12
  4. Then divide by 2, because 2 is what multiplies y. Divide every term on the right, not only the first one.
    y=−32x+6
  5. So the gradient is −32 and the line crosses the y-axis at (0,6).
  6. The points where the line crosses the axes come straight from the original form. Put x=0: 2y=12, so y=6. Put y=0: 3x=12, so x=4. The line crosses the axes at (0,6) and (4,0).
  7. Those two points give you a check. From (0,6) to (4,0), y falls by 6 while x rises by 4, a gradient of −64=−32. The two methods agree.
  8. Take care when the number in front of y is negative, as in 4x−3y=12. Dividing by −3 changes the sign of every term. Worked example 1 shows this case.

Part 5 of 8

Obtaining the equation from a graph

  1. To write the equation of a line that is drawn for you, you need two things: its gradient m and its y-intercept c.
  2. Choose two points where the line goes exactly through a grid crossing, as far apart as the graph allows. A point read between grid lines is an estimate, and it makes the gradient inaccurate.
  3. Find the gradient as the change in y divided by the change in x, using the numbers on the axes, not the number of squares. If the two axes have different scales, counting squares gives the wrong gradient.
  4. For example, suppose the line passes through (0,10) and (4,30), and on the y-axis one square stands for 5 units. The rise is 30−10=20 units, which is only 4 squares. The gradient is 204=5, not 44=1.
    graph diagram — not drawn yet

    Axes with x from 0 to 5 at 1 unit per square and y from 0 to 40 at 5 units per square, with the line y = 5x + 10 drawn; the points (0, 10) and (4, 30) marked, and a gradient triangle between them labelled 'run 4' and 'rise 20'.

    The rise covers 4 squares but 20 units. Use the numbers on the axes.
  5. Now read c where the line crosses the y-axis, which here is 10. The equation is y=5x+10.
  6. If the graph does not show x=0, you cannot read c from it. Find m first, then substitute one point into y=mx+c and solve for c, as in the next section.
  7. Before you write the answer, check the sign. If the line goes down from left to right, your gradient must be negative.

Part 6 of 8

Obtaining the equation from a gradient and a point, or from two points

  1. If you know the gradient and one point on the line, substitute both into y=mx+c. Then c is the only unknown left, so you can solve for it.
  2. For example, the line with gradient −4 through (2,3): put m=−4, x=2 and y=3 into y=mx+c.
    3=−4×2+c⇒3=−8+c⇒c=11
  3. So the line is y=−4x+11.
  4. If you know two points, first find the gradient from them, then do the same as above with either point. Both points give the same value of c.
  5. When you find the gradient, subtract in the same order on the top and the bottom. If you use the second point first on top, use it first on the bottom too. Mixing the order changes the sign of the gradient.
    m=y2−y1x2−x1
  6. Finish by substituting the other point into your equation. If the two sides are not equal, there is a slip in m or in c, and you can find it before you move on.

Part 7 of 8

Giving the equation in a fully simplified or requested form

  1. The syllabus expects the equation of a line in a fully simplified form. 2y=4x+6 is a correct equation of its line, but it is not simplified. Divide every term by 2 to get y=2x+3.
  2. In the form ax+by=c, cancel any factor that all three numbers share. 6x+4y=10 becomes 3x+2y=5 when you divide every term by 2.
  3. Write a fraction in a gradient in its lowest terms. A gradient of 68 is written 34.
  4. Keep exact values. A gradient of 23 stays a fraction: 0.667 is a rounded value, so an equation that uses it describes a slightly different line.
  5. Do not mix fractions and decimals in one answer. Write y=12x+14 or y=0.5x+0.25, not y=12x+0.25.
  6. When the question asks for a particular form, such as ax+by=c where a, b and c are integers, give that form. From y=23x−4, multiply every term by 3 to clear the fraction. Then collect the x and y terms on one side.
    3y=2x−12⇒2x−3y=12
  7. If you multiply the whole equation by −1, you get −2x+3y=−12. That is the same line, because every point that fits one equation fits the other.

Part 8 of 8

Interpreting the equation in a context

  1. When a straight-line graph is a model of something real, the letters change, but m and c keep their meaning.
  2. The gradient is a rate: how much the vertical quantity changes for each one unit of the horizontal quantity. Its units are vertical units per horizontal unit.
  3. The intercept is the starting value: the value of the vertical quantity when the horizontal quantity is zero.
  4. For example, the height h cm of a candle t hours after it is lit is given by h=24−1.5t. The gradient −1.5 means the height goes down by 1.5 cm each hour. The intercept 24 means the candle was 24 cm tall when it was lit.
  5. To use the model, substitute or solve. The candle has burned down completely when h=0.
    24−1.5t=0⇒1.5t=24⇒t=16
  6. So the candle lasts 16 hours. Here the point where the line meets the horizontal axis has a meaning too: it is the moment the quantity reaches zero.
  7. In an Explain answer, say what each number means in the words of the context, with its units and a word such as 'per' or 'each'. 'The gradient is −1.5' only repeats the equation. 'The height goes down by 1.5 cm each hour' interprets it.

Worked examples

Example 1. Find the gradient and the y-intercept of the line with equation 4x−3y=12.

Show the working
  1. The gradient is not on show in this form, so make y the subject. First subtract 4x from both sides.
    −3y=−4x+12
  2. Divide every term by −3, the number that multiplies y. Dividing by a negative number changes the sign of each term.
    y=43x−4
  3. Now read the values: the number that multiplies x is the gradient, and the number on its own is the y-intercept.
  4. Check with a point. In your equation, x=3 gives y=4−4=0. In the original equation, 4×3−3×0=12. Both agree, so (3,0) is on the line and the rearrangement is correct.

Answer: Gradient 43; y-intercept −4, so the line crosses the y-axis at (0,−4).

Example 2. Find the equation of the line through the points (−1,7) and (3,−1). Give your answer in the form y=mx+c.

Show the working
  1. Find the gradient first. Subtract in the same order on the top and the bottom: second point minus first point in both.
    m=−1−73−(−1)=−84=−2
  2. The gradient is negative. That fits the points: as x goes up from −1 to 3, y goes down from 7 to −1.
  3. Substitute the gradient and one of the points, here (−1,7), into y=mx+c, and solve for c.
    7=−2×(−1)+c⇒7=2+c⇒c=5
  4. Check with the other point, (3,−1): −2×3+5=−6+5=−1. It matches.

Answer: y=−2x+5

Example 3. A straight line is drawn on a grid with one unit per square on both axes. It passes through the grid points (0,−2) and (6,2). Find the equation of the line. Give your answer in the form ax+by=c, where a, b and c are integers.

Show the working
  1. Use two points where the line goes exactly through a grid crossing. Here they are (0,−2) and (6,2).
    graph diagram — not drawn yet

    Axes from x = -1 to 7 and y = -3 to 3, one unit per square, with a straight line drawn through (0, -2) and (6, 2), both points marked with crosses on grid intersections; the line also passes through (3, 0).

    Two points on exact grid crossings give the gradient. The y-axis crossing gives c.
  2. Find the gradient from the two points.
    m=2−(−2)6−0=46=23
  3. The line crosses the y-axis at (0,−2), so c=−2.
    y=23x−2
  4. This is a correct equation, but it is not in the form the question asks for. Multiply every term by 3 to clear the fraction.
    3y=2x−6
  5. Collect x and y on one side: subtract 3y from both sides and add 6 to both sides.
    2x−3y=6
  6. Check with (6,2): 2×6−3×2=12−6=6. It matches. The numbers 2, 3 and 6 have no common factor, so the equation is fully simplified.

Answer: 2x−3y=6

Example 4. The fare C dollars for a taxi journey is a linear function of the distance d km. A 4 km journey costs $9.20 and a 10 km journey costs $17.60. Find C in terms of d, and explain what each number in your equation means.

Show the working
  1. Write each journey as a point (d,C): (4,9.20) and (10,17.60). The horizontal quantity is distance and the vertical quantity is fare.
  2. Find the gradient from the two points.
    m=17.60−9.2010−4=8.406=1.40
  3. Substitute the gradient and the point (4,9.20) into C=md+c and solve for c.
    9.20=1.40×4+c⇒9.20=5.60+c⇒c=3.60
  4. So C=1.4d+3.6. Check with the other journey: 1.4×10+3.6=17.6. It matches.
  5. Interpret the gradient as a rate, with units: the fare goes up by $1.40 for each extra kilometre.
  6. Interpret the intercept as the fare when d=0: a fixed charge of $3.60 that is paid before any distance is travelled.

Answer: C=1.4d+3.6. The fare goes up by $1.40 per km, and $3.60 is a fixed charge paid on every journey.

Where people go wrong

Mistake: Reading the gradient of 3x+2y=12 as 3.

Instead: Make y the subject first: y=−32x+6, so the gradient is −32.

The number that multiplies x is the gradient only when y is on its own on one side.

Mistake: Dividing only some of the terms: from 2y=6x−4, writing y=3x−4.

Instead: Divide every term by 2: y=3x−2.

You must divide both whole sides by the same number, and the right-hand side is all of 6x−4.

Mistake: Finding a gradient by counting squares when the two axes have different scales.

Instead: Use the values on the axes: the change in y divided by the change in x.

One square can stand for 5 units on one axis and 1 unit on the other, so the number of squares is not the change in value.

Mistake: Writing the vertical line through (4,1) as y=4.

Instead: Write x=4.

On a vertical line the x-coordinate is fixed. y=4 is the horizontal line through all the points with y-coordinate 4.

Mistake: Taking the first number as the gradient in y=5−3x.

Instead: The gradient is −3 and the y-intercept is 5.

The gradient is the number that multiplies x, with its sign, wherever that term is written.

Check yourself

  1. State the gradient and the y-intercept of the line y=7−3x.
    AnswerGradient −3; y-intercept 7, the point (0,7).
  2. Does the point (2,−1) lie on the line y=4x−9? Show how you know.
    AnswerYes. 4×2−9=−1, which is the y-coordinate of the point.
  3. Write down the equations of the horizontal line and of the vertical line through (5,−2).
    AnswerHorizontal: y=−2. Vertical: x=5.
  4. Find the gradient and the y-intercept of the line 6x+3y=9.
    Answer3y=−6x+9, so y=−2x+3. Gradient −2; y-intercept 3.
  5. Find the equation of the line with gradient 3 that passes through (2,1).
    Answer1=3×2+c gives c=−5, so y=3x−5.
  6. Find the equation of the line through (1,2) and (4,11).
    AnswerGradient 11−24−1=93=3. Then 2=3×1+c gives c=−1, so y=3x−1.
  7. Write y=34x+2 in the form ax+by=c, where a, b and c are integers.
    AnswerMultiply every term by 4: 4y=3x+8, so 3x−4y=−8. (−3x+4y=8 is the same line.)
  8. The cost C dollars of printing n posters is C=0.8n+15. State what 0.8 and 15 mean in this context.
    Answer0.8: each extra poster costs $0.80. 15: a fixed charge of $15 that is paid however many posters are printed.

Exam questions

Try each part first. Open the mark scheme after you have written your answer.

Question 1. The line L has equation 2x+5y=20.

(a) Find the gradient of L. 2 marks No calculator

Mark scheme
  • M1 5y=−2x+20 or y=−25x+4 seen, or a gradient calculated from two correct points on L, e.g. 0−410−0
  • A1 −25 or −0.4 oe

(b) Write down the coordinates of the point where L crosses the y-axis. 1 mark No calculator

Mark scheme
  • B1 (0,4)

(c) Find the coordinates of the point where L crosses the x-axis. 1 mark No calculator

Mark scheme
  • B1 (10,0)

(d) Show that the point (−5,6) lies on L. 2 marks No calculator

Mark scheme
  • M1 substitutes x=−5 and y=6: 2×(−5)+5×6
  • A1 −10+30=20, equal to the right-hand side, with a statement that the point lies on L

Question 2. The points A(−2,1) and B(4,10) lie on a straight line.

(a) Find the equation of the line AB. Give your answer in the form y=mx+c. 3 marks No calculator

Mark scheme
  • M1 gradient 10−14−(−2)=96 oe
  • M1 substitutes (−2,1) or (4,10) into y=(their m)x+c, or uses y−1=(their m)(x+2) oe
  • A1 y=32x+4 or y=1.5x+4

(b) Write the equation of the line AB in the form ax+by=c, where a, b and c are integers. 2 marks No calculator

Mark scheme
  • M1 2y=3x+8, or another correct equation with the fraction cleared, FT their (a)
  • A1 3x−2y=−8 oe

(c) Write down the equation of the vertical line through B. 1 mark No calculator

Mark scheme
  • B1 x=4

Question 3. A car's fuel tank is filled and the car is then driven. The volume of fuel in the tank, F litres, after the car has travelled d km is shown by a straight-line graph. The graph passes through the points (0,45) and (300,21).

(a) Find an equation for F in terms of d. 3 marks

Mark scheme
  • M1 gradient 21−45300−0 oe
  • B1 intercept 45 seen or used
  • A1 F=45−0.08d oe

(b) Explain what each of the two numbers in your equation tells you about the car's fuel. 2 marks

Mark scheme
  • B1 45: there were 45 litres of fuel in the tank at the start, when d=0
  • B1 −0.08: the volume of fuel goes down by 0.08 litres for each km travelled oe

(c) Calculate the distance the car has travelled when 5 litres of fuel remain in the tank. 2 marks

Mark scheme
  • M1 45−0.08d=5 oe, FT their equation
  • A1 500 (km)

How this is examined

  • Finding the equation of the line through two given points: A 3-mark Find: two points are given by their coordinates, and you must give the equation of the line, possibly in a stated form such as y=mx+c M1 for the gradient as the change in y over the change in x, with both subtractions in the same order. M1 for substituting your gradient and one of the points into y=mx+c to find c. A1 for the complete equation, fully simplified, for example y=−2x+5.
  • Writing the equation of a line that is drawn on a grid: A 2- or 3-mark Find or Write down, with a straight line drawn on a grid, where the two axes may have different scales A gradient from two points read exactly at grid crossings, calculated with the values on the axes (not the number of squares), with a sign that matches the direction of the line. The y-intercept read where the line crosses the y-axis. Then the equation y=mx+c with both values in it.
  • Reading the gradient and the y-intercept from an equation that is not in the form y=mx+c: A 2-mark Find or Write down: an equation such as ax+by=c is given, and you must give its gradient, its y-intercept, or both The method is the rearrangement to y=…, with every term divided by the number that multiplies y. The gradient is then the number that multiplies x, with its sign: for 3x+2y=12 it is −32. The intercept is the number on its own: 6, or the point (0,6).
  • Explaining what the gradient and the intercept of a straight-line model mean: A 1- or 2-mark Explain or State after a context graph or formula, such as a cost against a distance or a volume against a time One statement for each number, in the words of the context and with units. For the gradient: 'the fare goes up by $1.40 for each kilometre'. For the intercept: 'a fixed charge of $3.60'. Writing 'm=1.4' only repeats the equation and does not interpret it.
  • Giving an equation in a requested form, fully simplified: A 1- or 2-mark Write: put an equation that is given or that you found in the form ax+by=c, where a, b and c are integers Fractions cleared by multiplying every term by the same number, then the x and y terms collected on one side: y=23x−4 becomes 2x−3y=12. No factor shared by all of a, b and c is left.
  • Equations of horizontal and vertical lines: A 1-mark Write down: the equation of a horizontal or vertical line through a given point, or of a line drawn parallel to an axis x=k for a vertical line and y=k for a horizontal line, where k is the coordinate that stays fixed. A number on its own, such as '4', is not an equation.

Words to know

Gradient
How steep a line is: the change in y divided by the change in x between any two points on it. It is m in y=mx+c.
y-intercept
The y-coordinate of the point where a line crosses the y-axis, found by putting x=0. It is c in y=mx+c.
x-intercept
The x-coordinate of the point where a line crosses the x-axis, found by putting y=0.
Coefficient
The number that multiplies a letter, for example −3 in −3x.
Linear equation
An equation whose graph is a straight line: x and y appear only to the power 1 and are not multiplied together.
Fully simplified
Written with no factor left that every term shares, fractions in their lowest terms and like terms collected, for example y=2x+3 rather than 2y=4x+6.