Elon Musk bought about $25 million worth of Tesla stock on Tuesday and Wednesday.

On Tuesday, Musk told Tesla employees the company was cutting 9% of its workforce.

The share purchases could be a signal to employees and Wall Street that he's still optimistic about the future of Tesla.

Tesla Motors CEO Elon Musk has purchased about $25 million worth of stock in his own company, according to a filing with the Securities and Exchange Commission on Wednesday.

Before these purchases, Musk owned about 19.8% of the company, MarketWatch reported. With the 72,500 shares he bought this week, he owns about 34 million Tesla shares.

The timing of Musk's purchases is noteworthy. On Tuesday, Musk announced via an email to employees that Tesla planned to let go of 9% of its total workforce. The filing shows he bought the shares on Tuesday and Wednesday.

It's possible this was a strategic move on Musk's part to reaffirm to workers and critics alike that he's still optimistic about the future of the company — an important signal as Tesla works to hit crucial production targets of its next-generation Model 3 electric vehicle.

It wouldn't be the first time Musk has undertaken such a gambit. As recently as May, Musk spent about $10 million on Tesla shares to counter growing concerns about the company's ability to meet those targets.

Also of note is that Musk has a somewhat unconventional pay package at Tesla in which he'll be granted additional stock options as the company hits milestones. Tesla's board of directors pegs the value of that package at about $2.6 billion over 10 years.

Tesla did not immediately respond to a request for comment.