Worked solution: find the equation of the line through (1,2) and (3,8)

Step-by-step working for this straight line and coordinate geometry problem, produced and checked by the solver.

Coordinates Answer checked
Answer
y=3x−1y = 3x - 1
  1. Gradient = change in y change in x
  2. Substitute
  3. Use and substitute one point to find c
  4. Write the equation
  5. Check with the other point

Change the numbers and solve your own

The method in brief

  1. Gradient m = (y2 - y1) ÷ (x2 - x1): rise over run.
  2. Put the gradient and one point into y - y1 = m(x - x1), then tidy to y = mx + c.
  3. Midpoint = ((x1 + x2) ÷ 2, (y1 + y2) ÷ 2).
  4. Distance = √((x2 - x1)² + (y2 - y1)²), which is Pythagoras on the two differences.

Full guide: Straight lines and coordinates.

More GCSE examples on this topic