"You're a scientist, Mark," they said at Voyager. "Shake your science at them!"
In the past I have taken a couple of shots at demonstrating that fantasy and science fiction are pretty much the same thing. Primarily by focusing on 'magic' and arguing that it's just the natural operation of a world where different rules apply and therefore comes firmly under the remit of science. My own work so far wears the cloak and sword of fantasy but is in fact science fiction in as much as it's set in the future, involves technology in advance of our own, and has no magic.
Here I'm taking a different tack and having a go at saying what I think the real difference between fantasy and science fiction is (generally).
Science fiction is inclusive. We might describe it as the American dream, where everyone has a chance to make it big. In science fiction the power lies in technology that can be replicated and made available to the masses. The ideas are portable. Given the material and an understanding of the principles you can manufacture your death-ray on any planet, anyone may aim it and press the button. There's no sense of any right to power, any destiny to rule, any uniqueness required. Science fiction, whatever the politics overlaying any particular story, at its core leans towards egalitarianism.
Fantasy tends to be more focused on the individual. 'The Chosen One' is a fantasy trope and to some extent this trope infects nearly all fantasy, even when the author is struggling to avoid it. Magic and science may be able to be mapped onto each other, but the fact is that when you set a story in a world where 'magic' exists it almost always lies in the hands of a few special individuals and can't be taken from them, can't be shared.
In Harry Potter, for example, magic tends towards science, it's formulaic, we're shown how to learn it. The main thing that makes it 'magic' rather than 'just the way the world is' is that it only works for a tiny percentage of special people. The rest of us muggles can say 'Avada Kedavra' until the cows come home and nobody we point our wand at will die (believe me, I've tried). Imagine though if anyone could read those spells and they worked - imagine they were on the internet ... they would be a technology then, anyone could use them, they would be part of the world, and they'd be interchangeable with gadgets that performed the same function. It would just be a world with different laws of science - the book about such a place would be a work of science fiction.
So it seems to me that the important difference between science fiction and fantasy is one of equality of opportunity. Sure, a science fiction book may describe a horrible tyranny where an underclass are born into slavery to serve an elite. But at the core of it, the technology that is oppressing them will work for those slaves just as well as for the masters, the technology and the science behind it is neutral, the same laws of physics apply for everyone.
In fantasy we have items of power imbued with great magics. Often they are unique. Nobody else can make one. Owning it, wielding it, makes you the chosen one, gives you the chance to be hero or villain, a god perhaps. In science fiction the laws of the world are not local - everyone else has the chance to copy or reinvent your teleport device, regardless of how pure in heart they might or might not be, or what their lineage is.
In short, in space there is no chosen one.
[ Exceptions that prove the rule include, The Matrix, Dune, and Star Wars. Star Wars in particular is often cited as 'fantasy with spaceships'.]