OpenRevise

Maths · Graphs

Viewing as

Teacher view: every answer and mark scheme set out in full.

Equations of Straight Lines

Finding the equation of a line from two points, midpoints, and parallel and perpendicular lines.

  • 9 key terms
  • All boards

Learning Objectives

  1. 1Find the equation of a straight line from its gradient and a point, or from two points.
  2. 2Find the midpoint of a line segment, and its length (Higher tier).
  3. 3Write the equation of a line parallel to a given line.
  4. 4Use the fact that perpendicular lines have gradients with product \(-1\) (Higher tier).

From a picture to an equation

The last lesson went from an equation to a graph. This one goes the other way: given a gradient and a point, or two points, write down the equation of the line. The method is always the same three steps, find the gradient, put a point in to find \(c\), then write \(y = mx + c\), so it is worth learning as a routine. Exam questions often add a second part, such as the midpoint, a parallel line or a perpendicular line, so each of those gets a short method here too.

The equation of a line through two points

Follow the same three steps every time and you will not need to remember a formula.

  • Step 1: gradient

    Work out \(m = \dfrac{y_2 - y_1}{x_2 - x_1}\).

  • Step 2: find c

    Substitute \(m\) and one point into \(y = mx + c\), and solve for \(c\).

  • Step 3: write it

    Put \(m\) and \(c\) back into \(y = mx + c\).

  • Check

    Put the other point in. If it does not fit, there is a slip.

Through two points

Find the equation of the line through \((2, 1)\) and \((6, 9)\).

Show the solutionHide the solution
  1. 1 Gradient \(\dfrac{9 - 1}{6 - 2} = \dfrac{8}{4} = 2\).
  2. 2 Substitute a point \(y = 2x + c\) with \((2, 1)\) gives \(1 = 4 + c\), so \(c = -3\).
  3. 3 Write the equation \(y = 2x - 3\).
  4. 4 Check with the other point \(2 \times 6 - 3 = 9\). Correct.

Answer\(y = 2x - 3\)

Midpoints

The midpoint of a line segment is halfway along it, so its coordinates are the averages of the end points.

  • Formula

    The midpoint of \((x_1, y_1)\) and \((x_2, y_2)\) is \(\left(\dfrac{x_1 + x_2}{2}, \dfrac{y_1 + y_2}{2}\right)\).

  • Example

    The midpoint of \((2, 1)\) and \((6, 9)\) is \(\left(\dfrac{2 + 6}{2}, \dfrac{1 + 9}{2}\right) = (4, 5)\).

  • Finding an end point

    If the midpoint and one end are known, double the midpoint and subtract the end you know.

  • Length

    The length of the segment uses Pythagoras: \(\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\) (Higher tier).

Parallel lines

Parallel lines have the same gradient, so you can copy it.

  • Same m, different c

    A line parallel to \(y = 3x + 1\) has the form \(y = 3x + c\).

  • Through a point

    Put the point in to find \(c\). Through \((2, 9)\): \(9 = 6 + c\), so \(c = 3\), and the line is \(y = 3x + 3\).

  • Rearranging first

    \(2y - 4x = 6\) becomes \(y = 2x + 3\), so its gradient is 2. Lines with different-looking equations can still be parallel.

  • Same line?

    If \(m\) and \(c\) are both the same, it is the same line, not a parallel one.

A perpendicular line

(Higher tier) Find the equation of the line perpendicular to \(y = 2x + 3\) that passes through \((4, 1)\).

Show the solutionHide the solution
  1. 1 Perpendicular gradient The gradient of \(y = 2x + 3\) is 2, so the new gradient is \(-\dfrac{1}{2}\).
  2. 2 Find c \(1 = -\dfrac{1}{2} \times 4 + c\), so \(1 = -2 + c\) and \(c = 3\).
  3. 3 Write the equation \(y = -\dfrac{1}{2}x + 3\).
  4. 4 Check At \(x = 4\), \(y = -2 + 3 = 1\). Correct.

Answer\(y = -\dfrac{1}{2}x + 3\)

Awkward forms

Lines are not always given as \(y = mx + c\), so you may need to rearrange.

  • Form ax + by = c

    \(3x + 2y = 12\) rearranges to \(2y = -3x + 12\) and then \(y = -\dfrac{3}{2}x + 6\), so the gradient is \(-\dfrac{3}{2}\).

  • Where it crosses the axes

    Put \(x = 0\) to find the \(y\)-intercept and \(y = 0\) to find the \(x\)-intercept. For \(3x + 2y = 12\) these are \((0, 6)\) and \((4, 0)\).

  • Equal gradients

    To check two lines are parallel, rearrange both and compare \(m\).

  • Fractions

    Keep gradients as fractions, not decimals, unless the question asks.

