← Back to FractionRush

Straight Line Graphs

Grade 9 · Coordinate Geometry · Cambridge IGCSE Secondary Stage 9

y = mx + c

Gradient-intercept form of a line

Finding the Equation

From two points or gradient and one point

Parallel Lines

Equal gradients; different y-intercepts

Perpendicular Lines

Product of gradients = −1

Distance & Midpoint

Between two points on the coordinate plane

1. y = mx + c

Every straight line can be written in the form y = mx + c, where:

m = gradient (steepness and direction of the line)
c = y-intercept (where the line crosses the y-axis)
Examples:
y = 3x + 2: gradient = 3, y-intercept = 2
y = −x + 5: gradient = −1, y-intercept = 5
y = 4: horizontal line, gradient = 0, y-intercept = 4
x = 3: vertical line, gradient undefined
A positive gradient means the line slopes upward left-to-right; a negative gradient slopes downward.

2. Finding the Equation of a Line

Given the gradient m and a point (x₁, y₁), use: y − y₁ = m(x − x₁). Given two points, find m first, then substitute.

Gradient from two points: m = (y₂ − y₁) / (x₂ − x₁)
Example: Find the equation of the line through (1, 3) and (3, 9).
m = (9 − 3)/(3 − 1) = 6/2 = 3
y − 3 = 3(x − 1) → y = 3x
If both points give the same x value, the line is vertical: x = k. If both give the same y value, it is horizontal: y = k.

3. Parallel Lines

Two lines are parallel if and only if they have the same gradient. Parallel lines never intersect.

Lines y = 3x + 1 and y = 3x − 5 are parallel (both have m = 3).
Finding a parallel line: A line parallel to y = 2x + 7 through (0, 3) is y = 2x + 3.
Two distinct parallel lines have no point of intersection, so they form a system of simultaneous equations with no solution.

4. Perpendicular Lines

Two lines are perpendicular if the product of their gradients equals −1: m₁ × m₂ = −1.

If m₁ = 2, then m₂ = −1/2
The perpendicular gradient is the negative reciprocal.
Example: The line y = 4x + 1 has gradient 4. A perpendicular line has gradient −1/4.
Equation: y = −¼x + c for some value of c.
Flip the fraction and change the sign: gradient 3/2 → perpendicular gradient −2/3.

5. Distance and Midpoint

Between two points (x₁, y₁) and (x₂, y₂):

Distance = √[(x₂ − x₁)² + (y₂ − y₁)²]
Midpoint = ((x₁ + x₂)/2, (y₁ + y₂)/2)
Example: Find the distance and midpoint between (1, 2) and (5, 8).
Distance = √[(5−1)² + (8−2)²] = √(16+36) = √52 = 2√13
Midpoint = ((1+5)/2, (2+8)/2) = (3, 5)
The distance formula is just Pythagoras' theorem applied to the horizontal and vertical distances between two points.

Example 1 — Finding the Gradient

Find the gradient of the line through (2, 1) and (6, 9).

m = (9 − 1)/(6 − 2) = 8/4 = 2

Example 2 — Equation from Two Points

Find the equation of the line through (0, 3) and (4, 11).

Gradient: m = (11 − 3)/(4 − 0) = 8/4 = 2
y-intercept: At x = 0, y = 3. So c = 3.
Equation: y = 2x + 3

Example 3 — Perpendicular Gradient

Find the gradient of a line perpendicular to y = 4x − 1.

Original gradient: m₁ = 4
Perpendicular gradient: m₂ = −1/4 = −0.25

Example 4 — Midpoint

Find the midpoint of the segment joining (−2, 4) and (8, 10).

Midpoint x: (−2 + 8)/2 = 3
Midpoint y: (4 + 10)/2 = 7
Midpoint = (3, 7)

Example 5 — Parallel Line Through a Point

Find the equation of the line parallel to y = −2x + 1 passing through (0, 5).

Same gradient: m = −2
y-intercept: 5
Equation: y = −2x + 5

Line Grapher — y = mx + c

Use sliders to adjust m and c. The line y = mx + c is drawn on axes from −10 to 10.

Exercise 1 — Gradient from Two Points

1. Find the gradient of the line through (0,0) and (3,6).

2. Find the gradient of the line through (1,2) and (4,11).

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

4. Find the gradient of the line through (0,3) and (4,5).

5. Find the gradient of the line through (1,6) and (5,−2).

