The Ricardian trade model
Closely associated with Ricardo’s insight, and indeed intimately connected with its validity, is the proposition that countries gain from trade. Both are illustrated most starkly in the standard diagrammatic depiction of the Ricardian trade model shown in Figure 1.1. Here two countries, A and B, are each able to produce two goods, X and Y, using a single factor of production, labour. Because each country has a fixed endowment of labour and a fixed (but different) quantity of labour required per unit of output, their production possibilities are represented by the straight lines , I = A, B. The line for country A is drawn flatter than the line for country B, indicating that the relative cost of good X is smaller in country A than in country B, and thus that country A has a comparative advantage in good X. That this need not reflect absolute advantage can be seen from the fact that the countries’ labour endowments do not appear in the figure. Country A may have a much larger amount of available labour than country B, and thus require more of it per unit of either good than country B, an absolute disadvantage in production of both goods. We cannot know that from the figure, and it does not matter, neither for the direction of trade nor for the gains from trade.2
Figure 1.1. Ricardian comparative advantage and gains from trade

In autarky, each country must consume only what it produces. Using indifference curves to represent preferences for the goods, the countries produce and consume at the points labelled P1 = C1,1 = A, B. Their autarky relative prices are only implicit in the figure, given by the relative marginal costs of the goods and thus by the slope of the production possibility curve at the point of production. This slope, in absolute value, gives the relative price of good X, which is therefore lower in country A than in country B.
If the countries are now given the opportunity to trade freely, they will necessarily face the same prices, and producers in each country will reallocate resources toward the sector with a higher relative price. Since a common price must lie between the two autarky prices (else both would produce only the same good), free trade leads country A
to specialize in good X and country B to specialize in good Y at P1,1 = A, B, each producing only the good in which it has a comparative advantage. Each country then trades part of its output for the other good and reaches the consumption points
C1, 1 = A, B. To be in equilibrium the two vectors of trade from production to consumption, shown in the figure by the heavy arrows, must have the same length. The free trade relative price—which is the common slope of these arrows—is determined by this need to clear markets.
This is the basic Ricardian result. Note that it seems to imply that each country also gains from trade. In fact, however, the causation is the reverse. That is, in order to gain from trade, the countries’ trade must conform to comparative advantage, which is therefore a necessary but not a sufficient condition for gains from trade. This will appear more clearly later when we leave the simple Ricardian model and also consider policies that may distort trade.