Skip to content
MathClicksIGCSE← All notes Cambridge IGCSE® Mathematics 0580 Extended Chapter 10 — Straight Lines and Quadratic Equations

10.1  Straight Lines

Coordinates, gradient, length and midpoint, the equation y = mx + c in all its forms, and the gradient rules for parallel and perpendicular lines.

Coordinates: naming every point in the plane

Two number lines crossing at right angles — the horizontal x-axis and the vertical y-axis — turn a flat page into a grid where every point has an address. The axes cross at the origin O, the point (0, 0), and they split the plane into four quadrants.

Key idea A point is named by an ordered pair (x, y): across first, up second. The x-coordinate says how far right of the origin (negative means left); the y-coordinate says how far up (negative means down). Order matters: (3, 2) and (2, 3) are different points.

Four points, one in each quadrant

x y O -3 -2 -1 1 2 3 1 2 3 -1 -2 -3 A (3, 2) B (-3, 1) C (-2, -2) D (1, -3)

Check each one against the rule: A (3, 2) is 3 right, 2 up. B (−3, 1) is 3 left, 1 up. C (−2, −2) is 2 left, 2 down, and D (1, −3) is 1 right, 3 down. Points on the axes are easy to misread: (0, 3) sits on the y-axis, and (3, 0) sits on the x-axis.

Watch out “Along the corridor, then up the stairs” — x before y, always. Swapping the coordinates is the classic one-mark giveaway on Paper 2, and it wrecks every later calculation (gradient, midpoint, length) if it happens at the start of a Paper 4 question.

Gradient: how steep, and which way

The gradient of a line, written m, measures its steepness: how far the line climbs for every one step you take to the right. A gradient of 3 means “up 3 for every 1 across”; a gradient of −3 means “down 3 for every 1 across”. A straight line has the same gradient everywhere — that is exactly what makes it straight.

m = riserun = y₂ − y₁x₂ − x₁ Gradient of the line through (x₁, y₁) and (x₂, y₂)

To find a gradient from two points, subtract the y-coordinates, subtract the x-coordinates in the same order, and divide. It does not matter which point you call first, as long as you are consistent top and bottom.

Rise over run: the gradient triangle for the line through A (1, 1) and B (4, 3)

x y O 1 2 3 4 5 1 2 3 4 A (1, 1) B (4, 3) run = 3 rise = 2 m = 2/3

Positive gradient

Uphill from left to right. The bigger m is, the steeper the climb: y = 3x is steeper than y = x.

Negative gradient

Downhill from left to right. y = 7 − 4x drops 4 units for every 1 across, so m = −4.

Horizontal lines: y = k

Every point has the same y-coordinate, so rise = 0 and m = 0. The line through (1, 3) and (5, 3) is y = 3.

Vertical lines: x = k

Run = 0, and you cannot divide by zero: the gradient is undefined, not 0. The vertical line through (2, 0) is x = 2 — it cannot be written as y = mx + c.

Example 1Find the gradient of the straight line through A (−2, 4) and B (4, 1).
1
Label the points so you subtract consistently: (x₁, y₁) = (−2, 4) and (x₂, y₂) = (4, 1).
2
Substitute into the gradient formula — y-coordinates on top, x-coordinates underneath, same order in both. m = (1 − 4)/(4 − (−2)) = −3/6
3
Simplify the fraction, and sense-check the sign: from A to B the line drops, so a negative gradient is right. m = −3/6 = −½
m = −½
Watch out Subtracting in opposite orders top and bottom — (1 − 4) over (−2 − 4) — gives +½, the wrong sign. Pick an order and keep it for both rows.
Exam tip When a line is drawn on a grid, pick two points where it crosses the corner of a square (lattice points) and count the squares for rise and run — but check the scales first. If 1 square is 2 units on one axis and 1 unit on the other, counting squares without reading the scales gives a gradient that is wrong by a factor of 2.

Length and midpoint of a line segment

A line segment is the piece of line between two endpoints. Two questions come up constantly: how long is it, and where is its middle? Both answers come straight from the horizontal gap x₂ − x₁ and the vertical gap y₂ − y₁ between the endpoints.

Key idea The segment is the hypotenuse of a right-angled triangle whose legs are the horizontal and vertical gaps. Length comes from Pythagoras; the midpoint is the average of the coordinates.
length = √((x₂ − x₁)² + (y₂ − y₁)²) Pythagoras on the two gaps
midpoint = ( x₁ + x₂2 , y₁ + y₂2 ) Average the x-coordinates; average the y-coordinates

The segment from P (−3, 2) to Q (5, 8): run 8, rise 6, length 10

