OpenRevise

Maths · Graphs

Viewing as

Teaching this? The teacher view opens every answer and mark scheme.

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.

You've finished the notes

Check your understanding

Test yourself while it is fresh. Start with the flashcards, then try the exam questions.

Something here looks wrong?

Tell us what and we will go and look. It goes to whoever writes these pages, nobody else, and we do not ask who you are — so there is nothing to sign and nothing comes back to you.