To understand what’s wrong with that inference, consider some of the many bilateral trade deficits that I run. Whenever my family goes out to dinner, the restaurateur gets some money, and we get a meal. In economics parlance, the Mankiw family runs a trade deficit with that restaurant. But that doesn’t make us losers. After all, we leave with full stomachs.

To be sure, I would be happy to have balanced trade. I would be delighted if every time my family went out to dinner, the restaurateur bought one of my books. But it would be harebrained for me to expect that or to boycott restaurants that had no interest in adding to their collection of economics textbooks.

I can run persistent trade deficits with restaurants because I run trade surpluses elsewhere. Take The New York Times, for instance. It pays me more for my columns than I pay it for my subscription. That’s a bilateral trade surplus for me and a bilateral trade deficit for The Times. But nonetheless, we both gain from the relationship.

The overall trade deficit matters but not for what it says about trade.

If we add up all the bilateral trade balances with other countries, we get the nation’s overall trade balance — the difference between the value of all United States exports and imports. For many years, the United States trade balance has been negative, meaning that total imports have exceeded total exports. Mr. Trump believes this trade deficit is a sign that other nations have been taking advantage of us.

To see the folly in that conclusion, consider again the Mankiw family. Our overall trade balance is the sum of all our bilateral trade balances with everyone else — restaurants, The Times, and so on. The end result equals the difference between our income and our spending.