I'm sure most avid basketball fans can remember when "AI" was used to describe NBA great Allen Iverson. Nowadays, when you hear AI, the first thing many people think about is artificial intelligence (AI). It makes sense, too, when you consider just how prominent AI-related news has been over the past couple of years.

AI has been around for a while, but recent developments and the success of generative AI applications like ChatGPT have brought it to the forefront of many businesses. Because of this, there's been a surge in many stocks dealing with AI in virtually any capacity.

AI is transforming industries, and investors looking to get in on the action should consider the following two stocks. Investing $1,500 in each will give investors great growth potential, as well as dividend income -- a true two for the price of one.

1. Taiwan Semiconductor Manufacturing Company

From the outside looking in, Taiwan Semiconductor Manufacturing Company (TSM -2.02%)(TSMC) may not seem like an AI stock, but its role in the AI ecosystem is as important as almost any company right now.

If you read the last part of the last sentence and thought, "Even more important than Nvidia?" -- the answer may surprise you. Nvidia has been the stock market's biggest story for the past year or so, largely because of the importance of its graphic processing units (GPUs) to data centers used to train AI.

Nvidia's GPUs, however, heavily rely on the semiconductors that TSMC manufactures. As the world's leading semiconductor foundry, TSMC arguably produces the best semiconductors globally, attracting many top tech clients. Without the company's semiconductors, it's safe to assume that the quality of Nvidia's GPUs (and many other electronics) would suffer, causing a quality drop chain reaction.

The demand for TSMC's semiconductors should grow for the foreseeable future and continue the positive momentum the company's financials picked up since suffering from a slowdown in smartphone sales. Its second-quarter (Q2) revenue increased nearly 33% year over year and 10% from Q1.

TSM Revenue (Quarterly) Chart

TSM Revenue (Quarterly) data by YCharts.

For a while, smartphone-related semiconductor sales were the bulk of TSMC's revenue, but in this past quarter, high-power computing (which includes AI-related chips) accounted for 52% of its revenue -- up from 24% in Q1.

TSMC may encounter some geopolitical issues -- such as export restrictions -- but the company's long-term positioning remains strong. Its dividend yield of about 1.2% is also on par with the S&P 500's, incentivizing investors to remain patient as it potentially works through those roadblocks.

2. Microsoft

Microsoft (MSFT -0.82%) is an interesting AI play because of its partnership with ChatGPT's creator, OpenAI.

Microsoft has invested billions in OpenAI to help speed up its AI research and development, and the relationship has since become mutually beneficial. OpenAI uses the company's cloud platform Azure for its supercomputing power and infrastructure to train and run its AI models. In return, Microsft gets to deploy OpenAI's models in its suite of consumer and enterprise products.

Microsoft's portfolio of products -- including its Office software like Excel, Word, PowerPoint, and Teams -- is already one of the most used in the world, and this OpenAI integration has strengthened user experience and capabilities. You'd also have to think it's partly responsible for Office 365's 15% year-over-year revenue growth.

In Q3 of its fiscal year 2024 (ended March 31), Microsoft's revenue grew 17% year over year to $61.9 billion, led by its "Intelligent Cloud" segment, which includes Azure's business.

MSFT Revenue (Quarterly) Chart

MSFT Revenue (Quarterly) data by YCharts.

Microsoft's intelligent cloud segment generated $26.7 billion in revenue, up 21% year over year, and Azure and other cloud services revenue grew 31%. Azure lags behind Amazon Web Service (AWS) in market share -- 25% to AWS' 31% -- but has been making positive strides that should continue with new AI integrations.

As part of the partnership with OpenAI, Microsoft released Azure OpenAI, which gives customers Azure's computing and security capabilities while running all of OpenAI's models. In the competitive cloud computing industry, offering an essential one-stop shop is an advantage, and this partnership puts Microsoft on track to do that and gain ground on AWS.

Microsoft's dividend yield is less than 1%, so it's far from ideal for income-seeking investors. However, the payout is an added benefit to a stock with a price that has risen by more than 50% in the past 12 months.