The great mathematician Stanislaw Ulam challenged the great economist Paul Samuelson to name a principle in the social sciences that was both true and nonobvious. Samuelson thought for a bit, then replied, "Ricardo's theory of comparative advantage."

"That this idea is logically true," he said, "need not be argued before a mathematician; that it is not trivial is attested by the thousands of important and intelligent men who have never been able to grasp the doctrine for themselves or to believe it after it was explained to them."

You can make the argument for comparative advantage seem highly nontrivial and devilishly hard to believe after it is explained to you by following the great English economist David Ricardo into arithmetic and clotted prose. Ricardo wrote in 1817 that "England exported cloth [to Portugal] in exchange for wine because, by so doing, her industry was rendered more productive to her; she had more cloth and wine than if she had manufactured both for herself; and…the industry of Portugal could be more beneficially employed for both countries in producing wine." If you can instantly grasp that logic (and go on believing it for practical purposes such as opposing Donald Trump's view of foreign trade) you are either already an economist or have an astonishing natural ability for the subject.

The economist Paul Krugman wrote a column a long time ago claiming that comparative advantage is in fact difficult to comprehend, requiring various tricky assumptions only an economist could love. But it is "difficult" only in the world of Princeton University economists in which market "imperfections" abound and mathematical proof reigns.

Actually, it's dead easy. No math, no arithmetic. It is, in fact, the soul of common sense. Comparative advantage is merely the principle of cooperation. The word advantage gets us thinking of competition, perfectly reasonable in our own individual lives—we do compete with other businesses or other writers or whomever. But we also massively cooperate with family and colleagues. The world as a whole, furthermore, does well by cooperating, in business or science or cultural life. It's not all we do, admittedly. I said: We also compete. But within a household or a company or a world economy, the job is to produce a result in the best way, cooperatively. If you were running a sports team, say, you would want to assign roles to the various contributors to the common purpose sensibly. It turns out to be precisely on grounds of comparative advantage.

Consider 12-year-old Oliver and his mother, who are to spend Saturday morning tidying up the garage. Oliver is incompetent in everything compared with mom. He cannot sweep the floor as quickly as she can, and he is truly hopeless in sorting through the masses of rubbish that garages grow spontaneously. Mom, that is, has an absolute advantage in every sub-task in tidying up the garage. Oliver is like Bangladesh, which is poor because it requires more labor and capital to make everything—from knit goods to medical reactors for shooting cancers—than more developed countries do. Its output per person is 8.4 percent of what it is in Britain. So too Oliver.

What to do? Let mom do everything? Of course not. That would not produce the most tidied garage in a morning's work. Oliver should obviously be assigned to the broom, in which his disadvantage compared with mom is least—hence "comparative advantage." An omniscient central planner of the garage-tidying would assign mom and Oliver just that way. So would an omniscient central planner of world production and trade.

In reality, there's no need for an international planner. The market, if Trump does not wreck it, does the correct assignment of tasks worldwide. Bangladesh does not sit down and let the British make everything merely because they are "competitive" absolutely in everything. Bangladesh's real income has been rising smartly in recent years precisely because it has specialized in knit goods. It has closed its ears to the siren song of protecting the Bangladeshi medical reactor industry and gets its equipment for cancer treatment from Britain.

Comparative advantage means assigning resources of labor and capital to the right jobs. It applies within a single family, or within a single company, or within the United States, or within the world economy, all of which are made better off by such obvious efficiencies.

Following comparative advantage enriches us all, because it gets the job done best. Policies commonly alleged to achieve absolute advantage lead to protection—that is, extortion, crony noncapitalism, shooting oneself in the foot by shielding domestic industries from competition.

People who think they understand comparative advantage, and also think that economists are anyway a passel of pretentious fools, say silly things about Ricardo and his principle. For example, the Anglo-French tycoon Sir James Goldsmith wrote with brisk assurance that "according to Ricardo, each nation should specialize in those activities in which it excels." No, Sir James. Each nation—or each member of the household, or each member of a sports team—should specialize in those activities in which it gives up the least of activity X in doing activity Y. Afterward, it should embark on trade. By the principle of cooperation and exchange, each will have more cloth and wine than if it had manufactured both for itself behind tariff walls.

The trouble we get into is that there is another principle in play—one in which the best wins. The Chicago Cubs were not "cooperating" with the Washington Nationals when they narrowly defeated them in the first round of the World Series competition in October. And after a baseball team or a company has arranged its affairs internally to do as well as it can with what it has, it does go out to compete. The Cubs compete with the Nationals. Harris Teeter competes with Whole Foods. But an absolute advantage that favors one or another actor under the silly rubric of "competitiveness" is regularly assumed to be the same as comparative advantage for cooperation. It's not.

The two in fact have nothing to do with each other. The pattern of trade is determined solely by comparative advantage. The size of real incomes is determined solely by absolute advantage. Absolute advantage has, after all, another description, namely, "being productive and therefore rich and successful." Any businessperson wants to "compete" in such a sense, and it's good for herself and the country that she does such striving (excepting the very common case in which her "competing" involves soliciting favors from the government of the day, or, for that matter, engaging in theft, bribes, lying, cheating, extortion, and outright violence in the name of "winning").

Krugman notes that one of the problems laypeople have is that they often don't grasp that wages are set by inter-industry competition, not by productivity in one industry: "It is a fact that some Bangladeshi apparel factories manage to achieve labor productivity close to half those of comparable installations in the United States, although overall Bangladeshi manufacturing productivity is probably only about 5 percent of the US level. Non-economists find it extremely disturbing and puzzling that wages in those productive factories are only 10 percent of US standards."

Socrates taught the same way I do. Chalk and talk; mainly talk. Yet productivity in alternative employment for me is substantially higher than for an elderly stone mason and philosopher 2,400 years ago. In the task of transporting people, a sea captain in 405 BCE was vastly less productive than is an airline pilot in 2018. So I get the benefit in wages of the vast improvement in industries other than teaching. Bangladeshi wages are determined by the alternative—very unproductive employment in breaking rocks or moving fans—not by a Bangladeshi's relatively good job making knit goods.

In short, comparative advantage is just the principle of doing as well as one can inside a family or team or business. But "internal" can properly be taken to mean "internal to the world's entire economy."

Let us set sail, then, on the principle of old Ricardo's trivial logic and not fall victim to the illogic of self-sufficiency, "competitiveness," and the building of walls between nations.

A version of this article previously appeared in the November 2017 newsletter of the Institute for Free Trade.