Elon Musk has flown so high, so fast, it is hard not to wonder when, and how, he will crash to earth. How could he not? Musk is so many things – inventor, entrepreneur, billionaire, space pioneer, inspiration for Iron Man's playboy superhero Tony Stark – and he has pushed the boundaries of science and business, doing what others declare impossible. At some point, surely, he will fall victim to sod's law, or gravity.

He is only 41, but so far Musk shows no sign of tumbling earthwards. Nasa and other clients are queuing up to use his rockets, part of the rapid commercialisation of space. His other company, electric car manufacturer Tesla Motors, is powering ahead. Such success would satisfy many tycoons, but for Musk they are merely means to ends: minimising climate change and colonising Mars. And not in some distant future – he wants to accomplish both within our lifetimes.

Musk has a reputation for being prickly but when I meet him at SpaceX, his headquarters west of Los Angeles, he is affable and chatty, cheerfully expounding on space exploration, climate change, Richard Branson and Hollywood. Oh, and what he would like written on his Martian tombstone.

"The key thing for me," he begins, "is to develop the technology to transport large numbers of people and cargo to Mars. That's the ultimate awesome thing." Musk envisages a colony with 80,000 people on the red planet. "But of course we must pay the bills along the way. So that means serving important customers like Nasa, launching commercial broadcasting communication satellites, GPS satellites, mapping, science experiments. "There's no rush in the sense that humanity's doom is imminent; I don't think the end is nigh. But I do think we face some small risk of calamitous events. It's sort of like why you buy car or life insurance. It's not because you think you'll die tomorrow, but because you might."

Musk does not look the stereotypical plutocrat. He wears jeans and a T-shirt and sits behind a rather ordinary desk overlooking a car park, beyond which is Hawthorne, California's answer to Slough. He occupies the corner of a ground-floor, open-plan office that barely constitutes a cubicle. Walk just 40 metres, however, and there is a sight to quicken the pulse: SpaceX's factory, a 1m sq ft sprawl where engineers and technicians work on rockets, propulsion systems and casings for satellites. Suspended over the entrance is the cone-shaped capsule of Dragon, which last year became the first commercial vehicle in history to successfully dock with the International Space Station. SpaceX's next step is to fly humans, up to seven per Dragon, starting between 2015-17.

Space odyssey ... The SpaceX Dragon-2 spacecraft leaves the international space station. Photograph: AP Photo/Nasa



The final frontier has fascinated Musk since he was a boy. Growing up in Pretoria, the son of a Canadian mother and South African father, he taught himself coding and software, mixing geek talent with business nous: he designed and sold a video game, Blastar, by the age of 12. He later studied economics and physics in Canada and the US and moved to Silicon Valley, resolving to focus on three areas: the internet, clean energy, space.

Musk made his mark by co-founding PayPal, which transformed e-commerce, in 1999. He sold it three years later to eBay for $1.5bn. When, armed with this fortune, he turned to space exploration, the consensus said he was nuts. Building and launching rockets was the preserve of states – big states, because small states tended to spend a fortune trying and still fail.

He was influenced, he says, by Isaac Asimov's Foundation series, a science fiction saga in which a galactic empire falls and ushers in a dark age. "It's sort of a futuristic version of Gibbon's Decline and Fall of the Roman Empire. Let's say you were at the peak of the Roman empire, what would you do, what action could you take, to minimise decline?"

It takes me a moment to realise it's not a rhetorical question. Um, poison the barbarians' water supply, I joke. Musk smiles and shakes his head. The answer is in technology. "The lessons of history would suggest that civilisations move in cycles. You can track that back quite far – the Babylonians, the Sumerians, followed by the Egyptians, the Romans, China. We're obviously in a very upward cycle right now and hopefully that remains the case. But it may not. There could be some series of events that cause that technology level to decline. Given that this is the first time in 4.5bn years where it's been possible for humanity to extend life beyond Earth, it seems like we'd be wise to act while the window was open and not count on the fact it will be open a long time."

The SpaceX factory is vast and employs 3,000 people but is remarkably clean, bright and quiet. Technicians are casually dressed in shorts or jeans, sneakers or sandals. One group checks on a Falcon 9 launch system; across the corridor another works on protective fairings to encase cargo; a few yards from that a guy with goggles produces spare parts from a 3D printer; in a sealed lab next door colleagues with hairnets and blue coats inspect equipment for a launch later this year, the company's third supply mission for Nasa.

The factory exudes Silicon Valley's no-fuss ethos, a streamlined contrast to Nasa bureaucracy and bloat. The space agency, having retired its shuttle fleet, increasingly outsources launch services to Musk. SpaceX's focus on reusable technology has slashed costs – the company says it can get an astronaut to the space station for $20m, versus $70m charged by Russia for a seat on a Soyuz rocket. SpaceX is testing reusable prototype rockets that can return to Earth intact, rather than burn up in the atmosphere. If successful, rockets could be reused like aeroplanes, cutting the price of a space mission to just $200,000, for fuel.