Test yourself

  1. 1

    What are the three steps for the equation of a line through two points?

    Show answerHide answer

    Find the gradient, find \(c\) with one point, then write \(y = mx + c\).

  2. 2

    What is the midpoint of \((0, 4)\) and \((6, 10)\)?

    Show answerHide answer

    \((3, 7)\).

  3. 3

    What gradient does a line parallel to \(y = 5x - 2\) have?

    Show answerHide answer

    5.

  4. 4

    What is the gradient of a line perpendicular to \(y = 4x\) (Higher tier)?

    Show answerHide answer

    \(-\dfrac{1}{4}\).

  5. 5

    What is the gradient of \(2y = 6x + 8\)?

    Show answerHide answer

    3.

Exam technique: equations of lines

Show every step, because the answer has several parts that can each earn a mark.

  • Write the gradient calculation

    Show the change in \(y\) over the change in \(x\).

  • Substitute a point

    Write "\(1 = 2 \times 2 + c\)", not just \(c = -3\).

  • Finish with a full equation

    The answer is \(y = 2x - 3\), not just "\(m = 2\)".

  • Check with the second point

    It takes ten seconds and catches most slips.

Summary and exam focus

  • For the line through two points, find \(m\), then find \(c\), then write \(y = mx + c\).
  • The midpoint is the average of the \(x\)-coordinates and the average of the \(y\)-coordinates.
  • Parallel lines have the same gradient.
  • Perpendicular lines have gradients that multiply to \(-1\) (Higher tier).

Exam focus

Find an equation of the line that passes through \((0, 5)\) and \((4, 13)\). (3 marks) (3 marks)

The point \((0, 5)\) is on the \(y\)-axis, so \(c = 5\) straight away. The gradient is \(\dfrac{13 - 5}{4 - 0} = 2\), so \(y = 2x + 5\). Spotting a point with \(x = 0\) saves a step.

Key terms

The words this lesson expects you to use. Each one is linked from the first place it appears above.

Equation of a line
A rule such as \(y = 2x + 1\) that is true for every point on the line.
Midpoint
The point halfway along a line segment.
Line segment
The part of a line between two end points.
Perpendicular
At a right angle to each other.
Negative reciprocal
A number turned upside down with its sign changed, such as \(-\dfrac{1}{2}\) for 2.
Substitute
Replace letters in an equation with numbers.
Gradient-intercept form
The form \(y = mx + c\).
Parallel
Lines with the same gradient.
Reciprocal
One divided by a number, such as \(\dfrac{1}{4}\) for 4.

Questions and answers

15 questions set on this lesson, with the mark schemes and model answers open.

1. Exam question Work out 2 marks Easier

\(A\) is the point \((2, 6)\) and \(B\) is the point \((8, 10)\). Find the coordinates of the midpoint of \(AB\).

Mark scheme — 2 marks available

  • One coordinate correct — M1
  • \((5, 8)\) — A1

Model answer

\(\left(\dfrac{2 + 8}{2}, \dfrac{6 + 10}{2}\right) = (5, 8)\).

2. Exam question Work out 6 marks Core

The diagram shows a straight line through the points \(A\) and \(B\). (a) Work out the gradient of the line. (2 marks) (b) Find an equation of the line. (2 marks) (c) Work out the coordinates of the midpoint of \(AB\). (2 marks)

A straight line passing through the points A (1, 3) and B (5, 11).

Mark scheme — 6 marks available

  • (a) \(\dfrac{11 - 3}{5 - 1}\) — M1
  • (a) 2 — A1
  • (b) \(y = 2x + c\) and a point substituted — M1
  • (b) \(y = 2x + 1\) — A1
  • (c) One coordinate correct — M1
  • (c) \((3, 7)\) — A1

Model answer

(a) \(\dfrac{11 - 3}{5 - 1} = 2\). (b) \(y = 2x + c\) with \((1, 3)\) gives \(3 = 2 + c\), so \(c = 1\) and \(y = 2x + 1\). (c) \(\left(\dfrac{1 + 5}{2}, \dfrac{3 + 11}{2}\right) = (3, 7)\).

3. Exam question Find 3 marks Core

Find an equation of the line that is parallel to \(y = 3x - 1\) and passes through the point \((2, 9)\).

Mark scheme — 3 marks available

  • \(y = 3x + c\) or gradient 3 stated — M1
  • \(9 = 3 \times 2 + c\) — M1
  • \(y = 3x + 3\) — A1

Model answer

The gradient is 3, so \(y = 3x + c\). Substituting \((2, 9)\) gives \(9 = 6 + c\), so \(c = 3\) and \(y = 3x + 3\).

4. Exam question Work out 3 marks Core

A line has equation \(3x + 2y = 12\). (a) Work out the gradient of the line. (2 marks) (b) Does the point \((2, 3)\) lie on the line? You must show your working. (1 mark)

Mark scheme — 3 marks available

  • (a) \(2y = -3x + 12\) or \(y = \ldots\) — M1
  • (a) \(-\dfrac{3}{2}\) — A1
  • (b) Yes, with \(6 + 6 = 12\) — B1

Model answer

(a) Rearrange to \(2y = -3x + 12\), so \(y = -\dfrac{3}{2}x + 6\). The gradient is \(-\dfrac{3}{2}\). (b) \(3 \times 2 + 2 \times 3 = 12\), so yes.

