When Elon Musk mulled taking Tesla private in 2018, he posted on Twitter to tell the world about it. When he got stuck in traffic in 2016,

he tweeted the idea of an underground tunnel system to alleviate “soul destroying” congestion. And when he challenged President Vladimir V. Putin of Russia to one-on-one combat last month

On Monday, a regulatory filing with the Securities and Exchange Commission revealed that Mr. Musk, the billionaire chief executive of Tesla and SpaceX

and the world’s wealthiest person, had bought a 9.2 percent stake in Twitter, the social media platform where he has over 80 million followers.

The purchase appears to make Mr. Musk Twitter’s largest shareholder, ahead of the 8.8 percent stake owned by the mutual-fund company Vanguard and dwarfing the 2.3 percent stake of Jack Dorsey

Mr. Musk’s Twitter investment, which he has been accumulating since at least last month, was worth about $2.89 billion based on the closing price of the company’s stock on Friday.

Monday, after news of his buy-in sent Twitter’s share price soaring more than 27 percent, it was worth about $3.7 billion. The shares are a fraction of Mr. Musk’s reported $270 billion-plus net worth.

“Oh hi lol” he tweeted on Monday without elaborating after news of his investment had spread across Twitter. Mr. Musk, 50, did not respond to a request for comment. Twitter declined to comment.