The multitrillion-dollar retail industry has made many investors very rich. But before you throw your hat into this ring, you need to understand what the future holds for the industry, and how the ongoing e-commerce revolution is likely to shake out.

The future of retail
E-commerce remains in its infancy. Online sales have grown an average of 20% a year over the last decade. Yet in 2010, they only accounted for 4.6% of total retail sales! As the chart below suggests, this is about to change.

Source: Forrester Research (future estimates are projections and subject to change).

Forrester Research estimates that online sales will grow 10% a year between now and 2015, at which point the Internet will account for 11% of all retail sales. Exclude groceries, and that share jumps to 15%.

A full $30 billion of this growth is expected to come from mobile commerce -- namely, smartphones and tablets. Forrester predicts that this segment will expand from its current 1% of online sales to 7% by 2016.

An additional $14 billion is projected to come from social commerce sales -- websites like Facebook and LinkedIn (NYSE: LNKD) -- which Forrester predicts will grow 93% per year over the next five years.

The retail spectrum
At one end of the retail sector, you'll find companies that operate exclusively online, such as Amazon.com (Nasdaq: AMZN) and Netflix (Nasdaq: NFLX). By leveraging growth in e-commerce, these companies have expanded their respective revenues by an astounding 34% and 26% a year for the last five years. Both trade at price-to-earnings multiples well above the market average -- Amazon at 94, and Netflix at 61.

The other end of the spectrum harbors companies that focus primarily on physical stores, including Wal-Mart (NYSE: WMT) and Best Buy (NYSE: BBY). Both have seen quarterly same-store sales decline over the last few years, in part because they've failed to effectively harness the e-commerce revolution. Although Wal-Mart is the world's largest traditional retailer, it's only the fourth largest online. Best Buy (NYSE: BBY) doesn't even make the top 10. Perhaps that explains why these companies sell for only 12 and eight times earnings, respectively.

Source: Google Finance.

Somewhere between these two extremes lie companies bridging the divide. Office suppliers Staples (Nasdaq: SPLS), OfficeMax, and Office Depot provide the best examples of this middle ground. Staples ranks second only to Amazon in total online retail sales, while OfficeMax and Office Depot both make the top 10.

Although this structure explains the lion's share of the retail industry, lululemon athletica (Nasdaq: LULU) and Walgreen (NYSE: WAG) provide two notable exceptions. Both enjoy impressive same-store sales growth, even though neither has a particularly robust online presence. Lululemon owes its growth mainly to its tender age and the quality of its products, while aging baby boomers' rising demand for prescriptions underlies Walgreens' expansion.

The Foolish bottom line
Make sure to keep the future of e-commerce in mind when choosing retail investments. Although there are notable exceptions, the companies leading this revolution will generally offer your best bet to get rich from retail stocks. Just ask early Amazon shareholders -- like Fool co-founder David Gardner.

To kick-start your search, check out our free report "The Death of Wal-Mart: The Real Cash Kings Changing the Face of Retail."