Every day, companies are using more artificial intelligence (AI) in their businesses. From the recommendation algorithms you see on e-commerce or streaming video sites, to fraud detection at major banks, to training doctors and performing breakthrough medical research, AI is driving some of the most exciting innovation in the world today.

From an investor's perspective, the AI industry is so exciting because its products, from software to processors to memory and storage, are becoming essential to every other type of business. As such, the tech leaders serving the AI market seem poised for tremendous growth over the next decade and beyond.

According to IDC, AI-specific spending is poised to more than triple between 2018 and 2022, from $24 billion to $77.6 billion, for a compound annual growth rate of 37.3%.

So which companies are the current leaders of the AI space? There are many out there, including many startups. However, the following three companies are undisputed leaders in their respective categories and would make great core holdings for any AI-themed portfolio. 

a human hand and a robot hand touch opposite sides of a thin computer screen.

These are the best artificial intelligence stocks. Image source: Getty Images.

1. Amazon.com

AI requires the collection of massive amounts of data, which is then fed into a machine-learning engine that "trains" an algorithm. The trained algorithm is then presented to new, incoming data and then produces an output based on its prior experience, in a process called inference.

All of this increasingly takes place in the public cloud, which has lots of advantages over company-owned data centers, including the cost of storage, the flexibility to spin up and down capacity as needed, and access to leading-edge tools from the deep-pocketed cloud giants.

The biggest cloud giant of all is Amazon.com (AMZN -1.65%), which far and away holds the No. 1 market share in the cloud space, with nearly 50% of the market. Amazon Web Services (AWS) is also growing quite strongly for a company of its size, up 35% last quarter, and with operating margins in the mid-20s. Not only that, but Amazon has also been investing heavily in research and sales for AWS, so the unit's ultimate operating margin is probably higher than today's figures. That 35% growth also came on the heels of several significant price cuts, which shows how much companies large and small are increasingly using the public cloud. According to IDC, worldwide GDP from digitally transformed businesses, or those that have moved to the cloud, will increase from 17% to 52% of world GDP between 2018 and 2023.

It's also not just the computing and storage infrastructure where Amazon is innovating in the AI market. In 2017, Amazon introduced SageMaker, an AI-as-a-service platform whereby companies can download ready-made algorithms, and either tweak them to their specifications or apply them to their own data set.

By housing where AI happens and making these complicated processes easier for customers, Amazon is not only a big user of AI but also a big enabler of AI usage in the economy at large.

2. NVIDIA

Another clear leader in AI is NVIDIA (NVDA 3.71%), the industry leader in graphics processing units (GPUs), which have traditionally been used in processing high-end graphics for video games and other visual applications.

As it turns out, GPUs are extremely well suited to the parallel processing needs of AI applications. Seeing this fact early on, NVIDIA, under CEO Jensen Huang, developed its CUDA software platform, upon which data scientists can program GPUs to process all kinds of data in addition to graphics. That combination of software and hardware expertise, along with its first-mover advantage in GPUs for AI, has given NVIDIA a big competitive advantage over would-be rivals in data centers.

Though NVIDIA is still coming out of this year's semiconductor downturn, its data center segment grew by 10.8% quarter over quarter, as spending in that segment has appeared to resume. NVIDIA's revenue and earnings, while still below that of a year ago, came in ahead of expectations.

On the third-quarter conference call with analysts, Huang also discussed some exciting growth drivers for NVIDIA, which has now adapted its new T4 data center GPUs not only for machine learning but now also for inference, specifically in speech training algorithms.

With the need to process massive data sets and execute quick, instantaneous inference, NVIDIA GPUs will need to be deployed in large numbers in the future, and NVIDIA's formidable moat makes it an undisputed leader in the space.

3. Micron

Speaking of processing, all of the data needed for training and inference requires huge amounts of storage and memory. Though there are a few names within this industry, the company with the most comprehensive portfolio and interesting prospects is Micron (MU -0.18%).

Micron is one of three leading producers of dynamic random access memory (DRAM), which feeds data to a processor, and one of six producers of NAND flash, one of the two main storage technologies. In addition, Micron is one of only two companies to produce a new kind of memory called 3D Xpoint, which is similar to NAND flash but much faster -- though more expensive.

Micron just unveiled its first 3D Xpoint solid-state drive in October, and while this new memory won't move the needle versus its other divisions for some time, it could differentiate Micron from others, as the only company to have all three technologies. 

AI, along with other new tech applications like 5G communications, will cause a boom in memory demand in the years ahead. Demand for DRAM is expected to grow near 20% on an annual basis, and demand for NAND flash is forecast to compound at a low 30% rate over the long term. While the memory industry is notoriously cyclical, and supply and demand can get out of balance at times, in the long run, demand for Micron's products should be there.

Besides producing memory chips, Micron has recently invested directly in the AI space itself. Last year, the company dedicated $100 million to funding early-stage AI start-ups, and in October the company acquired FWDNXT, a developer of software and hardware accelerators that speed up AI processes. Micron is now experimenting bringing FWDNXT's computing functions into the memory chip, which could pave the future of edge computing applications.

With its comprehensive memory portfolio and cheap valuation, Micron is another solid, if volatile, cornerstone of any AI portfolio.