Look at a map of Manhattan, in New York. Its streets and avenues form a grid, and they cross at right angles. The plan was laid out in 1811 to follow the shape of the island, so the whole grid is tilted: the avenues run about east of true north.
Put that map on a coordinate grid with measured east and measured north. Now no road is horizontal or vertical. An avenue climbs with a gradient of about : for every 1 km east, it goes about 1.8 km north.
What is the gradient of the streets that cross it at right angles? Make a guess. Are they steeper or gentler? Do they go up or down from left to right?
Engineers, game designers and map apps face this question all the time: their computers only know coordinates and equations, not protractors. By the end of the lesson you will be able to answer it in one line.
So far, lines have mostly come to you as . Today they arrive in a different form, such as , and we ask a new question about two lines: when do they meet at a right angle?
Try these first. Nothing is marked: just have a go.
On squared paper, a line goes through and . Its gradient triangle goes 4 right and 3 up.
Turn the whole picture a quarter turn () anticlockwise about , triangle and all. What is the gradient of the turned line?
What is the gradient of the line ?
Where does the line cross the -axis? Give the point.
Now explore. The black line goes through the origin, and its gradient triangle goes run across and rise up.
- Press Turn 90Β° (or move the turn slider). Watch the blue run and the red rise. Where do they point after the turn?
- Read and . Then change the triangle (drag the orange point, or use the buttons) and turn again. What happens to every time?
- Make a triangle with a negative rise. Does the pattern still hold?
- Press Horizontal line and turn it. What goes wrong with the gradients now?
Before you explore: a line has gradient . Turn it a quarter turn. What do you think the two gradients multiply to?
- After a quarter turn, the run and the rise swap places, and one of them changes sign: βrightβ turns into βupβ, but βupβ turns into βleftβ. That is why the tip of the triangle lands on .
- So the gradient is turned upside down and its sign changes. The product of the two gradients came out as every time.
- A horizontal line turns into a vertical one. The vertical line has no gradient, so there is nothing to multiply, even though the lines clearly meet at a right angle.
- Try-first 1. The triangle β4 right, 3 upβ (gradient ) became β4 up, 3 leftβ, so the turned line has gradient . Check: .
- Try-first 2. In the gradient is not : is not on its own. The points and are on the line, and from one to the other the rise is and the run is : gradient .
- Try-first 3. On the -axis , so and the line crosses at . The -term simply disappears: a quick way to find where a line crosses the axes.
Another form of a line: ax + by = d
A straight line can also be written with the -term and the -term on one side and a number on the other:
We call this the general form of the line. (Many books write ; here already means the -intercept, so we use . American books call βstandard formβ. Careful: in British schools, standard form means writing numbers like .)
Gradient and -intercept. Rearrange to : move the -term across, then divide every term by (when ):
In general, , so : the gradient is . Rearranging is safer than memorising this.
Intercepts (the cover-up method). Where the line crosses the -axis, : βcover upβ the -term and solve . Where it crosses the -axis, : cover up the -term and solve . For : gives , and gives .
Special cases. If the equation is , a vertical line . If it is , a horizontal line.
Why rearranging gives the same line
The line is the picture of every pair that makes the equation true. Adding or subtracting the same thing on both sides, or dividing both sides by the same non-zero number, never changes whether an equation is true. So and are true for exactly the same pairs: they are the same line in two outfits.
That is also why you must divide every term. Dividing only some of them is not doing the same thing to both sides, and it gives a different line.
And the cover-up works because a point on the -axis has , so the -term is and simply vanishes.
Perpendicular lines
Two lines are perpendicular when they meet at a right angle ().
Horizontal and vertical. A vertical line and a horizontal line are always perpendicular. They meet at the point .
Every other line. Two lines that are neither horizontal nor vertical, with gradients and , are perpendicular exactly when
The number is the negative reciprocal of : turn it upside down and change its sign. For example, the negative reciprocal of is , of is , and of is .
The rule does not apply when one line is horizontal: its gradient is , the other line is vertical and has no gradient (its gradient is undefined, because its run is ), and no number times gives .
Why the gradients multiply to β1
Take a line that is neither horizontal nor vertical. Its gradient triangle goes run across and rise up, so its gradient is .
Turn the whole picture a quarter turn anticlockwise about a point on the line. The turned line is at right angles to the original, because we turned it by exactly . The triangle turns with it, and keeps its size:
- the side that went run across now goes run up: the new rise is the old run;
- the side that went rise up now goes rise to the left: the new run is .
So the turned line has gradient
The run and the rise cancel, so this works for every such line, not just the ones you tried. Any other line at right angles to the original is parallel to the turned copy, so it has the same gradient. (Turning clockwise instead gives βrise to the right, run downβ: the same gradient again.)
The other direction is true too: if , then must equal , the gradient of the turned copy, so the second line is parallel to it, and so it is at right angles to the first. On the Deep dig page you can put the rule to work: do the three altitudes of a triangle meet in one point?
Four traps
- Upside down AND change the sign. The negative reciprocal of is , not (both lines would rise) and not .
- Opposite gradients are not perpendicular. and : one rises and one falls, but . Those lines cross at about . Always check that the product is exactly .
- No product rule for horizontal and vertical lines. and are perpendicular, but has no gradient. Think about the picture.
- Divide every term. From : , then (not ). Dividing by a negative number changes the sign of every term: gives .
The line at right angles through a point
Find the equation of the line that is perpendicular to and passes through .
Step 1 β Find the gradient of the given line
Get on its own. Subtract , then divide every term by :
The gradient is .
Step 2 β Take the negative reciprocal
Turn upside down and change the sign: .
Check: β.
Step 3 β Use the point to find c
Substitute into :
So the line is . Multiplying every term by and moving the -term gives the general form .
Step 4 β Is it sensible?
The point: β.
The picture: the original line rises gently (2 up for every 5 across); the new one falls steeply (5 down for every 2 across). A gentle climb and a steep fall, at right angles: that is what perpendicular lines look like.
A neat check: and . The numbers in front of and swapped and one sign changed, just like the run and rise in the quarter turn.
Two ways to find where a line crosses the axes
Where does cross the two axes?
Way 1 β Rearrange first
The -intercept is : the point . For the -axis, put : , so and : the point .
Way 2 β Cover up
: cover the -term, , so : the point .
: cover the -term, , so : the point .
Which is neater?
Both give and . For intercepts, the cover-up is neater: two one-step equations and no fractions. Rearranging is worth it when you also need the gradient.
Check that they agree: from to the rise is and the run is , gradient , exactly the from Way 1 β. Two intercepts are also the quickest way to draw a line given in general form.
What is the gradient of the line ?
A line has gradient . What is the gradient of a line perpendicular to it?
Back to Manhattan. An avenue has a gradient of about on our map. A street crosses it at right angles, so its gradient is about
The streets fall gently from left to right: for every 1 km east, about 0.56 km south. (With a tilt of exactly , the gradients are about and ; their product is exactly before rounding.) One line of algebra, no protractor.
Still stuck after the example? Hearing it from another teacher often helps. These videos were checked against this lesson. Try the questions again afterwards.
"Negative reciprocal" but why? slope of a perpendicular line Β· bprp math basics Β· about 3 min
Why turning a gradient triangle a quarter turn swaps the run and the rise and makes one of them negative, so the new gradient is the negative reciprocal.
Same idea, different words: This teacher is American: he says slope for gradient and writes y = mx + b for our y = mx + c.
Writing ax+by+c=0 as y=mx+c Β· Deasy Maths Β· about 13 min
How to rearrange a line equation step by step so that y is on its own, then read the gradient and the y-intercept, including when the y-term is negative.
Same idea, different words: This teacher says slope for gradient and starts from ax + by + c = 0 (everything on one side), where our lesson writes ax + by = d. Moving a term 'across' the equals sign means doing the same to both sides.
Puzzles about right angles
- Can a line be perpendicular to itself?
- Draw two lines that are both perpendicular to the same line. Can they ever meet? What does that tell you about their gradients?
- Is there a line that is perpendicular to every line through the origin?
What is the gradient of the line ?
A path to the river
A town plans a new footpath from a bus stop to the river. On the townβs map grid, 1 unit = 100 m, is measured east and north (the map and its numbers are illustrative). The main road runs along , and the bus stop is at . The path must leave the road at a right angle, from a pedestrian crossing at the stop. Answer the questions in order, and keep asking whether your answers make sense on a real map.
Part 1. On the town's map grid (1 unit = 100 m, measured east, measured north), the straight main road runs along the line
The bus stop is on the road. Check that really is on the road, then find the gradient of the road.
Part 2. The town is building a pedestrian crossing at the bus stop , and a straight footpath that carries on from it towards the river. To keep walkers on the road for the shortest time, the crossing, and so the path, must be at right angles to the road.
Find the equation of the footpath's line.
Part 3. The edge of the river is straight along the line . The footpath ends where it reaches the river. Find that point.
Part 4. The path runs from to the river at . Remember that 1 unit = 100 m.
1. How far east and how far north does the path go, in metres?
2. Without measuring, explain why the path is longer than 400 m but shorter than 600 m.
3. Why is a crossing at right angles to the road a good idea for walkers? Give one thing the real planners would have to think about that this straight-line model ignores.
π Work it out in your notebook first β sketch, calculate, then write your answer here in full sentences. A model answer appears after you submit, so you can compare.
- Geometry. Gradients turn βis this a right angle?β into arithmetic. You can test whether a triangle drawn on a grid is right-angled, or whether a four-sided shape is a rectangle, without measuring an angle.
- Shortest distance. The shortest path from a point to a line meets the line at a right angle. Pipes, footpaths and the βclosest pointβ in many computer programs use this.
- Computer graphics. In games and design software an anticlockwise quarter turn about the origin sends the point to : exactly the swap and sign change you saw in the gradient triangle.
- Coming later. In later years you will meet perpendicular lines again with vectors, and you will prove the rule a second way with Pythagorasβ theorem. Next, the unit task puts everything together.
Explain to a friend, with a drawing of a gradient triangle, why the gradients of perpendicular lines multiply to , and why the rule does not work for a horizontal line.
When would you rearrange into , and when would you use the cover-up method instead? Give an example of each.
- Introduction to Algebra (Art of Problem Solving) β Chapter 8, section 8.6 Comparing Lines (the book says slope for gradient)
The book goes deeper and its problems are harder. Read it after this lesson, with a pencil in your hand.