The retail sector is a tricky one to invest in due to the ever-shifting balance between e-commerce and brick-and-mortar stores. Retailers that are growing often do so at anemic rates, while retailers that are shrinking quickly go belly up.

The Dow Jones Retail Titans 30 Index, which tracks the 30 biggest retailers on the market, reflects that tug of war. The index rose just 4%

over the past 12 months, compared to the S&P 500's 14% gain.

A young woman looks into a shop window as two boys walk by.

Source: Getty.

In this market, investors must spot the disruptors -- the companies that benefit from the paradigm shifts instead of being skewered by them. Let's take a closer look at three such disruptors: Amazon (NASDAQ:AMZN), TJX Companies (NYSE:TJX), and Inditex's (OTC:IDEXY) Zara.

An unstoppable e-commerce giant

Amazon's e-commerce business is built upon the bones of crushed brick-and-mortar retailers. Its mobile app turned stores into giant showrooms for online purchases, and its Prime ecosystem locked in users with discounts, free shipping options, streaming video, free e-books, cloud storage, and other perks.

Thanks to the growth of its high-margin AWS (Amazon Web Services) cloud business, it can afford to expand its Prime ecosystem with groceries, apparel, brick-and-mortar stores, and other products. Amazon is also expanding that ecosystem into higher-growth markets like India and the Middle East.

Research firm CIRP estimates that Amazon finished the second quarter with 85 million Prime members in the U.S. -- a 35% jump from a year earlier. It also claims that the average Prime member spends $1,300 on the site annually, compared to $700 for non-members. Amazon's ongoing disruption of the retail market can be easily seen in this comparison of its revenue growth to Wal-Mart's over the past ten years.

AMZN Revenue (TTM) Chart

Source: YCharts

The business of buying inventories

When brick-and-mortar retailers get "Amazoned", they usually end up with a lot of excess inventory. That's where TJX Companies -- which owns off-price retailers T.J. Maxx, Marshalls, and HomeGoods -- comes in. TJX scoops up that inventory at discounts which are so steep that it can sell them at lower prices than Amazon and still make a profit.

It negotiates these low prices via a network of over 1,000 buyers that accumulate inventories from more than 18,000 vendors in over 100 countries. As seen in the following chart, TJX's gross margin expansion directly coincides with the growth of Amazon -- making it a unique brick-and-mortar retailer that actually benefits from the death of traditional retailers.

TJX Gross Profit Margin (TTM) Chart

Source: YCharts

The rise of weekly, data-driven fashion

Many traditional apparel retailers are struggling with the rise of "fast fashion", in which cheap and fashionable apparel is cycled through stores within weeks instead of seasons. Inditex, one of the biggest fashion group in the world, popularized that model with its flagship Zara stores.

Instead of relying on single designers to dictate fashion trends, Zara uses a team of over 350 designers which study sales data from their stores worldwide on a daily basis. Zara delivers that sales data, which is enhanced with customer and staff suggestions, through a streamlined ecosystem of RFID chips and a dedicated data center.

Three models sporting Zara's latest looks.

Source: Zara.

In other words, Zara uses technology to absorb customer tastes, and its designers prototype new designs within five days. The entire cycle can take just over two weeks -- which keeps shoppers coming back to check out new looks.

That virtuous cycle continues, with returning shoppers delivering even more data to Zara for the development of new products. That's why Zara's annual revenue rose more than 70% between fiscal 2011 and 2016, and why it was recently ranked first in the apparel category of Brand Keys' customer loyalty study.

The key takeaways

Brick-and-mortar retailers thrived for decades. But many companies over-expanded and underestimated the impact of e-commerce. As many retailers shutter stores to find the right balance between brick-and-mortar stores and e-commerce, companies like Amazon, TJX, and Inditex are flourishing.

Amazon is "Amazoning" a growing list of retailers across multiple industries, TJX is gobbling up unwanted inventories and selling them at a profit, and Inditex arguably perfected the "fast fashion" model which other aging retailers are struggling to replicate.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.