x y O -3 -1 1 3 5 2 4 6 8 P (-3, 2) Q (5, 8) M (1, 5) run = 8 rise = 6
Example 2P is (−3, 2) and Q is (5, 8). Find (a) the coordinates of the midpoint of PQ and (b) the length of PQ.
1
(a) Average the x-coordinates, then the y-coordinates. midpoint = ((−3 + 5)/2, (2 + 8)/2) = (2/2, 10/2) = (1, 5)
2
(b) Find the two gaps first — run and rise. x-gap = 5 − (−3) = 8     y-gap = 8 − 2 = 6
3
Apply Pythagoras to the gaps. PQ = √(8² + 6²) = √(64 + 36) = √100 = 10
(a) M = (1, 5)     (b) PQ = 10
Why this works A negative gap does no harm: squaring kills the sign, so (−8)² and 8² give the same length. Distance is always positive.
Exam tip If the length is not a whole number, leave it as a surd like √45 or round to 3 significant figures (6.71) — the mark scheme accepts either unless the question says otherwise. Writing down 8² + 6² earns the method mark even if you slip on the arithmetic.
Watch out Do not stop at 64 + 36 = 100. Forgetting the square root at the end — giving 100 instead of 10 — is one of the most common lost marks on this topic.

The equation y = mx + c — and how to read any line

Every non-vertical straight line has an equation of the form y = mx + c. The two letters tell you everything about the line:

Key idea In y = mx + c, m is the gradient and c is the y-intercept — the line crosses the y-axis at (0, c). So y = −2x + 5 falls with gradient −2 and crosses the y-axis at (0, 5).

Exams deliberately serve equations in different costumes. Whatever the form, rearrange to make y the subject and then read off m and c:

FormExampleGradienty-intercept
y = mx + cy = −2x + 5−2(0, 5)
Terms swapped roundy = 7 − 4x−4(0, 7)
ax + by = d3x + 2y = 5  →  y = −32x + 52−32(0, 52)
Horizontaly = 30(0, 3)
Verticalx = 2undefinednever crosses the y-axis

Drawing a line from its equation

Method 1: table of values

Pick three x-values (three, so the third checks the other two), work out y for each, plot, and rule a line through them. For y = −2x + 5: (0, 5), (1, 3), (2, 1) — all in a line. ✓

Method 2: start at c, step the gradient

Mark the y-intercept (0, c), then from there go 1 across, m up (down if m is negative) and repeat. For 3x + 2y = 5, rearrange first, start at (0, 2.5) and step 1 across, 1.5 down.

Example 3Find the gradient and the y-intercept of the graph with equation 5x + 4y = 8.
1
Make y the subject. Move the x-term across first. 4y = 8 − 5x
2
Divide every term by 4 — not just the 8. y = 2 − (5/4)x
3
Read off m and c by comparing with y = mx + c. m = −5/4     c = 2
gradient = −54,  y-intercept = 2, at (0, 2)
Watch out Dividing only the constant — writing y = 2 − 5x — is the standard error. Every term gets divided by 4, including the x-term.

Line explorer

Slide m and c to steer the orange line. Then edit the points A and B — the read-out computes gradient, midpoint and length exactly as you should on paper. Try m = −1 (perpendicular to AB), then move B to (3, 6) for a fraction gradient.

Gradient m1
y-intercept c1
x y -6 -4 -2 2 4 6 2 4 -2 -4 y = x + 1 A B M

Finding the equation of a line

Every “find the equation” question is the same two-step hunt: find m, then find c. Once you know the gradient, substitute any known point into y = mx + c and solve for c.

Given the gradient and one point

  1. Write y = mx + c with the known m.
  2. Substitute the point’s x and y.
  3. Solve for c and state the equation.

Given two points

  1. Find m = y₂ − y₁x₂ − x₁ first.
  2. Substitute either point to find c.
  3. Check the equation with the other point.
Example 4Find the equation of the straight line through (1, 5) and (3, 11).
1
Gradient first. m = (11 − 5)/(3 − 1) = 6/2 = 3
2
So y = 3x + c. Substitute (1, 5) to find c. 5 = 3(1) + c  →  c = 2
3
Check with the other point: 3(3) + 2 = 11. ✓
y = 3x + 2
Exam tip Cambridge expects the equation in a fully simplified form — y = 3x + 2, not y − 5 = 3(x − 1). If your c is a fraction, a form like 2y = 6x + 1 is also accepted.

Parallel and perpendicular lines

Gradient is the key to comparing two lines. Lines with the same steepness never meet; lines at right angles have gradients locked together in a precise way.

Key idea Parallel lines have equal gradients: m₁ = m₂. Perpendicular lines have gradients that multiply to −1: m₁ × m₂ = −1, so m₂ = −1/m₁ — flip the fraction and flip the sign.
parallel: m₁ = m₂     perpendicular: m₁ × m₂ = −1 The two gradient rules

So a line perpendicular to one with gradient ⅔ has gradient −&frac32;; perpendicular to gradient −4 is gradient ¼. Check: ⅔ × (−&frac32;) = −1. ✓

Parallel pair y = ½x + 1 and y = ½x − 2, with the perpendicular y = −2x + 2

x y -4 -2 2 4 2 -2 y = ½x + 1 y = ½x − 2 y = −2x + 2

