The law or principle of comparative advantage holds that under free trade, an agent will produce more of and consume less of a good for which they have a comparative advantage. Comparative advantage is the economic reality describing the work gains from trade for individuals, firms, or nations, which arise from differences in their factor endowments or technological progress. In an economic model, agents have a comparative advantage over others in producing a particular good if they can produce that good at a lower relative opportunity cost or autarky price, i.e. at a lower relative marginal cost prior to trade. One shouldn't compare the monetary costs of production or even the resource costs (labor needed per unit of output) of production. Instead, one must compare the opportunity costs of producing goods across countries.If a foreign country can supply us with a commodity cheaper than we ourselves can make it, better buy it off them with some part of the produce of our own industry employed in a way in which we have some advantage. The general industry of the country, being always in proportion to the capital which employs it, will not thereby be diminished but only left to find out the way in which it can be employed with the greatest advantage.f I wish to know the extent of the advantage, which arises to England, from her giving France a hundred pounds of broadcloth, in exchange for a hundred pounds of lace, I take the quantity of lace which she has acquired by this transaction, and compare it with the quantity which she might, at the same expense of labour and capital, have acquired by manufacturing it at home. The lace that remains, beyond what the labour and capital employed on the cloth, might have fabricated at home, is the amount of the advantage which England derives from the exchange.he fancied or real insecurity of capital, when not under the immediate control of its owner, together with the natural disinclination which every man has to quit the country of his birth and connexions, and intrust himself with all his habits fixed, to a strange government and new laws. The law or principle of comparative advantage holds that under free trade, an agent will produce more of and consume less of a good for which they have a comparative advantage. Comparative advantage is the economic reality describing the work gains from trade for individuals, firms, or nations, which arise from differences in their factor endowments or technological progress. In an economic model, agents have a comparative advantage over others in producing a particular good if they can produce that good at a lower relative opportunity cost or autarky price, i.e. at a lower relative marginal cost prior to trade. One shouldn't compare the monetary costs of production or even the resource costs (labor needed per unit of output) of production. Instead, one must compare the opportunity costs of producing goods across countries. David Ricardo developed the classical theory of comparative advantage in 1817 to explain why countries engage in international trade even when one country's workers are more efficient at producing every single good than workers in other countries. He demonstrated that if two countries capable of producing two commodities engage in the free market, then each country will increase its overall consumption by exporting the good for which it has a comparative advantage while importing the other good, provided that there exist differences in labor productivity between both countries. Widely regarded as one of the most powerful yet counter-intuitive insights in economics, Ricardo's theory implies that comparative advantage rather than absolute advantage is responsible for much of international trade. Adam Smith first alluded to the concept of absolute advantage as the basis for international trade in The Wealth of Nations: Writing several decades after Smith in 1808, Robert Torrens articulated a preliminary definition of comparative advantage as the loss from the closing of trade: In 1817, David Ricardo published what has since become known as the theory of comparative advantage in his book On the Principles of Political Economy and Taxation. In a famous example, Ricardo considers a world economy consisting of two countries, Portugal and England, which produce two goods of identical quality. In Portugal, the a priori more efficient country, it is possible to produce wine and cloth with less labor than it would take to produce the same quantities in England. However, the relative costs of producing those two goods differ between the countries. In this illustration, England could commit 100 hours of labor to produce one unit of cloth, or produce 5/6 units of wine. Meanwhile, in comparison, Portugal could commit 90 hours of labor to produce one unit of cloth, or produce 9/8 units of wine. So, Portugal possesses an absolute advantage in producing cloth due to fewer labor hours, and England has a comparative advantage due to lower opportunity cost. In the absence of trade, England requires 220 hours of work to both produce and consume one unit each of cloth and wine while Portugal requires 170 hours of work to produce and consume the same quantities. England is more efficient at producing cloth than wine, and Portugal is more efficient at producing wine than cloth. So, if each country specializes in the good for which it has a comparative advantage, then the global production of both goods increases, for England can spend 220 labor hours to produce 2.2 units of cloth while Portugal can spend 170 hours to produce 2.125 units of wine. Moreover, if both countries specialize in the above manner and England trades a unit of its cloth for 5/6 to 9/8 units of Portugal's wine, then both countries can consume at least a unit each of cloth and wine, with 0 to 0.2 units of cloth and 0 to 0.125 units of wine remaining in each respective country to be consumed or exported. Consequently, both England and Portugal can consume more wine and cloth under free trade than in autarky. The Ricardian model is a general equilibrium mathematical model of international trade. Although the idea of the Ricardian model was first presented in the Essay on Profits (a single-commodity version) and then in the Principles (a multi-commodity version) by David Ricardo, the first mathematical Ricardian model was published by William Whewell in 1833. The earliest test of the Ricardian model was performed by G.D.A MacDougall, which was published in Economic Journal of 1951 and 1952. In the Ricardian model, trade patterns depend on productivity differences.