Image source: Getty Images. 

If you don't have time to read this entire article, remember this old adage and you'll get the gist of what you should know: Don't put all of your eggs in one basket (or even two). The lessons of InvenSense's (INVN) fall are a bit more complicated than that, of course, but not by much. 

The last few years have been quite a ride for InvenSense investors. The company hit a high of about $22 per share in 2012, and then surpassed that in July of 2014 before starting its precipitous fall. It now sits around $7 per share. In percentage terms, the stock price has fallen nearly 73% from its high in 2014.

InvenSense's main business is in selling motion-sensing components for mobile devices. These gyroscope sensors are the technology that allows your phone to know when it's being tilted a certain way (so you can play games), or to turn the touchscreen display off when you raise your phone to your ear. 

The company has specialized in those motion sensors (and a few other technologies) and became the key supplier of this technology to both Apple (AAPL 1.01%) and Samsung (NASDAQOTH: SSNLF)

Here's where things started to fall apart for InvenSense. In order to gain the business of those two mobile giants, InvenSense sold its motion sensors at lower costs than it should have, putting a strain on margins. 

What exactly does that mean? 

Think for a minute about how inexpensive most products are at Wal-Mart. The makers of those products sell their goods to Wal-Mart at cheaper prices than they would elsewhere because of the company's massive reach. 

That's good for customers because they get products at a cheaper price, and it's good for Wal-Mart because it's getting goods at discount prices that customers want. But it can end up hurting the product makers because their profit margins are lower because they've discounted the price in order to reach a broad consumer market.

Sometimes that works out for the product makers, and sometimes it doesn't. Wal-Mart putting the squeeze on its suppliers is a well-known practice, but you can apply the same idea to Apple and Samsung squeezing InvenSense's sensor prices. 

Take a look at this chart showing the steep decline of InvenSense's operating and profit margins over the past few years: 

Image source: YCharts.

Apple and Samsung were able to demand low component prices that have crushed InvenSense's margins. It's easy to assume Apple and Samsung are the bad guys in this story. But of course, they function like any other company (or person) and don't want to overpay for anything. And that's why we need to look at InvenSense's exposure to these companies as well as the pricing pressures. 

InvenSense made the mistake of getting in the situation of receiving about 53% of its total revenue from just Apple and Samsung. The company has overexposed itself to these tech giants for several years, and only now is it starting to remedy that by focusing on other revenue segments

Unfortunately, the damage has already been done. 

The takeaway 

InvenSense's problems aren't unique. Plenty of other smaller companies face the same predicament when supplying large companies with products. At first, it seems like a massive opportunity to make components for a big company. But if prices aren't able to significantly increase over time, or the supplier is unable to balance its exposure to major players with other revenues, then it quickly becomes a major problem.

InvenSense has suffered from over exposure to Apple and Samsung, who also put intense pressure on the company's margins. Savvy investors would be wise to take those lesson to heart when evaluating investments in small companies.