Websink Prep UKGCSE MathsTextbook contentsMaths textbooksYear 1Year 2Year 4Year 5Year 6GCSEBrowse allPast papersFind a tutorBecome a tutor
GCSE Maths · EdexcelChapter 12 · Straight-line graphs and coordinates
GCSE Maths · Straight-Line Graphs and Coordinates · Higher · Lesson 12.6

GCSE Maths: Finding the equation of a straight line (Higher)

Part of the GCSE Maths straight-line graphs and coordinates chapter (Higher). Chapter overview · Foundation version of this lesson · whole chapter on one page · Download worksheet (PDF) · Answers (PDF)

Download worksheet (PDF)Answers (PDF)
12.6

Finding the equation of a straight line

Edexcel 1MA1: A9, A10
Grade 4-7

To find the equation of a line you need m and c for y = mx + c. There are three common situations.

1. From a graph

Read c where the line crosses the y-axis. Find m with a gradient triangle (rise ÷ run) using two points on grid corners. Then write y = mx + c. If the line is horizontal its equation is y = a number; if it is vertical its equation is x = a number.

2. From the gradient and one point

Write y = mx + c and put in the gradient. The point is on the line, so its coordinates make the equation true. Substitute them for x and y and solve the little equation for c. For example, gradient 3 through (2, 5): 5 = 3 × 2 + c, so 5 = 6 + c and c = −1. The equation is y = 3x − 1.

3. From two points

First work out the gradient using (y2 − y1) ÷ (x2 − x1). Then you have a gradient and a point (use either), so continue as in case 2. Always check with the other point.

xy−4−3−2−112345678−3−2−1123456Orun = 6rise = −3(0, 3)
Reading an equation from a graph: c = 3 where the line crosses the y-axis. The gradient triangle has a run of 6 and a rise of −3, so m = −3 ÷ 6 = −½.

Why does substituting a point work? Because every point on the line obeys the equation. Once we know m, the only unknown left is c, and one point is enough to find it. If you are asked for the equation of a line that is parallel to another or that passes through a given point, you are using exactly these methods (see Section 12.7).

Some graphs use a different scale on the two axes, or the line does not cross at an easy point. Then use two points that you can read exactly, as far apart as possible, and use the two-points method.

Higher: another way to write the same equation is y − y1 = m(x − x1), where (x1, y1) is a point on the line. It is useful because you do not have to find c separately: for gradient 3 through (2, 5), y − 5 = 3(x − 2), which expands and rearranges to y = 3x − 1. You can also find m and c by writing one equation for each point and solving them together: this method returns in Chapter 14.

Key ideas

  • From a graph: c = y-intercept, m = rise ÷ run from a triangle, then y = mx + c.
  • From m and a point: substitute the point into y = mx + c and solve for c.
  • From two points: find m first, then substitute one point to find c; check with the other point.
  • Horizontal line: y = number. Vertical line: x = number.
  • Always write the final answer as an equation y = …
Worked example 12.6.1
Find the equation of the line shown.
xy−4−3−2−11234−6−5−4−3−2−1123456O

Key words. The equation y = mx + c describes a straight line. m is the gradient (steepness) and c is the y-intercept (the value of y where the line crosses the y-axis, which is where x = 0).

Method. Read the y-intercept (c), find the gradient (m) with a triangle, then write y = mx + c.

  1. Find where the line crosses the y-axis. That value is c, the y-intercept.
    The line crosses the y-axis at (0, 1), so c = 1.
  2. Draw a gradient triangle. Choose two points on grid corners and count the run (across) and the rise (up or down).
    xy−4−3−2−11234−6−5−4−3−2−1123456Orun = 5rise = 10(0, 1)
  3. Work out the gradient. Gradient = rise ÷ run.
    rise = 10, run = 5
    m = 10 ÷ 5 = 2
  4. Write the equation in the form y = mx + c. Put m and c into the formula.
    y = 2x + 1

Check. Test a point on the line, (−3, −5): y = 2 × (−3) + 1 = −5, which matches. ✓

Watch out. Do not mix up m and c: c is where the line hits the y-axis; m is the steepness. A negative gradient needs a minus sign.

Worked example 12.6.2
Find the equation of the line shown.
xy−4−3−2−112345678−3−2−1123456O

