Trust Elon Musk to bowl people over with a wild idea when they're least expecting it.

The entrepreneur announced Monday that his electric vehicle company, Tesla, has agreed to buy SolarCity, one of the nation's biggest names in solar energy, in an all-stock deal valued at $2.6 billion.

In a blog post, Tesla said bringing SolarCity under Tesla's roof will benefit both companies.

"By joining forces, we can operate more efficiently and fully integrate our products," the blog post reads, "while providing customers with an aesthetically beautiful and simple one-stop solar + storage experience: one installation, one service contract, one phone app."

Musk has previously described the deal with words such as "obvious," "no-brainer" and "incredibly compelling," while many financial analysts and investors are puzzled if not outright alarmed. When Tesla first floated the idea earlier this summer, its stock sank by more than 10 percent, while SolarCity's rose by about 15 percent.

Confused? Here's a quick rundown of what's going on.

What is SolarCity?

SolarCity is a major installer of solar panels. The technology can help consumers and businesses save money on their energy bills by converting the sun's energy into electricity. The company, which was founded in 2006 by two brothers who happen to be related to Elon Musk, accounts for more than a third of all solar-power generation systems that have been installed in U.S. homes. Musk himself is the chairman of SolarCity.

Why did Tesla offer to buy SolarCity?

Musk is trying to create a massive, clean-tech behemoth. On a conference call Tuesday, he said he wants Tesla stores basically to be a one-stop shop for electric cars, solar panels and home batteries.

Does this make sense?

To a certain extent. SolarCity could save on sales and marketing costs, and possibly gain access to new customers, if it had Tesla's help. Some analysts say SolarCity burns a lot of its money on customer acquisition; if those costs could come down, it would be a big benefit to SolarCity's business.

Under Tesla's control, SolarCity also could adapt more quickly to emerging trends. One of the cool things about having a solar panel or two on your house is that, depending on where you live, you can sell any excess power you don't use back to the utility. That puts a bit of cash back in your pocket. Although dozens of states have such programs, that's beginning to change as some states, such as Nevada and Michigan, have taken steps to roll back some of these programs.

While this spells potentially bad news for companies that purely focus on generating electricity with solar panels, it's potentially good news for companies that can sell linked systems that consist of both solar panels and home batteries. That way, consumers still get to store any excess energy they produce, even if they can't sell it back to the grid.

Tesla Motors unveiled its latest electric car, the Model 3, on March 31, with a lower price tag and an ambitious delivery date. (Jenny Starrs/The Washington Post)

Combining SolarCity's solar panels with the Tesla Powerwall home battery system appears to be precisely what Musk has in mind. Now imagine going a step further, using this solar-electric system to power the high-speed charger in your garage that keeps your Tesla topped up with juice. With the much-anticipated Model 3 entering production next year, you can bet that Tesla will be selling this bundle hard to consumers.

Okay. So why are some investors freaking out?

Well, some say there's no need for Tesla to buy SolarCity to gain all these advantages, particularly when both companies are struggling financially. SolarCity is in worse shape; its stock has fallen 60 percent from the beginning of the year, and a single share of Tesla is worth about 10 times as much. Meanwhile, as the cost of solar panels keeps falling, SolarCity may have trouble keeping pace with those changes and its business model may not be sustainable, said Sam Abuelsamid, senior research analyst at the market research firm Navigant.

"Given the close relationships between the two companies anyway, there's no reason they couldn't do the same kind of thing and bring SolarCity sales into the [Tesla] stores without buying the company," Abuelsamid said. "It wouldn't be the first time companies have had a partnership like that."

Are there other challenges ahead?

Musk is known for promising big outcomes — and then grappling with delays or setbacks that keep him from meeting his stated targets. It's possible that Musk could face bigger difficulties than expected merging two firms with different corporate cultures.

Other companies clearly have similar ideas as Musk; on Tuesday, BMW announced that it would start selling a home battery pack of its own.

In light of those moves, Tesla's bid for SolarCity may be as much about gaining an early edge on would-be rivals, outmaneuvering them in what's going to be a highly competitive industry, than perhaps anything else.

This post has been updated.