Wikipedia had an interesting segment on the general case where there are more than two industries:<p>&quot;In both Ricardian and H–O models, the comparative advantage concept is formulated for 2 country, 2 commodity case. It can easily be extended to the 2 country, many commodity case or many country, 2 commodity case.[17][18] But in the case with many countries (more than 3 countries) and many commodities (more than 3 commodities), the notion of comparative advantage requires a substantially more complex formulation.[19]&quot;