But the 2006 law authorizes the secretary of homeland security only to take actions to secure the border that are “necessary and appropriate.” These are the same words (in the opposite order) the Supreme Court interpreted in Michigan v. E.P.A. As Justice Scalia said, it would not be “appropriate” to “impose billions of dollars in economic costs in return for a few dollars” in benefits.

President Trump’s proposed wall would certainly cost billions of dollars: He says $8 billion, while more realistic estimates put the price tag at $15 billion to $25 billion (and $500 million per year for upkeep).

What about the benefits of the wall? First, it won’t keep many aliens out. No matter how high the wall is, it won’t stop smugglers from tunneling underground, as many have already done to get past existing border fences. Moreover, the wall won’t stop a majority of unlawful immigrants, who now enter the United States on visas that they overstay.

Indeed, research indicates that border barriers are more likely to keep unlawful immigrants inside the country from exiting than to prevent people from entering. Even John Kelly, President Trump’s pick to head the Department of Homeland Security, said during testimony that a wall “in and of itself will not do the job.”

Second, even if the wall does lower the number of unlawful immigrants in the United States, the economic gains from reducing illegal immigration are not greater than the cost of the wall. In fact, the economic effects would quite likely be zero or negative. Illegal immigrants pay billions of dollars in taxes, purchase goods and services, and enhance American productivity in sectors such as agriculture. A 2012 study published by the Cato Institute concluded that the gross domestic product would decline by roughly 1.5 percent — or $2.6 trillion over a decade — if we pursue a program of mass deportation and block undocumented immigrants from returning. Similarly, a study commissioned by The Wall Street Journal last year concluded that Arizona’s economy was on average 2 percent smaller per year because of the large-scale departure of undocumented immigrants from 2008 to 2015.