2024 is in full swing, and many of the investment trends that dominated the previous year are still in play. The biggest one is generative artificial intelligence (AI), a technology that promises to revolutionize how people create, manage, and disseminate digital information.

Let's discuss why hardware provider Nvidia (NVDA -3.89%) and software company Palantir Technologies (PLTR 0.68%) could make great ways for investors to bet on this opportunity in February and beyond.

1. Nvidia

One of the most challenging things about the stock market is that truly spectacular companies rarely go unnoticed. After rising over 200% over the last twelve months, Nvidia fits the bill. But despite its recent bull run, the company still represents a good value for investors because of the sheer scale of the opportunity ahead of it.

Third-quarter revenue jumped 206% to $18.12 billion, driven by sales of data center AI chips like the H100. And net income increased more than twelvefold to $9.24 billion. But Nvidia isn't resting on its laurels. CEO Jensen Huang believes the company's products can unlock even more growth by serving sovereign governments, which are increasingly relying on its chips to build AI platforms to manage and mine domestic data.

Last month, Singapore's state telecom provider, Singtel, selected Nvidia as its partner to create national data centers to process information from local companies, universities, and governments to produce valuable insights. Similar programs may also roll out in Indonesia and Thailand, providing more diversification for Nvidia's AI revenue streams.

Despite its spectacular growth rate and growing addressable market, Nvidia continues to trade at a remarkably low valuation of just 31 times forward earnings, which means it isn't too late for investors to bet on the company's long-term success.

2. Palantir Technologies

The long-term AI opportunity isn't only about hardware and chips. Investors should also consider software-as-a-service companies like Palantir Technologies, which aim to make the technology useful for end consumers in a variety of different industries.

The world is becoming increasingly politically uncertain both at home and abroad. And Palantir has a long track record of licensing its data mining and machine learning tools to help public sector clients handle these challenges. The company made its name by helping the military track down Osama Bin Laden over a decade ago. More recently, it assisted the Immigration and Customs Enforcement (ICE) agency with its detention and deportation efforts during the Trump administration.

Man looking at his stock charts on the computer

Image source: Getty Images.

Palantir's government work may make it controversial with private sector companies who may want to take a more politically neutral stance. But with the rise of AI, the company can pioneer a new revenue driver in government contracts, where it has a better economic moat because of its security clearances and history with sensitive missions.

Palantir's third-quarter net income swung from a loss of $123.8 million to a gain of $80 million, capping off its first four consecutive quarters of profits under generally accepted accounting principles (GAAP). While the company is relatively expensive with a forward price-to-earnings (P/E) multiple of 62, it looks capable of growing into its valuation because of its healthy bottom-line momentum and new AI growth drivers.

Which stock is better for you?

Palantir and Nvidia are excellent choices for investors who want exposure to the software and hardware sides of the AI opportunity. But Nvidia looks like the better bet. Despite its substantial rally, the chip maker's valuation is still surprisingly low considering its explosive growth rate and growing addressable market.

Palantir is also a great company. But it's hard for any stock to match the lofty example set by Nvidia.