Before comparing gradients, get every equation into the form y = mx + c. The table shows four lines that look unrelated until you rearrange:

Equation as givenRearrangedGradientVerdict vs y = ½x + 1
y = ½x + 1—½the reference line
2y = x − 4y = ½x − 2½parallel (equal gradients)
y = −2x + 3—−2perpendicular: ½ × (−2) = −1
2x + 4y = 1y = −½x + ¼−½neither: gradients differ, product is −¼
Watch out Never read the gradient straight off a form like 2y = 3x + 1. The gradient is &frac32;, not 3 — divide by the coefficient of y first. This is exactly the trap in “find the gradient of a line perpendicular to 2y = 3x + 1”.
Key idea The perpendicular bisector of a segment AB is the line that passes through the midpoint of AB at right angles to it. Recipe: midpoint of AB, gradient of AB, flip-and-negate the gradient, then find c through the midpoint. Paper 4 asks for this almost every year — see Example 6.
Exam tip “Show that AB and CD are perpendicular” needs the product shown: m₁ × m₂ = −1 written down with the two values. Saying “one is the negative reciprocal of the other” without the numbers does not score the mark.

More worked examples

Example 5(a) Find the equation of the line parallel to y = 4x − 1 that passes through (1, −3). (b) Find the gradient of a line perpendicular to 2y = 3x + 1.
1
(a) Parallel means the same gradient, so m = 4 and the new line is y = 4x + c.
2
Substitute the point (1, −3) to find c. −3 = 4(1) + c  →  c = −7
3
(b) Rearrange to read the gradient: divide by 2. 2y = 3x + 1  →  y = (3/2)x + ½  →  m = 3/2
4
Flip the fraction and flip the sign; check the product is −1. perpendicular gradient = −2/3    (3/2 × (−2/3) = −1 ✓)
(a) y = 4x − 7     (b) −⅔
Example 6Find the equation of the perpendicular bisector of the line joining A (−3, 8) and B (9, −2).
1
Midpoint of AB — the bisector must pass through it. M = ((−3 + 9)/2, (8 + (−2))/2) = (3, 3)
2
Gradient of AB. m = (−2 − 8)/(9 − (−3)) = −10/12 = −5/6
3
Perpendicular gradient: flip and negate; check the product. m⊥ = 6/5    (−5/6 × 6/5 = −1 ✓)
4
Equation through M (3, 3) with gradient 6/5. y = (6/5)x + c  →  3 = 18/5 + c  →  c = −3/5
5
Clear the fractions for a tidy final form (multiply by 5). y = (6/5)x − 3/5  →  5y = 6x − 3
5y = 6x − 3
Exam trap Two classic wrong turns: using the gradient of AB itself (forgetting to flip and negate), and passing the line through A or B instead of the midpoint. The bisector must do both jobs: right angle and through M. If your line goes through an endpoint, you have bisected nothing.

Your turn

Practice set

  1. Write down the gradient and the y-intercept of y = 7 − 4x.
  2. Find the gradient of the straight line through (2, 3) and (6, 11).
  3. Find the midpoint and the length of the line segment from (−1, −2) to (5, 6).
  4. Find the equation of the line through (4, 1) that is parallel to 3x + 2y = 5.
  5. Find the equation of the perpendicular bisector of the line joining A (1, 2) and B (7, 10).

  1. Compare with y = mx + c: m = −4, y-intercept (0, 7)
  2. m = (11 − 3)/(6 − 2) = 8/4 → m = 2
  3. Midpoint ((−1+5)/2, (−2+6)/2) = (2, 2); gaps 6 and 8, so length √(36 + 64) = √100: M (2, 2), length 10
  4. 3x + 2y = 5 → y = −(3/2)x + 5/2, so m = −3/2; through (4, 1): 1 = −6 + c → c = 7: y = 7 − (3/2)x, i.e. 3x + 2y = 14
  5. Midpoint (4, 6); m₁ = 8/6 = 4/3, so m⊥ = −3/4; 6 = −3 + c → c = 9: y = 9 − (3/4)x, i.e. 3x + 4y = 36

Key points to remember

  • Coordinates are (x, y): across first, up second — and the order is not negotiable.
  • Gradient: m = rise ÷ run = (y₂ − y₁)/(x₂ − x₁), subtracting in the same order top and bottom.
  • Horizontal lines are y = k with m = 0; vertical lines are x = k with undefined gradient.
  • Length = √((x-gap)² + (y-gap)²); midpoint = average of the coordinates.
  • In y = mx + c, m is the gradient, c the y-intercept — rearrange any other form to make y the subject before reading them off.
  • To find an equation: find m first, then substitute one point to find c.
  • Parallel: m₁ = m₂. Perpendicular: m₁ × m₂ = −1. A perpendicular bisector uses the flipped gradient and the midpoint.

Where next?

✅ Mark scheme All notes

Progress is saved on this device only and appears on the notes home page.