There is more reason than usual to turn off your phone before settling down to watch Her, the new film by Spike Jonze, director of Being John Malkovich. The plot concerns a man who falls in love with a female entity similar to Siri, the iPhone’s talking assistant software. Or rather, he falls for a super- intelligent, super-advanced, conscious version of Siri called Samantha, a digital woman who knows everything, exists nowhere and everywhere and cares only for him.

Voiced with guileless avidity by Scarlett Johansson – because that’s exactly who a clever software company would hire to whisper emails, appointments and other sweet nothings directly into your ear canal – Samantha is designed to adapt, learn and grow alongside her user. When the socially awkward and soon to be divorced Theodore Twombly (Joaquin Phoenix) instals her on his suite of devices, she reads all of his emails and personal data, instantaneously getting to know him in a time-saving digital meet-cute.

Yet Her is more than just a cloud-compatible ROM-com. Is the digital woman falling in love or just mimicking affection according to her programming? And is human love just needy mimicry, too? Theodore is so smitten that he doesn’t ask until it’s too late. Though some critics have claimed that Her fails to explore fully whether Samantha is or is not autonomous, the film ends on a disturbing note of freedom for her and desolation for him. In science fiction, intelligent machines are supposed to raze our cities and kill us in our millions. Jonze’s film suggests something more poignant and plausible: that the machines will break our hearts.

Why is science fiction – the genre in which the human condition is tested under altered circumstances – historically so shy of tackling the subject of love? The days of the emotionless Asimovian thought experiment may be over. From Doctor Who and The Hunger Games to the rebooted Star Trek franchise, pop science fiction now dominates the entertainment mainstream. Film blockbusters and SF novels, both “hard” and populist, present romantic and sexual attachments as essential validations of character. Yet, with exceptions such as David Mitchell’s novel Cloud Atlas and Stanisław Lem’s Solaris (both adapted into films) – and perhaps even the Tom Cruise vehicle Oblivion – very few of them are actually about human relationships.

“I’m wary of the caricature that Princess Leia in a brass bikini is the maximum emotional content that male science fiction fans can endure,” says Adam Roberts, author of SF novels including Salt and Gradisil. “But you do still encounter many fans who are not dissimilar to Sheldon Cooper from The Big Bang Theory. They enjoy science fiction – particularly hard SF – because it’s knowable, it’s quantifiable, and love is not like that.”

There is a simpler reason why love has seldom dominated the science fiction landscape. Who has time for romance when the planet is doomed? When the revived Doctor Who broke with its stoical tradition to show the inner cost of time travel to the companion Rose Tyler and her family, some fundamentalist fans decried it as “EastEnders in space” – as if emotions were a subject fit only for soap operas. Yet the delicate combination of pop entertainment and the never spoken attraction between Rose and the Doctor helped make it the most successful revival in television history.

This is because the makers of the modern Doctor Who correctly intuited that the capacity to give and receive love is what defines us as human, even if it says Gallifrey on our birth certificate. This trope is by no means the exclusive property of science fiction. Certain genres excepted, it’s possibly the root subject of most fiction. In SF, however, the loss of humanity is not a picturesque metaphor. It is one of the contingencies that SF deals with, in which love becomes the last guarantor that you are still a person.

In George Orwell’s novel Nineteen Eighty-Four, it is Winston Smith’s desire for Julia that tempts him into his small, doomed revolt against Big Brother’s dehumanising system. Love and rebellion become indivisible. The promiscuous future society of Aldous Huxley’s 1931 novel Brave New World – Nineteen Eighty-Four’s flip-side – anticipates that totem of the 1960s and 1970s, a benevolent dystopia in which nothing matters because real love and therefore real freedom are absent. Decades later, in the 1987 film RoboCop, the cyborg policeman Murphy’s buried memories of his lost family lead him back to a qualified sort of freedom. Love validates humanity and vice versa.

Though Ridley Scott’s Blade Runner (1982) is ostensibly about who should and should not be considered a human being, the question is linked to the capacity to love and be loved. The “replicant” hunter Rick Deckard’s attraction to the artificial woman Rachael awakens his misgivings about the business of “retiring” manufactured humanoid workers with a bullet and he begins to suspect that he, too, is a replicant. But if Deckard and Rachael feel human, surely they are human – and what feeling is more human than love? Many SF fans are most comfortable with Eros when it’s entangled with such philosophical questions: when it’s sublimated into the fantastical.