Key words. The equation y = mx + c describes a straight line. m is the gradient (steepness) and c is the y-intercept (the value of y where the line crosses the y-axis, which is where x = 0).

Method. Read the y-intercept (c), find the gradient (m) with a triangle, then write y = mx + c.

  1. Find where the line crosses the y-axis. That value is c, the y-intercept.
    The line crosses the y-axis at (0, 3), so c = 3.
  2. Draw a gradient triangle. Choose two points on grid corners and count the run (across) and the rise (up or down).
    xy−4−3−2−112345678−3−2−1123456Orun = 6rise = −3(0, 3)
  3. Work out the gradient. Gradient = rise ÷ run.
    rise = -3, run = 6
    m = -3 ÷ 6 = −12
  4. Write the equation in the form y = mx + c. Put m and c into the formula.
    y = −12x + 3

Check. Test a point on the line, (−4, 5): y = (−12) × (−4) + 3 = 5, which matches. ✓

Watch out. Do not mix up m and c: c is where the line hits the y-axis; m is the steepness. A negative gradient needs a minus sign.

Worked example 12.6.3
Find the equation of the line with gradient 3 that passes through the point (2, 5).

Key words. The equation y = mx + c describes a straight line. m is the gradient (steepness) and c is the y-intercept (the value of y where the line crosses the y-axis, which is where x = 0).

Method. Use y = mx + c. Put in the gradient, substitute the coordinates of the point, then solve for c.

  1. Write the general equation of a straight line. Every straight line (not vertical) has the form y = mx + c.
    y = mx + c
  2. Put in the gradient. We are told the gradient is m = 3.
    y = 3x + c
  3. Substitute the point P (2, 5) into the equation. The point is on the line, so when x and y take its values, the equation is true.
    5 = 3 × 2 + c
    5 = 6 + c
  4. Solve for c. Use the inverse operation on both sides.
    c = 5 − 6 = −1
  5. Write the equation.
    y = 3x − 1

Check. Substitute the point back: y = 3 × 2 − 1 = 5, which is 5. ✓

Watch out. Substitute x into the x position and y into the y position. Do not swap them.

Worked example 12.6.4
Find the equation of the line through A(1, 5) and B(4, 11).

Key words. The equation y = mx + c describes a straight line. m is the gradient (steepness) and c is the y-intercept (the value of y where the line crosses the y-axis, which is where x = 0).

Method. Find the gradient from the two points, then substitute one point into y = mx + c to find c.

  1. Find the gradient first. Use gradient = change in y ÷ change in x, subtracting both in the same order.
    m = (11 − 5) ÷ (4 − 1) = 6 ÷ 3 = 2
  2. Put the gradient into y = mx + c. Now the only thing we do not know is c.
    y = 2x + c
  3. Substitute one of the points to find c. Use A (1, 5). The point is on the line, so its coordinates must fit the equation. Replace x and y by the point’s numbers.
    5 = 2 × 1 + c
    5 = 2 + c
  4. Solve for c. Take 2 from both sides (the opposite of adding 2).
    c = 5 − 2 = 3
  5. Write the full equation. Put m and c into y = mx + c.
    y = 2x + 3

Check. Test the other point B (4, 11): y = 2 × 4 + 3 = 11, which is 11. ✓

Watch out. Check with the second point. If it does not fit, recheck the gradient: subtract in the same order on the top and the bottom.

Worked example 12.6.5
Find the equation of the line through A(−2, 7) and B(4, −2).
▶ Watch this solution as a video

Key words. The equation y = mx + c describes a straight line. m is the gradient (steepness) and c is the y-intercept (the value of y where the line crosses the y-axis, which is where x = 0).

Method. Find the gradient from the two points, then substitute one point into y = mx + c to find c.

  1. Find the gradient first. Use gradient = change in y ÷ change in x, subtracting both in the same order.
    m = (−2 − 7) ÷ (4 − (−2)) = −9 ÷ 6 = −32
  2. Put the gradient into y = mx + c. Now the only thing we do not know is c.
    y = −32x + c
  3. Substitute one of the points to find c. Use A (−2, 7). The point is on the line, so its coordinates must fit the equation. Replace x and y by the point’s numbers.
    7 = (−32) × (−2) + c
    7 = 3 + c
  4. Solve for c. Take 3 from both sides (the opposite of adding 3).
    c = 7 − 3 = 4
  5. Write the full equation. Put m and c into y = mx + c.
    y = −32x + 4

