Straight-line graphs

Every straight line can be written as y = mx + c. The gradient m says how steep the line is, and c says where it crosses the y-axis. Straight lines model anything that changes at a steady rate, such as a phone bill or a taxi fare.

Key facts

  • In y = mx + c, m is the gradient and c is the y-intercept.
  • Gradient = change in y ÷ change in x (“rise over run”).
  • A positive gradient slopes up to the right; a negative gradient slopes down.
  • Parallel lines have the same gradient.
  • Perpendicular gradients multiply to −1: if one is m, the other is −1/m.
  • For the line through two points: find m, then substitute one point into y = mx + c to find c.

Worked examples

Example 1

Find the gradient and y-intercept of 2y = 6x − 8.

  1. Divide everything by 2. y = 3x − 4
  2. Read off the gradient m and the y-intercept c. m = 3, c = −4

Answer: Gradient 3, y-intercept −4

Example 2

Find the equation of the line through (1, 5) and (4, 11).

  1. Gradient = change in y ÷ change in x. m = (11 − 5)/(4 − 1) = 2
  2. Substitute (1, 5) into y = 2x + c. 5 = 2 + c, so c = 3
  3. Equation. y = 2x + 3

Answer: y = 2x + 3

Example 3

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

  1. The perpendicular gradient is −1 ÷ 2. m = −1/2
  2. Substitute (4, 3). 3 = −2 + c, so c = 5
  3. Equation. y = −½x + 5

Answer: y = −½x + 5

Example 4

Where do y = 3x − 2 and y = −x + 6 meet?

  1. At the crossing point the y-values are equal. 3x − 2 = −x + 6
  2. Solve. 4x = 8, x = 2
  3. Find y. y = 3(2) − 2 = 4

Answer: (2, 4)

Example 5

Find the gradient of the line through (1, 2) and (3, 8).

  1. Find the change in y and the change in x. 8 − 2 = 6, 3 − 1 = 2
  2. Divide. 6 ÷ 2 = 3

Answer: 3

Example 6

Write down the gradient and y-intercept of y = 4x − 1.

  1. In y = mx + c, m is the gradient and c is the y-intercept. m = 4, c = −1

Answer: gradient 4, y-intercept −1

Example 7

Does the point (2, 7) lie on the line y = 3x + 1?

  1. Put x = 2 into the equation. 3 × 2 + 1 = 7
  2. y is 7, so the point is on the line.

Answer: Yes

Example 8

Find the equation of the line with gradient 2 that passes through (0, −3).

  1. The gradient is m and (0, −3) gives c. m = 2, c = −3
  2. Write the equation. y = 2x − 3

Answer: y = 2x − 3