Birds do it, bees do it – even humans instinctively understand and respond to vectors, such as when we catch a ball or take a shortcut. But as Robyn Arianrhod explains, the deceptively simple concept of vectors took a long time to find its mathematical language, and it is now offering surprising discoveries in ecology and neurobiology.
Anyone with a veggie patch or a fruit tree knows that insects can be a pest. They can also transmit diseases – mosquitoes, for instance, can carry malaria and encephalitis, among many others. These diabolical disease-carriers are called vectors.
But this story is about a different kind of vector – a happier one that carries not disease but a line from point to point. (The word vector comes from the Latin vehere: to convey.) Surprisingly, insects play a role in this story, too. For insects aren’t just pests. They’re a vital part of the ecological food chain, and they pollinate many of our food crops. Their populations are declining around the world, and in the hope that we can reverse this before it’s too late, these little creatures are finally being recognised for how environmentally important they are. But they’ve also become famous for their brains, and it’s in those tiny brains that this vector story begins.
In carrying out its precious pollinating, an insect buzzes about from flower to flower on a twisting journey in search of food. Yet it always finds its way home again – and remarkably, by the most direct route. In other words, no matter how tortuous its foraging path, it knows how to make a beeline for home. This extraordinary behaviour has been found in a variety of insects – notably bees and ants – and in various birds, animals and even shrimps. But how do they do it?
Astonishingly, they use a neurological form of mathematical vector arithmetic. As they meander along, these navigating creatures keep track of their course by adding vectors of the happier kind – the kind mathematics students learn to represent as an arrow, because mathematical vectors can encode both distance and direction. The arrow points in the required direction, and its length gives the distance.
Humans can do innate navigational maths too, of course. We can even do it in advance, by instinctively visualising the shortest distance between two nearby landmarks – for example, when deciding to take a shortcut across a paddock from point A directly to a farm gate at C, instead of following the boundary track from A to B to C. This is just the kind of thing that insects do, when they forage from A to B to C, then calculate AC. By reversing direction, this becomes their ‘home vector’, CA, which tells them how to make their beeline home.
If you studied vectors at school, you’ll recognise that the length and direction of this shortcut route is found from simple vector addition, adding up the arrows from A to B and from B to C via the triangle or parallelogram rule (above right). This rule says that any two vectors can be aligned tip to tail like this, and their sum will be the vector along the diagonal of the implied parallelogram.
In practice, of course, there are many more than two points on an insect’s journey, and at each new point it updates its distance vector by adding the new leg of the journey to the previously calculated cumulative vector. We’ll see just how clever those navigating birds and bees are shortly, but let’s put first things first. Although neurobiologists have shown that we and other creatures have an innate sense of vector maths, this is reverse engineering in hindsight. First, mathematicians had to invent vectors! It’s one thing to do something instinctively, and quite another to figure out what’s going on in a general, conceptual sense.
The winding road to vectors
In fact, learning to think abstractly has been a long journey for human mathematicians. Even the humble parallelogram rule was a long time coming – and it is more sophisticated than you might think at first glance. That’s largely because it embodies the idea of a vector having independent components. For example, when a vector c is composed from the sum of the independent vectors a and b, they can be thought of as the components of c. Sounds simple, doesn’t it? Yet 500 years ago, some of the best mathematicians in the world had trouble with the parallelogram rule – and therefore with the idea of independent components of motion, as you can see in the way they struggled to determine the shape of the path of a projectile.
Unfortunately, the impetus for this research was war, and the problem of precisely targeting an enemy with cannonballs, bullets and arrows. The 16th century Italian mathematician Niccolò Tartaglia was the first to take a serious shot at analysing the path of a cannonball. All he had at his disposal were his imagination and any data he could glean about how high and how far such a ball would go; there were no technological tools to visualise the trajectory as a whole. So he reasoned with his intuition, arguing that the cannonball would follow a straight line in the direction it was fired, until gravity slowed it down so much that it curved around and then simply dropped straight to the ground.
Harriot’s vector vision
Harriot’s point-blank trajectory: The law of inertia, formally laid out decades later in Newton’s Principia, is represented by the equal horizontal spacing of the vertical lines, indicating that the horizontal component of velocity remains constant (equal horizontal distances are travelled in each unit of time.) The law of free fall is represented by the horizontal line spacing, showing that the vertical distance fallen is proportional to the square of the time of fall (simplified here to 1 unit of distance fallen after the first second, 4 units after 2s, etc). The result is a parabola. Illustration: Greg Barton from Thomas Harriot’s Ballistic Diagrams.
You can see that this is not the right shape for a tennis ball’s trajectory, for example: if someone hits it across the net, it doesn’t drop straight down but arcs over to the other side of the court. But cannonballs are heavy, and most people back then assumed that heavier objects fall faster than lighter ones. So Tartaglia’s reasoning seemed to make sense.
It was another half century before two of the greatest minds in early modern science – Galileo Galilei and Thomas Harriot – independently solved the problem in the early 1600s. In fact, they solved two problems. First, without air resistance, heavy objects don’t fall faster than lighter ones – this is the law of free fall, which Harriot and Galileo expressed as an equation relating the distance fallen to the time of fall, and they showed that this is the same for all bodies falling under the same gravitational force. Second, without air resistance all projectiles trace out a parabolic path.
These were thrilling discoveries, especially when you remember that Harriot and Galileo were doing this from scratch. To find the law of free fall, they dropped balls of various weights from various heights and timed how long they took to fall to the ground. To figure out projectile trajectories, they took empirical evidence from newly published gunner’s manuals and meticulously fitted curves to this data. Then they worked out the theory.
They had little concept of vectors, but they glimpsed the idea that resistance-free projectile motion is made up of two components, each acting independently together (unlike Tartaglia’s vertical component acting by itself). For a horizontal shot, for example, there’s the constant horizontal velocity due to the shot, and the accelerated vertical motion due to gravity. When Harriot and Galileo combined these two independent motions graphically they showed, with beautiful simplicity, that the trajectory is parabolic (see above).
Today, with vectors in hand, high school calculus students can easily deduce this shape – for any angle of projection, not just a horizontal one – by resolving the force acting on the projectile into its horizontal and vertical components and then applying Newton’s second law of motion to each component.
In his legendary Principia of 1687, Isaac Newton had not only developed the laws of motion, he’d also used the parallelogram rule to study physical quantities such as forces or velocities. In fact, it was Newton who first clearly identified the two-fold nature of force and velocity – a nature that in hindsight we can call “vectorial”, because he defined these quantities in terms of two attributes: direction and magnitude. Vectors wouldn’t get their name, and all their mathematical rules, until the 19th century. But as we’ll see in the rest of this story, the Newtonian idea, along with a bit of trigonometry, is perfectly good enough for us to understand how those remarkable insects find their way home.
Tiny brains, trailblazing skills
Bees are not only experts in making beelines home. Once back in the hive, a bee knows how to tell its mates the location of any delicious and abundant food source it has discovered on its foraging trip. It does this via its amazing waggle dance, where it orients its body to give the direction (calculated relative to the Sun), with the duration and number of waggles communicating the distance.
External cues such as the position of the Sun are particularly useful in enabling insects and other creatures to monitor their direction of travel, but navigation also involves a purely internal method called path integration (PI). This is a process that uses the body’s internal movement cues to keep track of changes in direction and distance so that the insect can find its way to a given point – back to its starting point, for example, or from its hive to a known food source. And keeping track of direction and distance means keeping track of a vector.
Vectors and dead reckoning
Darwin suggested path integration (PI) might be analogous to dead reckoning. This term derives from the way mariners deduced their distance and direction of travel across open seas – deduced reckoning became “dead reckoning”. A sailor would tie evenly spaced knots in a rope, one end of which was tied to a log and thrown overboard. As the ship moved away, the log effectively stayed put; by counting the number of knots as the rope uncoiled, the sailor knew the distance travelled. He also knew the compass direction and the speed (in knots!) from the number of knots unravelled in a given time. In this way he could constantly update the ship’s position. This is analogous to physiological PI, where the brain progressively updates the body’s position vector.
Our brains can do this, too. I’ve already mentioned our ability to visualise shortcuts, but when the lights go out unexpectedly, we can still navigate our way across the room to the cupboard where we keep matches and candles, feeling our way around the furniture but also using internal PI to gauge the distance and direction.
It was Charles Darwin who first hypothesised the existence of navigational PI. In a letter in Nature on 3 April 1873, he noted that indigenous North Siberian travellers were able to keep to their course for long distances over icy terrain, even when they had to detour around geographical pitfalls, and when there were no stars to guide them. He suggested that all humans can do this – if not always to such a marvellous extent – by unconsciously calculating all the deviations we encounter along the way (see box, right).
The internal cues used for PI include balance and muscle signals, which offer a kind of in-built step counter. So counting steps is not just a fad for humans with mobile phones (which contain sensors, such as gyroscopes and accelerometers, that mimic physiological ones): it is the only way that some insects, such as desert ants in a featureless landscape, gauge the distance they’ve travelled.
Vectors: the third dimension
Other creatures, such as honeybees, determine distance using “optic flow” – the relative motion detected by the eyes as visual images whizzing past, or by animal whiskers or insect antennae detecting air flow. This internal sense of motion gives an estimate of speed, which is integrated with respect to time to produce the distance.
At least, that is how maths students would do it: dx–dt dt = x (plus a constant, although this is zero if the distance is calculated from the origin). Some researchers suggest that insect and other brains can do this literal calculus too. For example, in a 2020 paper showing that the decline in navigational ability in older humans is related to increasing errors in estimating velocity, former UCLA post-doc Matthias Stangl and co-authors defined PI as “the integration over time of a self-motion estimate, in the strict sense of vector calculus, to maintain an updated estimate of one’s position and orientation while moving through space”. And in his review of PI research, Thomas Collett, from the UK’s University of Sussex, defined it this way: “At an abstract level, the process of PI consists of adding up all the oriented lengths of segments along a path” – that is, adding distance vectors – “or equivalently, of integrating an individual’s velocity vector over time”.
Talking about vector addition and calculus is a way for us humans to get a handle on the extraordinary navigational ability of various species. But how mathematically sophisticated can a tiny brain be? For a long time, researchers assumed that this mathematical language was more analogical than actual. In recent years, however, neuroscience has progressed dramatically – for relatively simple brains, at least. For instance, fruit flies are not navigational superstars like bees and desert ants, but they still know how to get around – and it seems that their brains, which are roughly the size of a poppy seed, really do know how to do vector mathematics (see below).
Of course, like other insects, birds and animals, fruit flies do not draw arrows to represent their vectors. Just how they do it had long been a tantalising mystery, but in 2021, two groups of neuroscientists found the answer. Cheng Lyu and Gaby Maimon from the Rockefeller University, Larry Abbott of Columbia University, and Harvard’s Jenny Lu, Rachel Wilson and their team identified the neurons that enable fruit flies to perceive motion (through optic flow). The activity of these neurons – PFNd and PFNv cells – can be measured, with peaks or bumps occurring when the relevant neurons are active because the fly is on the move. But here’s the amazing thing: when these activity bumps are plotted across all the PFN neurons in the fly’s brain, a sinusoidal pattern emerges. The amplitude of this sine wave represents the fly’s speed, and the phase gives the angle or direction of travel. Ergo, it represents a vector!
Turning this velocity vector into a home vector happens downstream from the activity of the PFN neurons, but already the fruit flies are doing vector maths. Their field of vision is almost 360°, and their brains have four sets of these motion-sensing neurons – and four sine waves measuring their activity. Between them they encode the insect’s motion in the forward left and right directions, and similarly for the backward directions. In other words, these four sets of neurons encode the components of motion in these four directions.
But here is the really incredible thing. These four PFN vectors give the velocity components with respect to the insect itself, but this information is then fed into another set of cells, called hΔB neurons, which also have sinusoidal activity patterns. This time, though, these sinusoidal waves represent the velocity vector relative to an external cue such as the Sun. To achieve this, the neural circuitry in this tiny speck of a brain has performed another amazing mathematical feat, effectively rotating the original four component vectors so that they are now aligned to the angle of the Sun. Then the insect’s brain adds up these rotated vector components – not by using the parallelogram rule, but by adding sine waves.
“[W]hat’s happening here is an explicit implementation of vector math in the brain,” explained Maimon in an interview for Rockefeller University. “The result is an output vector that points in the direction the fly is travelling, referenced to the Sun” – just as sailors once oriented themselves with respect to the Sun and the stars.
From one brain to another
This kind of transformation from one reference frame to another – from the fly’s to the Sun’s in this case – is widespread in science. For instance, it’s fundamental to the physics of relativity. It also happens inside your mobile phone step counter. A common step-counting mechanism involves calculating the vertical acceleration of your heel as it strikes the ground. So, while the fruit fly needs to know its direction of travel relative to the sun, your phone needs to calculate steps in your (Earth-centred) walking frame, where your body is the vertical axis and the ground is the horizontal one. The phone-centred frame, however, is usually rotated compared with the Earth frame, depending on the orientations the device might take in your pocket or bag. The phone’s program uses a mathematical transformation from its own frame to yours so that the step counter chooses the correct vector components – the vertical ones due to your heel strike – from the raw, often random data collected by the phone’s sensors.
To take just one more tech example, this same kind of fruit fly mathematical toolkit, with its vector additions and geometric rotations, enables orientation and tracking in the artificial navigation systems that guide ships and robots.
The search is on to identify exactly how human brains enable us to navigate – in the hope that this might help improve diagnosis and treatment for people whose spatial skills have suffered due to injury or dementia. It’s an enormous task, given that a fruit fly brain has about 150,000 neurons in total, and we have around 90 billion. But the work on fruit flies is an exciting first step, by suggesting the way that insects neurologically do this navigational vector maths. Similar work has been done on bees, by an international team of researchers that included Thomas Stone and Barbara Webb from the University of Edinburgh and Rachel Templin, then at the University of Queensland.
Other researchers have also noticed that brain cells sensitive to direction have sinusoidal activity patterns, although not in such detail as the recent fruit fly research. In 2023, Pau Aceituno, Dominic Dall’Osto and Ioannis Pisokas – researchers at Einstein’s old school, ETH Zurich – reviewed all this evidence. They then explored various mathematical models for encoding direction, concluding that the sinusoidal one seen in various insect neural circuits is not merely a coincidence. Rather, it has evolved as the most noise-resistant arrangement – that is, the one that is least prone to errors as the data is encoded neurologically.
Mysteries of maths and magnetism
Speaking of evolution, Darwin declined, for lack of evidence, to speculate as to whether other creatures are better at innate navigation than we are. In the insect world, it’s hard to beat those clever bees for navigational prowess, but other species are also experts – and migrating birds certainly have an advantage over humans. For a start, they inherit from their parents the direction they need to take on their annual migratory journey. To keep track of this direction, though – when the wind blows them off course or when they stop off to eat or rest – they use not only the Sun and stars like an ancient mariner, but also Earth’s magnetic field. Researchers, including biophysical chemist Peter Hore from the University of Oxford, UK, and biologist Henrik Mouritsen from the University of Oldenberg, Germany, have discovered evidence suggesting a quantum mechanism that enables birds to ‘see’ these fields – and it, too, makes use of vectors: in this case, the spin vectors that represent the magnetic moments of elementary particles.
Living the vector dream
Recent research adds substance to the idea that navigation in humans and other creatures involves both external cues, such as the Sun or natural landmarks, and PI. Christopher Anastasiou and Naohide Namamoto from Queensland University of Technology, and their colleague Oliver Baumann from Bond University, showed that we learn the layout of a landscape better if we actively walk it – using our own internal sense of motion – rather than remotely studying a map or a video.
The physics of this discovery – and how it may give birds their own inbuilt magnetic compasses – is complex. So is the detail behind the fruit fly’s vectorial brain waves and all the other studies on PI. But it all owes much to the abstract mathematical language of vectors. So does much of the technology neuroscientists use to make their discoveries. For instance, spin vectors are key to structural and functional magnetic resonance imaging (MRI and fMRI), which allows researchers to observe the structure and function of the brain. So, while the navigational prowess of insects, birds and animals is truly amazing, it is utterly awesome that we humans can go beyond this innate form of mathematical ability. It’s been a slow journey, as the work on projectile motion illustrates. But ultimately, mathematicians have created the abstract language that has helped scientists unravel not just some of the brain’s secrets, but many other mysteries of the universe.
Originally published by Cosmos as Right line fever: the deceptively simple concept of vectors
Robyn Arianrhod
Robyn Arianrhod is a senior adjunct research fellow at the School of Mathematical Sciences at Monash University. Her research fields are general relativity and the history of mathematical science.
Read science facts, not fiction...
There’s never been a more important time to explain the facts, cherish evidence-based knowledge and to showcase the latest scientific, technological and engineering breakthroughs. Cosmos is published by The Royal Institution of Australia, a charity dedicated to connecting people with the world of science. Financial contributions, however big or small, help us provide access to trusted science information at a time when the world needs it most. Please support us by making a donation or purchasing a subscription today.