Equations of linear graphs

Maths · Coordinate geometry. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Maths topics

The idea

Every straight line that is not vertical can be written as y = mx + c. Here m is the gradient and c is the y-intercept, the value of y where the line crosses the y-axis.

To find the equation of a line you need two facts: its gradient and one point on it. If you are given two points, find the gradient from them first. Then put the gradient and the coordinates of one point into y = mx + c to find c.

If an equation is in another form, such as 4x − 2y = 8, rearrange it to make y the subject before you read off m and c.

In simpler words

Every sloping straight line can be written as y = mx + c. The letter m is the gradient, which says how steep the line is. The letter c is where the line crosses the y-axis. To write the equation of a line, you need its gradient and one point on it. Find the gradient first, put it in as m, then use the point to work out c.

An everyday comparison

y = mx + c is like a taxi receipt. The c is the fixed charge you pay before moving, and m is the price for each kilometre. Two receipts from the same taxi let you work out both: the difference in fares over the difference in distance gives m, and then one receipt gives c. The comparison stops at negatives: taxis never charge a negative rate, but a line can have a negative gradient.

Rules to remember

Common mistake

Reading m and c before y is alone. In 3y = 2x + 12 the y-intercept is 4, not 12, because every term must be divided by 3.

In the exam

Write y = mx + c first. From two points, write m = (y2 − y1)/(x2 − x1), substitute and simplify. Then put the gradient and one point into y = mx + c and solve for c. Finish with the full equation; if the question asks for the form ax + by = c, rearrange to whole-number coefficients. When reading m and c from an equation, divide every term so y is alone first.

Worked example

Find the equation of the line through (−1, 6) and (3, −6).

  1. Gradient: m = (−6 − 6)/(3 − (−1)) = −12/4 = −3.
  2. Use (−1, 6) in y = −3x + c: 6 = −3 × (−1) + c = 3 + c, so c = 3.
  3. Check with (3, −6): −3 × 3 + 3 = −6.

Answer: y = −3x + 3

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Read the full notes

Keep going

← Length and midpointParallel lines →Take a Maths test