6. Find the gradient of the line through (−2,4) and (2,20).

7. Find the gradient of the line through (0,9) and (3,0).

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

9. Find the gradient of the line through (2,7) and (6,5).

10. Find the gradient of the line through (0,−5) and (2,5).

Exercise 2 — y-intercept from Equation

1. y = 2x + 3. What is the y-intercept?

2. y = 4x − 2. What is the y-intercept?

3. y = x + 5. What is the y-intercept?

4. y = 3x. What is the y-intercept?

5. y = 5x − 4. What is the y-intercept?

6. y = −2x + 7. What is the y-intercept?

7. 2y = 4x − 2. What is the y-intercept? (Rearrange first.)

8. y = −3x + 6. What is the y-intercept?

9. y + 5 = 2x. What is the y-intercept?

10. y = 3x + 8. What is the y-intercept?

Exercise 3 — Find y when x = 4

1. y = 2x + 3. Find y when x = 4.

2. y = x + 2. Find y when x = 4.

3. y = −2x + 5. Find y when x = 4.

4. y = 0.5x + 3. Find y when x = 4.

5. y = 4x + 1. Find y when x = 4.

6. y = 0.5x. Find y when x = 4.

7. y = −3x + 1. Find y when x = 4.

8. y = 3x + 2. Find y when x = 4.

9. y = −0.5x + 5. Find y when x = 4.

10. y = 5x + 2. Find y when x = 4.

Exercise 4 — Gradient of Perpendicular Line (give as decimal)

1. Line has gradient 2. Give the gradient of a perpendicular line.

2. Line has gradient 3. Give the gradient of a perpendicular line.

3. Line has gradient −1. Give the gradient of a perpendicular line.

4. Line has gradient 0.5. Give the gradient of a perpendicular line.

5. Line has gradient −4. Give the gradient of a perpendicular line.

6. Line: y = 2x + 1. Give perpendicular gradient.

7. Line: y = −3x + 2. Give perpendicular gradient (as decimal to 2dp).

8. Line has gradient 4. Give perpendicular gradient.

9. Line has gradient −0.5. Give perpendicular gradient.

10. Line has gradient 1. Give perpendicular gradient.

Exercise 5 — Midpoint (give x-coordinate)

1. Find the midpoint of (1,0) and (5,4). Give x-coordinate.

2. Find the midpoint of (2,3) and (8,7). Give x-coordinate.

3. Find the midpoint of (−3,1) and (3,5). Give x-coordinate.

4. Find the midpoint of (−4,2) and (2,8). Give x-coordinate.

5. Find the midpoint of (1,0) and (7,6). Give x-coordinate.

6. Find the midpoint of (0,2) and (4,6). Give x-coordinate.

7. Find the midpoint of (−6,1) and (2,5). Give x-coordinate.

8. Find the midpoint of (4,2) and (8,8). Give x-coordinate.

9. Find the midpoint of (−1,3) and (3,7). Give x-coordinate.

10. Find the midpoint of (1,4) and (6,8). Give x-coordinate.

Practice — 20 Questions

1. Gradient through (0,0) and (3,6)?

2. Gradient through (1,2) and (4,11)?

3. Gradient through (2,5) and (6,1)?

4. Gradient through (0,3) and (4,5)?

5. Gradient through (1,6) and (5,−2)?

6. Gradient through (−2,4) and (2,20)?

7. Gradient through (0,9) and (3,0)?

8. Gradient through (1,3) and (3,5)?

9. Gradient through (2,7) and (6,5)?

10. Gradient through (0,−5) and (2,5)?

11. y = 2x + 3. y-intercept?

12. y = 4x − 2. y-intercept?

13. y = x + 5. y-intercept?

14. y = 3x. y-intercept?

15. y = 5x − 4. y-intercept?

16. y = −2x + 7. y-intercept?

17. 2y = 4x − 2. y-intercept?

18. y = −3x + 6. y-intercept?

19. y + 5 = 2x. y-intercept?

20. y = 3x + 8. y-intercept?

Challenge — 8 Questions

1. y = 2x + 3. Find y when x = 4.

2. y = x + 2. Find y when x = 4.

3. y = −2x + 5. Find y when x = 4.

4. y = 0.5x + 3. Find y when x = 4.

5. y = 4x + 1. Find y when x = 4.

6. y = 0.5x. Find y when x = 4.

7. y = −3x + 1. Find y when x = 4.

8. y = 3x + 2. Find y when x = 4.