You're not imaging things. Stuff is a little bit cheaper at Costco, Target, Walmart and Kroger this year.

All four companies have said in recent months that they lowered prices.

Costco: "Price is at the top of our list," Costco chief financial officer Richard Galanti told investors on Friday. "When prices are going down...we want to be the first to go down."

Costco (COST) is using its tax cuts savings to invest in higher wages for workers and lower prices for food, clothing and home essentials.

Walmart: "Price still matters. There are a lot of Americans that are counting every penny and every dime," CEO Doug McMillon said at Walmart's shareholder meeting last week.

Walmart's prices fell close to 4% from February through April, led by cheaper Cheerios, Heinz Ketchup and Old Spice body wash, according to a recent Raymond James survey. Cheerios fell by more than 40%. Walmart's prices for nationally-branded food were actually lower than both Dollar General and Family Dollar's.

Walmart (WMT) is the pricing leader, and it is forcing rivals to match its downward moves, according to Wolfe Research analyst Scott Mushkin. "The industry's fate goes squarely through Bentonville," he said.

Related: Walmart's online sales grow 33%

Target: Target has been lowering prices since the beginning of 2017 to win back customers.

"We believe that consumer perception of value at Target has not reflected how low our out-the-door prices are," chief executive Brian Cornell told investors last year.

Cornell has guided the company through a $7 billion investment phase, including slashing prices, to firm up sales.

In May, Target (TGT) said its strategy was working.

Checkout sales for regular-priced items increased more than $1 billion compared with last year. Target executive Mark Tritton attributed it to "the impact of our priced-right daily strategy."

Related: Walmart and Target are spending like crazy to stop Amazon

Kroger: Kroger isn't spoiling for price war, but it's prepared to fight.

"We're not going to lose on price, but we're not out there trying to lead the market down," CEO Rodney McMullen said to investors in March.

Kroger has "felt the negative consequences of a resurgent Walmart more than anyone," analyst Mushkin said.

Why prices are falling

The companies were coy about what was less expensive — and by how much — but it's clear that the price war in the grocery and retail world is intense.

Their moves buck the current pricing trend. Inflation has reached 2% and companies are facing rising costs on everything from oil to pulp.

But these companies are grappling with several threats: competition from each other, dollar stores and, of course, Amazon.

Promising low prices and great value is their key message to shoppers. Misjudging the cost of eggs or milk risks losing the purchase to rivals. Walmart and Target, for example, even offer price matching guarantees against other retailers. Costco has its own low-price adjustment policy.

These companies keep tabs on each other and make changes to prices on store shelves and online to stay ahead, experts say.

Discounts and promotions have mixed effects. Although markdowns can help them grow market share, boost sales and clear out extra inventory, cutting prices eats into profit margins.

A more subtle motive may drive big players to drop prices. They are turning up the heat on already struggling regional supermarket chains that can't afford go down, said supermarket analyst David Livingston. Winn-Dixie parent Southeastern Grocers and Tops, a chain in the Northeast, have recently filed for bankruptcy.

Related: Winn-Dixie parent plans to file for bankruptcy, close 94 stores

It is also getting harder for these companies to hike prices in the online shopping era.

"Prices are more transparent than ever," said Bill Duffy, an associate director for research at consulting firm Gartner L2. Shoppers can compare costs on Amazon, while Google product searches feature prices prominently.

Amazon's (AMZN) acquisition of Whole Foods last year has increased the pressure on grocers.

Kroger (KR) is the largest supermarket chain in the United States by revenue, and groceries make up 56% of Walmart's sales. Around half of Costco's sales come from selling food.

Amazon has a tested playbook for undercutting established players' prices to grab market share, and it's beginning to step up that strategy with Whole Foods. Amazon has lowered Whole Foods prices and Prime members now get 10% off purchases in an effort to change Whole Foods' "Whole Paycheck" reputation.

Related: Amazon made Prime indispensable - here's how

The entrance of German discounters Aldi and Lidl have are contributing to the price war, too.

In six Virginia and Carolina markets where the company has opened up stores, other supermarkets in the area lowered prices by up to 55% compared to places where Lidl wasn't around, UNC's Kenan-Flagler School of Business professor Katrijn Gielens found.

"Price competition is widely believed to further intensify in the coming years as Lidl expands," Gielens said. "There is little doubt that consumers will benefit."

—The previous version of this story incorrectly stated Kroger CEO Rodney McMullen's first name.