Check. Test the other point B (4, −2): y = (−32) × 4 + 4 = −2, which is −2. ✓

Watch out. Check with the second point. If it does not fit, recheck the gradient: subtract in the same order on the top and the bottom.

Watch out

Do not use the y-coordinate of a point as c. Only the point (0, c) tells you c directly. For any other point you must substitute. And take care with negative gradients: reading rise ÷ run on a line that goes down gives a negative rise.

Exercise 12G  Equations of lines from graphs

Non-calculator
1
FFind the equation of the line.
xy−5−4−3−2−1123−4−3−2−1123456O
2
FFind the equation of the line.
xy−3−2−11234−5−4−3−2−1123456O
3
FFind the equation of the line.
xy−3−2−1123456−4−3−2−1123456O
4
FFind the equation of the line.
xy−3−2−11234−5−4−3−2−112345678O
5
FFind the equation of the line.
xy−6−5−4−3−2−1123456−3−2−112345O
6
FFind the equation of the line.
xy−6−5−4−3−2−1123456−6−5−4−3−2−1123O
7
FFind the equation of the line.
xy−3−2−11234−8−7−6−5−4−3−2−112345678O
8
FFind the equation of the line.
xy−6−5−4−3−2−1123456−5−4−3−2−11234O
9
FWrite down the equations of the two lines A and B.
xy−5−4−3−2−112345−5−4−3−2−112345OAB
(a)line A
(b)line B
10
RThe grid shows two lines, L and M.
xy−5−4−3−2−1123456−4−3−2−11234567OLM
(a)Find the equation of line L.
(b)Find the equation of line M.
(c)What do you notice about the two equations? What does this tell you about the lines?
11
PSA line crosses the x-axis at (−4, 0) and the y-axis at (0, 3). Find the equation of the line.
xy−6−5−4−3−2−11234−3−2−1123456O(−4, 0)(0, 3)
12
PSThe line in the diagram is the boundary of a fence on a map. Write down its equation in the form y = mx + c.
xy−3−2−11234−5−4−3−2−112345678O
13
RA line passes through (0, 3) and (4, −1). Without calculating, explain how you can tell the gradient is negative.

Exercise 12H  Equations of lines from points and gradients

Non-calculator
1
FFind the equation of the line with the given gradient that passes through the given point.
(a)gradient 2, point (1, 5)
(b)gradient −1, point (3, 4)
(c)gradient 3, point (−2, −1)
(d)gradient 12, point (4, 3)
2
FFind the equation of the line through each pair of points.
(a)(0, 1) and (2, 5)
(b)(1, 2) and (3, 8)
(c)(0, 5) and (5, 0)
(d)(−1, −3) and (3, 5)
3
FFind the equation of the line through each pair of points. The gradient may be a fraction.
(a)(2, 1) and (6, 3)
(b)(−3, −2) and (3, 2)
(c)(0, −3) and (6, 1)
(d)(−2, 4) and (4, −5)
4
PSA line passes through (1, 1) and (3, 5). Does it pass through the point (5, 9)? Show your working.
5
PSA line passes through (−1, −7) and (3, 5). Find its equation and then the value of y when x = 10.
6
RPete finds the equation of the line through (1, 3) and (3, 7). He gets m = 2 and writes y = 2x + 3. Show that he is wrong and find the correct equation.
7
PSA line has gradient −2 and passes through (4, 3). Find the coordinates of the point where the line crosses the x-axis.
8
FFind the equation of the line through each pair of points.
(a)(2, −1) and (6, −1)
(b)(3, 2) and (3, 7)
9
RShow that the points A(−1, −3), B(2, 3) and C(4, 7) lie on a straight line, and find the equation of the line.
10
PSThe line y = mx + c passes through (1, 5) and (3, 11). Write down two equations in m and c and use them to find m and c.

Websink Prep UK is an independent site. It is not affiliated with, endorsed by or sponsored by AQA, Pearson Edexcel, OCR, WJEC, Eduqas, CCEA, SQA, GL Assessment, CEM or the Department for Education. All exam board names and trademarks belong to their owners. Past papers are linked from the exam boards' own websites and are not hosted here.

About Websink Prep UK · Find a tutor · Privacy · Terms · Cookie settings