IGCSE / O Level Mathematics · Topic 3 Coordinate geometry · Chapter 21 · pp. 250–276
Straight-line graphs
Every point on a grid has two coordinates, and every straight line has a gradient (how steep) and an equation (the rule its points obey). This chapter reads and draws lines, finds their equations, solves two equations at once by finding where lines cross, and measures a line segment.
Learning objectives
- Read and plot coordinates in all four quadrants, and use them to describe shapes.
- Read the value of a point on a scale that is not marked in whole numbers.
- Find the gradient of a line from two points, including horizontal and vertical lines.
- Write the equation of a line as y = mx + c and as ax + by + c = 0, and find parallel lines.
- Draw a line from its equation and solve simultaneous equations graphically.
- Find the length and midpoint of a segment, the line through two points, and a perpendicular line (Extended).
Book exercises: 21.1 to 21.15 and Student assessment 1 (pp. 250–276). Exercises 21.13 to 21.15 are Extended content.
Coordinates
🔑 Key ideas
- The origin is the point (0, 0), where the x-axis (across) and the y-axis (up) cross.
- A point is written (x, y): x first (along), then y (up or down).
- Going right or up is positive. Going left or down is negative.
💡 “Along the corridor, then up the stairs”: always the x-coordinate first.
📘 Example 1 · P(−6, 4), Q(6, 4), R(8, −2). Find S so that PQRS is a parallelogram, then its diagonals' crossing point and area
- In a parallelogram PQ and SR are equal and parallel. PQ goes 12 across and 0 up.
- So S is 12 to the left of R: S = (8 − 12, −2) = (−4, −2).
- The diagonals cross at the midpoint of PR: ((−6 + 8) ÷ 2, (4 + (−2)) ÷ 2) = (1, 1).
- Check with QS: ((6 + (−4)) ÷ 2, (4 + (−2)) ÷ 2) = (1, 1). Same point. ✔
- Area = base × perpendicular height = PQ × (4 − (−2)) = 12 × 6 = 72 square units.
Reading scales
🔑 The recipe for any scale
- Take two labelled marks, e.g. 0 and 2.
- Count the small gaps between them (here 10).
- Value of one gap = (2 − 0) ÷ 10 = 0.2.
- Count gaps from a labelled mark to your point and multiply.
📘 Example 2 · A number line from 4 to 7 has 6 equal gaps. Point K is 3 gaps from 4
- One gap = (7 − 4) ÷ 6 = 0.5.
- K is 3 gaps from 4: 3 × 0.5 = 1.5.
- K = 4 + 1.5 = 5.5.
✏️ Try it
- Write the coordinates of the point 5 to the left of the origin and 2 up.
- A(1, 1), B(5, 1), C(5, 4) are three corners of a rectangle. Find D and the area.
- P(2, 1), Q(6, 1), R(8, 4). Find S so that PQRS is a parallelogram.
Answers
1. (−5, 2) · 2. D = (1, 4); area = 4 × 3 = 12 · 3. SR must equal PQ (4 across), so S = (8 − 4, 4) = (4, 4)
The gradient of a straight line
🔑 Key ideas
- The gradient is the steepness (slope) of a line. It is the same everywhere on a straight line.
- Gradient = .
- From two points (x₁, y₁) and (x₂, y₂): gradient = .
- It does not matter which point you call point 1, as long as you use the same order on top and bottom.
Reading the slope
| Line | Rise | Run | Gradient |
|---|---|---|---|
| Rises to the right | up (+) | right (+) | positive |
| Falls to the right | down (−) | right (+) | negative |
| Horizontal | 0 | any | 0 |
| Vertical | any | 0 | infinite (cannot divide by 0) |
📘 Example 3 · Gradient of the line through (−4, 3) and (8, −3)
- Point 1 = (−4, 3) and point 2 = (8, −3).
- Rise: y₂ − y₁ = −3 − 3 = −6.
- Run: x₂ − x₁ = 8 − (−4) = 12.
- Gradient = −6 ÷ 12 = −½.
- Check by swapping the points: (3 − (−3)) ÷ (−4 − 8) = 6 ÷ (−12) = −½. ✔ Falling line, negative gradient. ✔
📘 Example 4 · Gradient of the line through (1, 2) and (4, 11)
- Rise: 11 − 2 = 9.
- Run: 4 − 1 = 3.
- Gradient = 9 ÷ 3 = 3.
📘 Example 5 · Horizontal and vertical lines
- Horizontal line through (−4, −1) and (4, −1): rise = −1 − (−1) = 0, run = 8, gradient = 0 ÷ 8 = 0.
- Vertical line through (3, −4) and (3, 4): rise = 8, run = 3 − 3 = 0, so the gradient is infinite (undefined).
✏️ Try it
- Find the gradient of the line through (1, 3) and (4, 9).
- Find the gradient of the line through (−2, 5) and (2, 1).
- What is the gradient of the line through (3, −1) and (3, 6)?
Answers
1. (9 − 3) ÷ (4 − 1) = 6 ÷ 3 = 2 · 2. (1 − 5) ÷ (2 − (−2)) = −4 ÷ 4 = −1 · 3. The run is 3 − 3 = 0, so the line is vertical and the gradient is infinite (undefined)
The equation of a straight line
🔑 Key ideas
- Every point on a line obeys the same rule linking x and y. That rule is the equation.
- Horizontal line: y = number (e.g. y = 4). Vertical line: x = number (e.g. x = 7).
- A line through the origin: y = mx.
- Any other line: y = mx + c, where m = gradient and c = y-intercept (where it crosses the y-axis).
- Other form: ax + by + c = 0 with a, b and c whole numbers.
📘 Example 6 · Find the equation of the line through (−3, −2), (0, 1) and (3, 4)
- Gradient from (−3, −2) and (3, 4): (4 − (−2)) ÷ (3 − (−3)) = 6 ÷ 6 = 1.
- The line passes through (0, 1), so it meets the y-axis at 1: c = 1.
- Put m = 1 and c = 1 into y = mx + c: y = x + 1.
- Check with (3, 4): 3 + 1 = 4. ✔
Rearranging into y = mx + c
📘 Example 7 · Gradient and y-intercept of 2y = 6x − 4
- Divide every term by 2: y = 3x − 2.
- Compare with y = mx + c: m = 3 and c = −2.
📘 Example 8 · Gradient and y-intercept of 3x + 2y − 4 = 0
- Move the x term and the number to the right: 2y = −3x + 4.
- Divide every term by 2: y = −x + 2.
- m = − and c = 2.
📘 Example 9 · Write y = x + 1 as ax + by + c = 0 with whole numbers
- Multiply every term by 3 to clear the fraction: 3y = x + 3.
- Move everything to one side: 0 = x − 3y + 3.
- x − 3y + 3 = 0. Check (0, 1): 0 − 3 + 3 = 0. ✔
Parallel lines
🔑 Parallel lines have the same gradient
- y = 4x − 1 and y = 4x + 6 are parallel: both have m = 4. Only c changes.
- Always rearrange to y = mx + c before comparing.
📘 Example 10 · Line parallel to y = −3x + 1 through (−2, 4)
- Parallel, so the same gradient: y = −3x + c.
- Put in the point (−2, 4): 4 = −3 × (−2) + c = 6 + c.
- c = 4 − 6 = −2.
- y = −3x − 2.
📘 Example 11 · Is 2y = −x + 12 parallel to y = −x + 6?
- Divide by 2: y = −½x + 6.
- Its gradient is −½, but y = −x + 6 has gradient −1.
- The gradients differ, so not parallel.
✏️ Try it
- Find m and c for 2y = 8x − 6.
- Find the line parallel to y = 2x + 5 that passes through (1, 0).
- Write y = x − 1 in the form ax + by + c = 0 with whole numbers.
Answers
1. y = 4x − 3, so m = 4 and c = −3 · 2. y = 2x + c with 0 = 2 + c, so c = −2: y = 2x − 2 · 3. Multiply by 3: 3y = 2x − 3, so 2x − 3y − 3 = 0
Drawing straight-line graphs
🔑 Plot a line in three steps
- Rearrange to y = … if needed.
- Choose three x-values (e.g. 0, 2, 4) and work out y for each. Three points catch mistakes: they must be in a straight line.
- Plot the points and draw one ruled line through them, extended past the points.
📘 Example 12 · Draw y = 2x − 4
- x = 0: y = 2 × 0 − 4 = −4. Point (0, −4).
- x = 2: y = 2 × 2 − 4 = 0. Point (2, 0).
- x = 3: y = 2 × 3 − 4 = 2. Point (3, 2).
- Plot the three points and join them with a ruler.
📘 Example 13 · Draw 3x + 2y = 6 (quick method: the intercepts)
- Cover the y term: x = 0 gives 2y = 6, so y = 3. Point (0, 3).
- Put y = 0: 3x = 6, so x = 2. Point (2, 0).
- Check a third point, x = 4: 12 + 2y = 6, so y = −3. Point (4, −3).
- Join the points.
Solving simultaneous equations graphically
🔑 Key ideas
- Each equation is a line. A point on both lines satisfies both equations.
- So the crossing point of the two lines is the solution.
- Check by putting x and y into both original equations.
📘 Example 14 · Solve x + y = 5 and x − y = 1 graphically, then by algebra
- x + y = 5 passes through (0, 5) and (5, 0). Draw it.
- x − y = 1 passes through (1, 0) and (0, −1). Draw it.
- Read the crossing point: (3, 2), so x = 3, y = 2.
- Algebra check: add the equations: 2x = 6, so x = 3, then y = 5 − 3 = 2. ✔
- Both equations: 3 + 2 = 5 ✔ and 3 − 2 = 1 ✔.
When do two lines not cross once?
| Gradients | Intercepts | What you see | Solutions |
|---|---|---|---|
| Different | any | cross at one point | exactly one |
| Same | different | parallel lines | none (e.g. y − 3x = 1 and y = 3x − 3) |
| Same | same | the same line | infinitely many (e.g. 2x + y = 4 and 4x + 2y = 8) |
✏️ Try it
- Make a table of three points for y = 2x − 4 using x = 0, 2, 4.
- Solve x + y = 7 and x − y = 3 (graph or algebra).
- Explain why y = 2x + 1 and y = 2x − 3 have no solution.
Answers
1. (0, −4), (2, 0), (4, 4) · 2. Adding gives 2x = 10, so x = 5 and y = 2 · 3. Both have gradient 2 but different intercepts, so the lines are parallel and never cross
Length and midpoint of a line segment Extended
🔑 Two formulas
- Midpoint of (x₁, y₁) and (x₂, y₂) = (, ): the mean of each coordinate.
- Length = √((x₂ − x₁)² + (y₂ − y₁)²). It is just Pythagoras on the run and the rise.
📘 Example 15 · Length and midpoint for (1, 2) and (7, 10)
- Run = 7 − 1 = 6 and rise = 10 − 2 = 8.
- Length = √(6² + 8²) = √(36 + 64) = √100 = 10.
- Midpoint = ((1 + 7) ÷ 2, (2 + 10) ÷ 2) = (4, 6).
📘 Example 16 · Length and midpoint for (5, 6) and (1, 2)
- Run = 1 − 5 = −4 and rise = 2 − 6 = −4 (squares remove the minus signs).
- Length = √((−4)² + (−4)²) = √32 = 4√2 ≈ 5.66.
- Midpoint = ((5 + 1) ÷ 2, (6 + 2) ÷ 2) = (3, 4).
The line through two points Extended
📘 Example 17 · Equation of the line through (1, 1) and (4, 7)
- m = (7 − 1) ÷ (4 − 1) = 6 ÷ 3 = 2.
- Write y = 2x + c.
- Put in (1, 1): 1 = 2 × 1 + c, so c = −1.
- y = 2x − 1.
- Check (4, 7): 2 × 4 − 1 = 7. ✔
📘 Example 18 · Equation of the line through (3, −4) and (10, −18)
- m = (−18 − (−4)) ÷ (10 − 3) = −14 ÷ 7 = −2.
- Write y = −2x + c.
- Put in (3, −4): −4 = −2 × 3 + c = −6 + c, so c = 2.
- y = −2x + 2. Check (10, −18): −20 + 2 = −18. ✔
Perpendicular lines Extended
🔑 Key ideas
- Two lines at a right angle are perpendicular.
- Their gradients multiply to −1: m₁ × m₂ = −1.
- To get the perpendicular gradient: flip the fraction and change the sign.
| Gradient m | Perpendicular gradient | Check m₁ × m₂ |
|---|---|---|
| 2 | −½ | −1 ✔ |
| −3 | ⅓ | −1 ✔ |
| ⅔ | − | −1 ✔ |
| 0 (horizontal) | vertical line | no number |
📘 Example 19 · Line perpendicular to the line through (2, 6) and (6, −2), passing through (6, −2)
- Gradient of the first line = (−2 − 6) ÷ (6 − 2) = −8 ÷ 4 = −2.
- Perpendicular gradient: flip −2 (that is −2/1) to 1/2 and change the sign: ½. Check: −2 × ½ = −1. ✔
- Write y = ½x + c and put in (6, −2): −2 = 3 + c, so c = −5.
- y = ½x − 5.
🧪 Try it: line explorer
Point 1
Point 2
✏️ Try it
- Find the length and midpoint for (2, 1) and (10, 7).
- Find the equation of the line through (0, −4) and (3, −1).
- Find the line perpendicular to y = 3x + 1 that passes through (3, 2).
Answers
1. Run 8, rise 6: √(64 + 36) = √100 = 10; midpoint (6, 4) · 2. m = 3 ÷ 3 = 1, c = −4: y = x − 4 · 3. Perpendicular gradient −⅓. 2 = −⅓ × 3 + c = −1 + c, so c = 3: y = −⅓x + 3
Chapter summary
- Coordinates are (x, y): along first, then up. Scale value = (difference between labelled marks) ÷ (number of gaps).
- Gradient = rise ÷ run = (y₂ − y₁) ÷ (x₂ − x₁). Horizontal: 0. Vertical: infinite.
- y = mx + c: m is the gradient, c the y-intercept. Rearrange (divide every term) to read them.
- Parallel lines have equal gradients. Perpendicular gradients multiply to −1.
- Draw a line from three points. The crossing point of two lines solves their simultaneous equations.
- Extended: midpoint = mean of the coordinates. Length = √(run² + rise²). Line through two points: find m, then c.
📄 Practice questions
The book's Exercises 21.1 to 21.15 and Student assessment 1 are in the printable assignment for this chapter.
Mini-quiz
Source: Cambridge IGCSE Mathematics Core and Extended (4th edition, Pimentel and Wall), Chapter 21 (Straight-line graphs). Explanations, the Try it answers, the tool and the quiz are Guru Jazzy's own. This page is not made or endorsed by Cambridge or Hodder Education.