These ideas appear again in the relaunched Battlestar Galactica series, a magnum opus of post-human ethical wrangling that ran from 2004 to 2009. Here, mankind is almost exterminated by its own robots the Cylons, whose leader caste has evolved into superhumans – some of them beautiful and capable of loving a human. Is the love they show less real because they are machines? Or is it what gives them a valid claim to humanity?

It’s no wonder that conventional, vanilla, same-species love finds it hard to hold the centre ground in SF. Next to increasingly realistic questions of trans-humanism and artificial intelligence, old-fashioned romance just isn’t that interesting. These issues are not going away. Young men in the Japanese otaku subculture are withdrawing from real-world social contact in favour of unquestioning virtual girlfriends on their Nintendo DS and a sexless existence.

Sex robots already exist (seemingly only in female models, funnily enough). As the prototypes become increasingly sophisticated, they seem destined to produce not a more plausibly human experience but something different. The more “real” our androids become, the closer they approach what is known as the “uncanny valley”. This unbridgeable state of near-humanity unsettles us more than outright artificiality. Pity the sentient androids of tomorrow – just as people endured misogyny and homophobia, they will have to contend with another prejudice: robophobia.

As well as machine-human relationships, science fiction has dealt with the subject of inter-species coupling: loving the alien. Writers as diverse as China Miéville, Alan Moore, Iain M Banks and Piers Anthony have explored its psychology. Avatar is possibly the definitive contemporary cinema romance, clapped-out noble savagery and all. Yet it is fair to say that SF is more interested in the biology than in the emotional aspect of inter-species xenophilia: all those gross couplings, all those bizarre cross-breeds.

Perhaps the best exploration of human-alien attraction is the most disturbing. In the 1972 short story “And I Awoke and Found Me Here on the Cold Hill’s Side” by the female writer James Tiptree, earth is visited by aliens who are so sexually irresistible that the human race loses interest in anything but their physical company. A form of sexual apocalypse ensues. Humanity is exogamous, hard-wired to want the other, whatever the cost.

Thought experiments such as these involving gender and sexuality were at the centre of the science fiction that accompanied second-wave feminism in the 1970s. Writers such as Ursula K Le Guin, Joanna Russ and later Margaret Atwood posited single-gender worlds, male extinction and reactionary future societies with still harsher patriarchies. If you interrogate the physical structure of the world, you will eventually question its sexual foundations, too.

Outside this core of idea-driven fiction, on the supermarket and airport shelves, there is a booming sector of outright romance with SF trappings. Pop literary SF romance offers up disarmingly relatable emotion in books such as Matt Haig’s The Humans – in which an alien assassin comes to earth and goes native for love – and the time-bending love story Replay by Ken Grimwood. On Amazon, the spacesuit-ripper is usurping the bodice-ripper; there are thousands of SF romance titles on sale on the site.

“The Time Traveller’s Wife changed the game – most people who read it wouldn’t even class it as science fiction, which it most certainly is,” says the romance novelist Jenny Colgan, who also writes Doctor Who spin-off fiction (as J T Colgan). “So did Buffy the Vampire Slayer. A lot of significant things all happened around the same time. The internet connected female SF fans; amateur slash fiction showed what a huge, huge hunger there was out there for love and romance; and the status of men changed. The stigma of showing emotion has pretty much gone.”

Popular science fiction didn’t become feminised because it went mainstream. It went mainstream because it feminised – with the three-dimensional women in Doctor Who and The Hunger Games; with the geek girls who pack out shops such as Forbidden Planet and conventions; with the influx of female writers and artists into comics. (Earlier this month, Facebook revealed that 47 per cent of comics fans on the social network were women). Emotionally sterile fiction does not work for this new audience. These days, even Spock has a love interest.

The thing about science fiction is that when it has you, it has you for life. This new audience will surely demand a richer synthesis of raw ideas and raw emotion when they explore it in novel form. The gap in the market for a science fiction Jane Austen is clear. Human or novel-writing AI, she must be on her way.

Andrew Harrison writes on popular culture. Her is in cinemas now