5. Exam question Find 3 marks Stretch

Line \(L_1\) has equation \(y = 2x + 3\). Line \(L_2\) is perpendicular to \(L_1\) and passes through the point \((4, 1)\). Find an equation of \(L_2\).

Mark scheme — 3 marks available

  • Gradient \(-\dfrac{1}{2}\) seen — M1
  • \(1 = -\dfrac{1}{2} \times 4 + c\) — M1
  • \(y = -\dfrac{1}{2}x + 3\) — A1

Model answer

The gradient of \(L_2\) is \(-\dfrac{1}{2}\). Then \(1 = -\dfrac{1}{2} \times 4 + c\), so \(c = 3\) and \(y = -\dfrac{1}{2}x + 3\).

6. Exam question Work out 4 marks Stretch

\(A\) is the point \((-2, 1)\) and \(B\) is the point \((6, 7)\). (a) Find the coordinates of the midpoint of \(AB\). (2 marks) (b) Work out the length of \(AB\). (2 marks)

Mark scheme — 4 marks available

  • (a) One coordinate correct — M1
  • (a) \((2, 4)\) — A1
  • (b) \(\sqrt{8^2 + 6^2}\) — M1
  • (b) 10 — A1

Model answer

(a) \(\left(\dfrac{-2 + 6}{2}, \dfrac{1 + 7}{2}\right) = (2, 4)\). (b) The differences are 8 and 6, so \(AB = \sqrt{8^2 + 6^2} = \sqrt{100} = 10\).

7. Multiple choice 1 mark Core

What is the equation of the line through \((2, 1)\) and \((6, 9)\)?

  1. A \(y = 2x + 3\)
  2. B \(y = \dfrac{1}{2}x - 3\)
  3. C \(y = 2x - 3\) Correct
  4. D \(y = -2x - 3\)

Why: The gradient is \(\dfrac{8}{4} = 2\). Then \(1 = 2 \times 2 + c\) gives \(c = -3\).

8. Multiple choice 1 mark Easier

What is the midpoint of \((2, 1)\) and \((6, 9)\)?

  1. A \((8, 10)\)
  2. B \((4, 5)\) Correct
  3. C \((2, 4)\)
  4. D \((4, 8)\)

Why: \(\left(\dfrac{2 + 6}{2}, \dfrac{1 + 9}{2}\right) = (4, 5)\).

9. Multiple choice 1 mark Easier

A line is parallel to \(y = 5x - 2\). What is its gradient?

  1. A \(5\) Correct
  2. B \(-5\)
  3. C \(-\dfrac{1}{5}\)
  4. D \(\dfrac{1}{5}\)

Why: Parallel lines have equal gradients.

10. Multiple choice 1 mark Core

A line has gradient 3 and passes through \((2, 9)\). What is its equation?

  1. A \(y = 3x + 9\)
  2. B \(y = 3x - 3\)
  3. C \(y = 3x + 6\)
  4. D \(y = 3x + 3\) Correct

Why: \(9 = 3 \times 2 + c\) gives \(c = 3\).

11. Multiple choice 1 mark Core

What is the gradient of the line \(2y - 4x = 6\)?

  1. A \(4\)
  2. B \(3\)
  3. C \(2\) Correct
  4. D \(-2\)

Why: Rearranged, \(2y = 4x + 6\), so \(y = 2x + 3\).

12. Multiple choice 1 mark Easier

What is the midpoint of \((0, 4)\) and \((6, 10)\)?

  1. A \((6, 14)\)
  2. B \((3, 7)\) Correct
  3. C \((3, 3)\)
  4. D \((6, 7)\)

Why: \(\left(\dfrac{0 + 6}{2}, \dfrac{4 + 10}{2}\right) = (3, 7)\).

13. Multiple choice 1 mark Core

Where does the line \(3x + 2y = 12\) cross the axes?

  1. A \((0, 6)\) and \((4, 0)\) Correct
  2. B \((0, 4)\) and \((6, 0)\)
  3. C \((0, 12)\) and \((12, 0)\)
  4. D \((0, 3)\) and \((2, 0)\)

Why: Put \(x = 0\) to get \(y = 6\), and \(y = 0\) to get \(x = 4\).

14. Multiple choice 1 mark Stretch

What is the gradient of a line perpendicular to a line with gradient 4?

  1. A \(\dfrac{1}{4}\)
  2. B \(-4\)
  3. C \(4\)
  4. D \(-\dfrac{1}{4}\) Correct

Why: Perpendicular gradients multiply to \(-1\), so the new gradient is \(-\dfrac{1}{4}\).

15. Multiple choice 1 mark Stretch

What is the equation of the line perpendicular to \(y = 2x + 3\) through \((4, 1)\)?

  1. A \(y = -2x + 9\)
  2. B \(y = \dfrac{1}{2}x - 1\)
  3. C \(y = -\dfrac{1}{2}x + 3\) Correct
  4. D \(y = -\dfrac{1}{2}x + 1\)

Why: The gradient is \(-\dfrac{1}{2}\). Then \(1 = -2 + c\), so \(c = 3\).