'There are some important differences between me and Tony Stark' ... Elon Musk. Photograph: Bryce Duffy/Corbis Outline

Offering cheap, reliable delivery services to Nasa and commercial clients such as broadcasters is for Musk a means to perfect the technology that can get humans to Mars. He believes it could happen within decades – giving him a chance to live his last days there. "It'd be pretty cool to die on Mars, just not on impact," he jokes. Turning serious, he adds: "It's a non-zero possibility. I wouldn't say I'm counting on it but it could happen."

Other private companies are filling the void left by diminished, budget-squeezed state programmes, but Musk doesn't seem to worry about the competition. Amazon founder Jeff Bezos is making "relatively slow" progress with his company Blue Origin, he says. When I ask about Virgin Galactic, which is due to start commercial flights later this year, Musk chuckles, then turns diplomatic. "We're not really in the same ..." he pauses, looking for the right word, "the same area. What Richard [Branson] is doing is creating a sort of fun sub-orbital ride which lasts five minutes. [He's] trying to create something that's entertaining and exciting ... which is fine. But I wouldn't say we're competitors."

After a decade Musk's other company, Tesla Motors, is now also reaping success: booming sales of the all-electric model S have put it into profit and driven the share price to over $100. Last month Consumer Reports, an independent testing group, rated the car 99 out of a 100, saying it performed better than any other car – electric or conventional – it had tested. Tesla is now investing in supercharger stations across the US, and speeding up battery swaps, so drivers can travel coast to coast without worrying about losing power. The same will happen in other countries. A diminished band of sceptics warns that technical and distribution challenges may yet dull Telsa's sheen, and they could be right, but there is no denying Musk's feat in breaking the auto industry's paralysis to make a profitable, zero-emissions car. He plans to celebrate its coming of age by driving his children from Los Angeles to New York in a Tesla later this year.

Musk is evangelical about weaning us off fossil fuels. He is chairman of SolarCity, which provides solar power to California, and this week he revealed more detail on perhaps his most intriguing business idea yet, something some consider one of history's craziest-sounding transportation fancies: the Hyperloop, an 800mph self-powered ground-based system that could zip between LA and San Francisco in half-an-hour. On Monday he promised to reveal an "alpha design" by August 12. The project has geeks and transport wonks buzzing – Musk, after all, is Tony Stark, minus the goatee.

He squirms a bit when asked about the comparison. "It's kind of cool, I suppose. Obviously there are some important differences between me and Tony Stark, like I have five kids, so I spend more time going to Disneyland than parties. I feel a bit like Tony Stark's dad. I do like parties though." (Musk, twice divorced, has denied rumours he is dating Cameron Diaz.)

He made a cameo in Iron Man 2, playing himself, but prefers the latest film. ("It was quite a bit better. I liked it. The Mandarin could have been a better villain, maybe.") Musk laments that there has yet to be a great Mars movie (Arnold Schwarzenegger's Total Recall was "fun, but ridiculous") and says he has urged James Cameron to make one. "Does the world need Avatar 3? The world could use a good movie about establishing a base on Mars."

The world could also do with a wake–up call about climate change, he says. "Most people don't really appreciate the magnitude of the danger. The glacier melts are very stark. As you heat the planet up it's just like boiling a pot." The single most important counter-measure is to tax carbon, he says. That would, of course, benefit SolarCity but he denies commercial self-interest. SpaceX rockets use jet fuel and Tesla cars rely on carbon since fossil fuels produce about half of US electricity. "The reason we should do a carbon tax is because it's the right thing to do." Carbon dioxide's production of greenhouse gas is not factored into its price – in the jargon, an unpriced externality, he says. "It's economics 101, elementary stuff."

Musk acknowledges limited progress by the Obama administration but avoids criticising the president, which may or may not be related to a $465m federal loan guarantee which helped Tesla make the model S. He already funds environmental groups, and battles by proxy; would he consider setting up his own? He looks thoughtful. "I may need to do something like that."

One reason for caution, however, is the fiasco over Fwd.us, an immigration reform lobby group set up by Mark Zuckerberg, the objectives of which include "securing the borders" and "attracting the world's best and brightest workers". Musk signed up, along with other Silicon Valley luminaries, only to quit over the group's tactics.

"In order to get support they compromised and agreed to pay for essentially anti-environmental ads for a couple of key conservative senators. And that was not right. You should fight on the merits of the cause, not play some Machiavellian game where you agree to support things that are bad in order to get some things that are good passed."

The interview time is over and a queue of SpaceX managers and engineers has formed behind me, waiting to speak to the boss. Some clutch odd-looking tools and instruments, widgets in Musk's plan to fly humans 33.9m miles through space and land, safely, on the red planet. If all goes well he will be able to go himself, an elderly man taking a one-way trip. If he dies there, what should be engraved on his tombstone? Musk frowns a moment, then grins. "Holy shit, I'm on Mars, can you believe it?"