When insects go foraging, they zoom off from their nest in complex zig-zag paths. How do they manage to find their way back home? And how do they manage to do so along a straight path? These questions are explored in an exhibit at the Royal Society Summer Science Exhibition, currently taking place at the Southbank Centre in London.

"Despite their small size, ants and bees can teach us a lot about the cognitive building blocks of intelligence, and inspire the design of artificial brains for autonomous robots," says Andrew Philippides of the Centre for Computational Neuroscience and Robotics at the University of Sussex, who helped put together the exhibit. And it turns out that some simple maths sheds light on what goes on in insect's brains.

The main navigation mechanism, used by most animals, is called *path integration* and involves a little geometry. Look at the zig-zag path shown in blue in the diagram below. It's a sequence of arrows, known as *vectors*.

Moving along vector *v _{1}* from the nest to point

*A*is the same as moving one step to the right and two steps up, so we can represent the vector

*v*as a pair of numbers

_{1}*v*. Similarly, we can write the vector

_{1}=(1,2)*v*from point

_{2}*A*to point

*B*as

*v*. Now let's add the two vectors as follows:

_{2}=(1,0)*v*=(1,2)+(1,0)=(1+1,2+0)=(2,2).

_{3}=v_{1}+v_{2}And now take the negative of the resulting vector *v _{3}*:

*v*= (-2,-2).

_{3}The new vector *-v _{3}* (taking two steps to the left and two steps down) points from point

*B*straight back to the nest! The same is true if we add any number of successive vectors and then take the negative: we always get a vector pointing from our current location back to the nest. So to know our way back home, we don't even need to remember all the vectors we travelled along — we simply add the current one to the last total.

Biologists believe that insects have innate mechanisms to determine
orientation and distance, which helps them represent each step in a foraging
path by something akin to the vectors we have explored here. Neural
processing enables them to add vectors as they go along, so they always
know how to get back home quick. And insects are not the only ones — the
technique explored here is sometimes called *dead reckoning* and it has
been known to sailors for a long time.

With this technique small errors in measuring and adding up vectors can accumulate as the insect goes along. Insects then use other mechanisms to correct these errors, for example comparing what they see now to what they remember the world looking like from the nest. Scientists make extensive use of vector mathematics to model these other mechanisms too.

*This article is based on the Maths Inside project, a collaboration of Plus and the Mathematics Promotion Unit (run by the London Mathematical Society and the Institute of Mathematics and its Applications), in conjunction with the How do insects find their way home? exhibit and the Royal Society. The Maths Inside project reveals the maths behind four specially chosen exhibits at the Royal Society Summer Science Exhibition. Click here to find out more about the project and to read articles accompanying other exhibits.*

## Comments

## I think I have watched a

I think I have watched a documentary many years ago, describing this mechanism for the ants at Sahara desert: they came out of the nest and whenever they were to change course they were performing a 360 degrees circle around themselves and this was supposed to help them orientate based on the position of the sun and the position of their nest. No matter how many times the ant changed direction, once it found the food it would go to the nest following a straight line!