If you can get in close enough, checking out someone's smell is a valuable way of finding Mr or Ms Right. Despite our aversion to smell and our much reduced olfactory areas in the brain (at least compared to dogs and horses) we are in fact surprisingly sensitive to it. Newborn babies and their mothers can identify each other by smell alone within hours of the birth – which is one reason why we now like to make sure that the baby goes straight on the mother's breast as soon as it is born. This is something that we share with most other mammals. In sheep and goats, the mother learns to recognise its newborn young by smell within 24 hours, and in the following days will allow only that lamb to suckle. And the lambs themselves learn to identify the right mother to suck from in the same way, though they are, perhaps understandably, a bit slower and it usually takes a couple of days' exposure to the mother's smell.

In fact, smell provides one of the best markers of who you really are. The reason for this is that your smell is determined by the same set of genes, the major histocompatibility complex genes (MHC), as your immune system. It is part of who you are, your personal chemical signature. The MHC gene complex is particularly susceptible to mutation, producing new immune complexes with each new generation. This is probably just as well, as these are our first line of defence against bacteria and viruses which are themselves undergoing constant genetic change.

Our immune-system genes have evolved to be almost as changeable as virus genes in an effort to track the ever-changing biological threats that we face from them. So smell may be one way of checking out who's a good bet and who's not, but it's not the only function of smell in this context. Female moths famously dribble molecules of an incredibly powerful scent into the air. Male moths can detect these scents in the tiniest quantities from hundreds of yards away and find them quite irresistible. These sexual attraction scents are known as pheromones and occur widely in the animal kingdom, including monkeys. There has been some debate as to whether or not they occur in humans, but, in fact, there is considerable evidence to suggest that they do.

There do appear to be significant differences between the sexes in their respective sensitivity to odour: women are much more sensitive than men. There is now quite a lot of evidence that women in particular are quite good at identifying their children and their lovers by scent alone. However, we are by no means perfect at this, it must be said, and it is probably just as well that we don't manage our social world by smell rather than by vision – we would be likely to make an inordinate number of embarrassing mistakes if we did. However, it seems that, having identified the right person, smell plays a very important role in sexual arousal for women in a way it doesn't for men. Perhaps as a result, women rate smell as more important in mate choice than men do, whereas men rely much more on visual cues, reflecting the fact that men tend to make up their minds about a prospective mate from further away than women do. Women need to get up close and personal.

In a large questionnaire-based study, Jan Havlicek, Tamsin Saxton, Craig Roberts and their colleagues found that women rated odour as more important than visual cues in a range of non-sexual contexts (such as meal choice, flower choice and attention to unfamiliar landscapes) as well as in contexts of sexual arousal and lover choice, but men did not. For men, visual cues were much more important, especially in sexual contexts and lover choice.

Some years ago, Kate Willis, then one of my students, ran an experiment to determine whether men could tell when a woman was ovulating by smell alone. Six women each wore a T-shirt on three successive nights during each of the four weeks of their menstrual cycles. At the end of each week, 80 men were then asked to sniff the six T-shirts and rate them on a simple scale of pleasant to unpleasant. To avoid contamination, the women had to be non-smokers, and they had to avoid highly spiced foods and using scented soaps or perfumes or hormonal contraceptives while they were involved in the study. The results were very clear: T-shirts that had been worn around the time of ovulation were rated by the men as being significantly more pleasant than those worn at other stages of the menstrual cycle, and as more pleasant than those worn by post-menopausal women or women who were on hormonal contraceptive pills. It seems that, in some indefinable way, men are more attracted to women when they are ovulating, and can in effect detect when ovulation is occurring. Or, to put it the other way around, women use olfactory signals to entice men into coming closer when they are ovulating.

Such effects work both ways, of course. Androstenol is one of a family of steroids formed as a natural by-product of testosterone, the so-called male hormone. It's responsible for the slightly musky smell that men naturally have, and is one of the components of truffles. In an infamous experiment, three psychologists, Gustavson, Dawson and Bonett, once sprayed androstenol around half the cubicles in men's and women's toilets. Then the researchers recorded how often users who had a free choice of all the cubicles (ie none were occupied) entered the ones treated with androstenol. What they found was that men tended to avoid the androstenolised cubicles – having ventured in, they would usually back hastily out and find an androstenol-free one instead. But women apparently found the androstenolised cubicles rather congenial – even if not irresistible – and used them more often than the untreated ones. In contrast, when the same cubicles were later sprayed with a related by-product of testosterone produced in the liver that serves very different physiological functions from androstenol, neither sex exhibited any preference.

In an updated version of this experiment, Tamsin Saxton and her colleagues at Liverpool University applied androstadienone (another of the same family of testosterone-derived steroids) to the upper lips of women at a speed-dating event. In speed-dating (for those of you who have yet to experience this novel form of mating market for the ultra-busy), the women sit around the room at tables and the men spend five minutes with each one in turn, moving on one place when a bell is rung. At the end of the evening, everyone lists the names of the people he or she would like to meet again, and the organisers then exchange details for them. In this study, the androstadienone was concealed in clove oil to disguise it. To control for the effects of other odours, a third of the women had androstadienone plus clove oil, another third had just clove oil and the final third had plain water. That allowed the experimenters to separate out the effect of the clove oil substrate from the androstadienone itself. The results could hardly have been more conclusive. The women who had received the androstadienone not only rated the men they met at the speed-dating event as more attractive than did the women in the other two groups, but they were also significantly more likely to ask to see them again. Somehow, the androstadienone acts on deeply buried brain mechanisms to create a rosier-than-reality view of the hulking brute before you.

In a variation on this, Angeliki Theodoridou, Ian Penton-Voak and colleagues gave subjects either a single dose of the hormone oxytocin through a nasal spray or a placebo control that had all the same ingredients of the spray except for the oxytocin. Then they asked them to rate the trustworthiness and attractiveness of photographs of nearly 80 different faces, half of them male and half female, all posed with a neutral expression. Those who had had the oxytocin spray rated the faces as more trustworthy and more attractive than those who had had the placebo control.

Who said romance was dead? And this perhaps explains why a good sniff of a perfume or aftershave close up can sometimes turn your head.

This is an edited extract from The Science of Love and Betrayal by Robin Dunbar