Tariff
A tariff is called an optimal tariff if it's set to maximize the welfare of the country imposing the tariff. It is a tariff derived by the intersection between the "trade indifference curve" of that country and the offer curve of another country. In this case, the welfare of the other country grows worse simultaneously, thus the policy is a kind of "beggar thy neighbor policy". If the offer curve of the other country is a line through the origin point, the original country is in the "condition of a small country", so any tariff worsens the welfare of the original country.
Tariff
An externality is the term used when the price of a product does not reflect its cost or real economic value. The classic negative externality is environmental degradation, which reduces the value of natural resources without increasing the price of the product that has caused them harm. The classic positive externality is technological encroachment, where one company's invention of a product allows others to copy or build on it, generating wealth that the original company cannot capture. If prices are wrong due to positive or negative externalities, free trade will produce sub-optimal results.