The equation of a straight line is usually written in the form
y = mx + c
where m is the gradient and c is the y intercept.
Worked Examples
Find the equation of the line shown in the diagram.
The first step is to find the gradient of the line.
Drawing the triangle shown under the line gives
| gradient | = |
| = | |
| = |
So the value of m is . The line intersects the y-axis at 2, so the value of c is 2. The equation of a straight line is
y = mx + c
In this case
y = x + 2
Find the equation of the line that passes through the points (1, 5) and (3, 1).
Plotting these points gives the straight line shown. Using the triangle drawn underneath the line allows the gradient to be found.
| gradient | = |
| = | |
| = −2 |
The y intercept is 7.
So m = −2 and c = 7 and the equation of the line is
y = −2x + 7 or y = 7 − 2x
Draw the line x = 4.
Show me
For the line x = 4 the x-coordinate of every point will always be 4. So the points
(4, 0) (4, 3) (4, 5)
all lie on the line x = 4.
Draw the line y = 2.
Show me
For the line y = 2 the y-coordinate of every point will always be 2. So the points
(0, 2) (3, 2) and (5, 2)
all lie on the line y = 2.
Write down the coordinates of the point of intersection of these lines.
Show meThe graph in (b) shows that the lines intersect at the point with coordinates (4, 2).
The point with coordinates (4, 9) lies on the line with equation y = 2x + 1. Determine the equation of the perpendicular line that also passes through this point.
The line y = 2x + 1 has gradient 2.
The perpendicular line will have gradient − and so its equation will be of the form
y = −x + c
As the line passes through (4, 9), we can use x = 4 and y = 9 to determine the value of c.
| 9 | = − × 4 + c |
| 9 | = −2 + c |
| c | = 11 |
The equation of the perpendicular line is therefore
y = −x + 11
The graph shows both lines.

In the diagram above, not drawn to scale, AB is the straight line joining A (−1, 9) and B (3, 1).
Calculate the gradient of the line, AB.
Show meGradient of AB = = = −2
Determine the equation of the line, AB.
Show meEquation of line AB
y = mx + c ⇒ y = −2x + c
As it passes through (3, 1),
| 1 | = −2 × 3 + c ⇒ c = 7 | |
| i.e. | y | = −2x + 7 |
Write the coordinates of G, the point of intersection of AB and the y-axis.
Show mex = 0, so y = −2 × 0 + 7 = 7. G is point (0, 7).
Write the equation of the line through O, the origin, that is perpendicular to AB.
Show meGradient = = =
So y = x (as it passes through the origin)
Write the equation of the line through O that is parallel to AB.
Show meThe line parallel to AB has gradient −2, so the line through O has equation
y = −2x
