Data: FactSet ; Note: Mag 7 is the "original" cohort: Apple, Microsoft, Alphabet, Amazon, Nvidia, Tesla, and Meta. ; Chart: Matt Phillips/AxiosThe original tech giants that carried the stock market out of the COVID-era have fallen behind the pack this year.Why it matters: It's a significant change in market leadership. The recent underperformance of the cohort known as the Magnificent Seven — which includes big AI names like Nvidia, Microsoft, Amazon and Meta — may suggest that investors are having doubts about the profitability of the boom in AI. And investors are rotating away from those spending on AI to those supplying the equipment, such as Micron Technology and Intel. Market wags have recently taken to calling this once-proud assemblage of stocks the "Lag 7." By the numbers: So far this year, the Mag 7 were — on average — down 3.1% through the close of trading on Friday. The S&P 500 was up about 8.7% over that period. Zoom in: Some tech giants have really struggled. Mag 7 mainstay Microsoft, down 18.1% in June, is on track for its worst monthly decline since late 2000. Meta has tumbled 11% in June through Monday's close. Amazon has fallen 11.2%, while Apple has slumped 9.7%. What they're saying: "This month points to increasing shareholder pressure to justify [companies' AI] spending," analysts with UBS Global Wealth Management wrote.Between the lines: The scale of the AI boom is creating a lot of uncertainty out there—even for tech behemoths who've seemed almost invulnerable to competitive threats for years.Case in point: Apple and Microsoft both announced product price increases driven by the soaring costs of memory chips.Memory chip prices have exploded as a result of demand from AI data centers. At the same time, rising AI costs have contributed to other tech companies — Alphabet for instance — raising billions of dollars more in capital, potentially diluting the value of existing shareholders.Reality check: The Mag 7 was — and is — an imperfect stand-in for the entirety of the tech sector or the AI boom.More recently, chip makers such as Broadcom and Micron — both tied to the AI boom — have been soaring even as the Mag 7 has lagged behind.Yes, but: The Mag 7 moniker became closely associated with big market winners in the early days of the AI narrative, so its recent stumbles do represent a shift.In late 2022, ChatGPT was released and the resulting AI frenzy helped end a bear market brought on by the outbreak of inflation and Federal Reserve interest rate increases.Seven giants — Apple, Alphabet, Amazon, Nvidia, Microsoft, Meta and Tesla — posted average gains of over 110% in 2023, earning them their nickname.What we're watching: Whether the tech giants writing checks — including those in the Mag 7 — can sustain the breakneck pace of AI investment, which has broadly boosted U.S. corporate profitability.That picture will likely become clearer during earnings season over the next few weeks. The bottom line: Even a tiny tap of the brakes on AI investment from big tech could have big implications throughout the market and the economy.