Skip to content
Tutorials Center
My learning

Topics

Lesson 56 of 86 ยท Series, Coding and Relations

Direction Sense and Distance

Master direction sense questions: compass points, left and right turns, shortest distance with Pythagoras, shadow problems and a path calculator script.

A direction question tells a short story: someone walks a few kilometers, turns, walks again, turns once more, and finally stops. You are then asked how far the person is from the start, or in which direction the starting point lies. It looks like geography, but it is a drawing exercise with a little arithmetic on the side. If you draw a clean map as you read, the answer is almost always visible before you calculate anything.

In this lesson you will learn the compass, the rule for left and right turns, how to find the shortest distance with the Pythagorean theorem, and how shadows tell you where the sun is. You will also run a path calculator that follows any walk and reports where it ends, so you can test your own routes.

The compass and the turning rule

Start with the four main directions: North (N), East (E), South (S) and West (W). Clockwise from North they run N, E, S, W, and every step round is 90 degrees. The four in-between directions are North-East (NE), South-East (SE), South-West (SW) and North-West (NW), each 45 degrees from its neighbors.

flowchart LR
    N["North"] -->|"right 90"| E["East"]
    E -->|"right 90"| S["South"]
    S -->|"right 90"| W["West"]
    W -->|"right 90"| N

Turning right moves you clockwise round the compass; turning left moves you the other way.

The rule to remember is this: a right turn is clockwise and a left turn is anticlockwise, and both are relative to the way you are facing now, not to the map.

You face Turn right 90 Turn left 90
North East West
East South North
South West East
West North South

Two further facts speed things up. A turn of 180 degrees reverses your direction, whichever side you turn. A turn of 270 degrees right is the same as 90 degrees left, and 270 left equals 90 right.

The next script applies the rule to any compass point and any turn, in steps of 45 degrees. Change the inputs to test yourself before you read the output.

JS Turn calculator

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The last line is a good one to memorize: a 45 degree left turn from North faces North-West.

Drawing the path

Use graph paper in your head. Put the start at a dot, make North up and East right, and draw each leg as a line with its length written beside it. Mark the start with S and the end with E (or a letter from the question). Always redraw the compass after each turn, because the commonest mistake is mixing up left and right when the walker is facing south or west.

A second useful habit: write the facing direction at the end of every leg. If the story says "turns left" and you already wrote "facing west" for the leg before, then the new direction is South, and you do not need to rethink the rule.

Shortest distance with Pythagoras

When the walk finishes at a corner, the straight line from start to finish is the shortest distance. If the legs meet at a right angle, the straight line is the hypotenuse of a right triangle, so

distance squared = (first leg) squared + (second leg) squared.

flowchart LR
    S["Start"] -->|"5 km north"| A["Turning point"]
    A -->|"12 km east"| E["End"]
    S -.->|"13 km straight line"| E

The two walked legs form the right angle; the dashed line is the shortest distance.

Learn these right-triangle triples, because exam numbers are almost always built from them:

Legs Hypotenuse
3, 4 5
5, 12 13
8, 15 17
7, 24 25
20, 21 29
9, 40 41

Any multiple of a triple works too: legs 6 and 8 give 10, legs 9 and 12 give 15, legs 12 and 16 give 20.

Example 1. A man walks 8 km north, turns right and walks 15 km. How far is he from his starting point?

Turning right from north means east. The legs are 8 and 15, so the distance is 17 km, and the start is to his south-west.

Example 2. A girl walks 6 m west, turns left, walks 8 m, turns left again and walks 6 m. How far is she from the start, and in which direction?

Facing west, left is south: she walks 8 m south. Facing south, left is east: she walks 6 m east, cancelling the 6 m west. She is 8 m south of the start, because her east-west moves cancel exactly.

The net displacement method

For longer walks, do not try to follow the picture the whole way. Sum the movements by compass axis.

  • Add all the north legs and subtract all the south legs. Call the result the net north (negative means south).
  • Add all the east legs and subtract all the west legs. Call the result the net east (negative means west).
  • The distance from the start is the hypotenuse of net north and net east.

