This article was updated on April 12, 2018, and originally published on July 18, 2017.

There are plenty of companies you could choose from if you wanted to benefit from the growing artificial intelligence (AI) market. I won't get into all of them, but it's safe to say that nearly all the big players in the tech sector -- like Apple, Microsoft, IBM, Intel, Facebook, and a slew of others -- know how important AI will be to nearly every industry and that it could add $15.7 trillion to the global economy by 2030, according to PwC.

But that's not helpful if you want to know which companies are making the biggest moves in the space, and which have the most potential to benefit. To help answer that, we need to take a closer look at NVIDIA Corporation (NASDAQ:NVDA) and Alphabet (NASDAQ:GOOG) (NASDAQ:GOOGL). These companies may differ in their approach to AI, but both deserve to be at the top of the list for AI investments. Here's why.

Concept art for artificial intelligence neurons

Image source: Getty Images.

Why NVIDIA is a top AI stock

NVIDIA is basically a tech investor's dream at the moment, mainly because its share price has gained more than 100% over the past 12 months. NVIDIA makes graphics processors that are used in computers for things like high-performance gaming, but the company has been taking its graphics processing unit (GPU) know-how and wisely applying it to AI businesses as well.

For example, the company has built a self-driving vehicle supercomputer -- the latest version is called DRIVE Pegasus -- which processes a massive amount of image information so that semi-autonomous cars can perceive the world around them. The latest Pegasus iteration will allow automakers to create Level 5 autonomy (full self-driving) and NVIDIA says the tech will be available to carmakers later this year. Audi, Toyota, Tesla, and others are already using earlier versions of the company's AI tech for their semi-autonomous vehicles and NVIDIA believes its total addressable market for AI-powered self-driving cars will be about $8 billion in 2025.

In fact, NVIDIA believes that its total addressable market for all AI will be around $40 billion between 2020 and 2025. That includes everything from self-driving cars to AI cities and GPU-powered deep-learning data centers.

The company's data center segment is a growing AI opportunity because more and more companies are looking to GPUs to power intense image processing on their servers. Microsoft and Amazon are already using the company's chips for some of their AI data centers and Goldman Sachs analyst Toshiya Hari thinks NVIDIA already holds nearly 90% of the market for chips used for computer-training tasks, a part of the machine learning and AI markets.

One thing investors should know is that NVIDIA's "top AI stock" designation comes from the company's potential in the space, and not necessarily from its current revenues. In fiscal fourth quarter 2018, which ended in January 2018, the company brought in just 4.5% of its total revenues from the automotive market (which includes its Pegasus Drive PX system) and about 21% from its data center business. Meanwhile, GPU sales for gaming accounted for nearly 60% of revenue.

But the potential here for NVIDIA is too large to ignore. Graphics processing is an integral part of many AI learning systems, and NVIDIA's chips are some of the best in the business. With automakers already betting on the company's AI computer and tech companies looking to NVIDIA for their AI data centers, it's only a matter of time before the company's AI revenues follow its opportunities.

Why Alphabet is a top AI stock

Like NVIDIA, Alphabet is pursuing AI in several different ways, but one of the most important is using it to serve up better ads to its users.

Alphabet's Google debuted its Smart Bidding learning system in 2016, which uses machine learning to better automate bids on AdWords and DoubleClick. Google said at the time that the system accounts for many more factors than a person or team could determine, in order to make ads more efficient. The importance of serving up the most relevant ads becomes clear when you consider that Google is expected to earn more than 80% of all U.S. search ad revenue by 2019, according to data from eMarketer.

But Google has been very persistent in expanding its AI footprint in other areas as well. The company is currently fighting for more market share in the public cloud computing space and it's using artificial intelligence services to do it. Google offers machine learning capabilities to developers through its open-source software library, called TensorFlow. The software works on Google's competitors' platforms as well, but some rivals -- namely Microsoft and Amazon -- have been so concerned that TensorFlow could help Google gain more cloud market share that they've teamed up to create their own machine learning tools for developers.

Alphabet also began making its own AI chips a couple of years ago and is now on its  second-generation, called the Tensor Processing Unit (TPU), which is used for its cloud services and for user-facing services like Search and Gmail. 

And, of course, the company is using its AI to build some of the most advanced driverless cars. Google spun out its self-driving car business into its own company, called Waymo, in 2016, but it still falls under the broader umbrella of Alphabet companies. The opportunity for Alphabet here is in using AI-powered self-driving technology to earn revenue from self-driving car services. Waymo is already conducting public tests of driverless vehicles in Arizona and it recently announced that it will roll out a commercial self-driving ride-hailing service in some U.S. cities later this year

But Alphabet's biggest opportunity for AI remains in how it's used to sell more ads. Google's ad revenue accounted for 84% of Alphabet's total revenue in 2017, so it's very likely that the company will continue to apply its AI efforts to keep that trend going.

Take a buy-and-hold approach with AI

Remember that the artificial intelligence market is just getting started, which means that there's tons of time to reap the benefits, but it could also be a while before the market takes off. Investors looking to Alphabet and NVIDIA for AI gains will likely get them -- but should plan for the benefits to come over the next several years, as opposed to the next few quarters.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Suzanne Frey, an executive at Alphabet, is a member of The Motley Fool's board of directors. Teresa Kersten is an employee of LinkedIn and is a member of The Motley Fool's board of directors. LinkedIn is owned by Microsoft. Chris Neiger has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Alphabet (A shares), Alphabet (C shares), Amazon, Apple, Facebook, Nvidia, and Tesla. The Motley Fool is short shares of IBM and has the following options: long January 2020 $150 calls on Apple and short January 2020 $155 calls on Apple. The Motley Fool recommends Intel. The Motley Fool has a disclosure policy.