Example 3. A runner goes 15 m north, 20 m east, 3 m south and 15 m west. Where does he end up relative to the start?

Net north = 15 - 3 = 12. Net east = 20 - 15 = 5. Distance = 13 m, and the start lies to the south-west of him (he is north-east of the start).

The calculator below follows any walk made of distances and turns. It adds up the moves, prints the distance, and tells you where the start lies.

JS Path calculator

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Walk 2 returns 3 east, 0 north: the walker ends level with the start. Walk 4 ends 11.087 units away because a diagonal leg splits into two equal components of about 4.243. For exam-style questions the 45 degree legs usually come with right angles elsewhere, so you can still use the net method with the diagonal's components.

Shadow problems

Shadow questions use one fact from daily life: the sun rises in the east and sets in the west. A shadow always falls on the side away from the sun.

  • In the morning, the sun is in the east, so shadows fall west.
  • In the evening, the sun is in the west, so shadows fall east.
  • If you stand facing the sun, the shadow is behind you; if you stand with your back to the sun, the shadow falls in front of you.

Example 4. One morning after sunrise, Neha stood facing a pole, and the pole's shadow fell to her right. In which direction was she facing?

A morning shadow falls west, so her right hand points west. Facing south puts west on your right (turn clockwise from south to west), so she faced south.

Example 5. In the evening, Arun stands with his back to the sun. Which direction does he face?

In the evening the sun is in the west, so Arun's back is to the west and he faces east. His shadow falls in front of him, to the east.

A shadow question usually has a second step: once you know where the person faces, find what is on his left or right. Use the turning table above; never trust a guess.

Worked questions for practice

Example 6. Facing south-east, a person turns 90 degrees anticlockwise and then 180 degrees clockwise. Which direction does she face now?

South-East is 135 degrees clockwise from North. Anticlockwise 90 gives 45 degrees, which is North-East. Then a 180 degree turn gives 225 degrees, which is South-West.

Example 7. A man starts from a point and walks 12 km north, then 16 km east, then 12 km south. How far is he from the start?

The north and south legs cancel, so he is 16 km east of the start, in a straight line.

Example 8. From a point P, a car goes 9 km south, turns left and goes 12 km. How far is the car from P, and in which direction is P from the car?

Facing south, left is east. The legs are 9 and 12, so the distance is 15 km. P lies to the north-west of the car.

The fastest check on any answer is the sign test. Before you finish, ask: is the end north or south of the start, and east or west? Your final direction word must agree with those two signs.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. A man walks 24 m south, turns right and walks 7 m. How far is he from the start, and in which direction is he?

    Facing south, a right turn means west. The legs are 24 and 7, so the distance is 25 m. He is south and west of the start, so he is to the south-west.
  2. 2. One morning Anil stood so that the shadow of a tree fell on his left side. Which direction was he facing?

    A morning shadow falls to the west. If west is on Anil's left, he faces north.
  3. 3. A woman walks 12 km north, 16 km east and 12 km south. How far is she from the starting point?

    The north and south legs cancel, leaving 16 km east of the start.
  4. 4. Facing east, a boy turns right 90 degrees and then left 135 degrees. Which direction does he face now?

    East turned right 90 degrees gives South (180). Turning left 135 degrees gives 45 degrees, which is North-East.
  5. 5. A car goes 9 km south, turns left and goes 12 km. In which direction is the starting point from the car?

    Facing south, left is east. The car is 9 km south and 12 km east of the start, so the start is to the north-west of the car.

Summary

  • A right turn is clockwise and a left turn is anticlockwise, relative to the way you face.
  • A 180 degree turn reverses direction; 270 degrees on one side equals 90 degrees on the other.
  • Draw North up and East right, redraw the compass at each turn, and write the facing direction after each leg.
  • For right-angled paths use Pythagoras, and know 3-4-5, 5-12-13, 8-15-17 and 7-24-25.
  • For long walks add the net north and net east, then take the hypotenuse.
  • Morning shadows fall west and evening shadows fall east.

Next: Syllogisms, where a different kind of picture, the Venn diagram, decides which conclusions must follow.