Some people think President Reagan is right about the dangers of trade protectionism. Others agree with him about the virtues of his Strategic Defense Initiative, or Star Wars anti-nuclear missile program. But he can hardly be right about both, because the argument he uses to justify one is flatly contradicted by the rationale for the other.

Reagan says that you can't build trade barriers at your borders without inviting retaliation, but you can erect a nuclear fence in space and no one should mind. That does not compute.

At his first formal news conference since his summer illness, the president said protectionism is dangerous because it invites retaliation by our trading partners. History is on his side. As he said, the most protectionist measure in recent American history, the Smoot-Hawley Tariff Act, was so disruptive of international trade that historians assign it substantial blame for the Great Depression, which began in 1929.

In another breath, Reagan rebutted the critics of Star Wars who contend that it will spread the arms race to the heavens. Not so, said the president. If research and testing show the incredibly intricate antimissile shield to be feasible, why then all nations -- including the Soviet Union -- will see that nuclear weapons are futile and agree to eliminate their existing atomic arsenals.

It's a nice dream, but it is flatly contradicted by history and psychology. What Reagan said about trade applies equally to the arms race: "Protectionism is a two-way street."

In the news conference, the president compared the Star Wars technology both to gas masks and to anti- aircraft guns. The gas-mask analogy does not fit. When "we outlawed poison gas in 1925," Reagan said, "everyone kept their gas mask. I think of this (Star Wars) weapon as kind of the gas mask."

The gas mask analogy is wrong, because there has been no prior agreement to outlaw nuclear missiles, nor is one in sight.

The anti-aircraft-gun analogy, which Reagan used to emphasize that SDI is purely defensive, does fit, but it proves the opposite of what the president contends.

The development of ever-better anti- aircraft guns did not stop the production of bombers. It accelerated their improvement. Nations respond to rivals' improvements in defensive weapons by speeding their own development of offensive weapons. The introduction of radar-guided computerized anti-aircraft weapons (some firing heat-seeking ground-to-air missiles) did not faze the leaders of the U.S. Strategic Air Command or their Soviet counterparts.

Instead, it spurred them to build faster, sneakier bombers, capable of baffling or evading the enemy defenses. If Reagan is right about the psychological impact of Star Wars, we would not be developing the Stealth Bomber or any other weapons system designed to overcome the latest advances in Soviet defensive technology.

It is the trade analogy that holds: the defensive measures invite countermeasures. Some may think it unfair to compare the workings of international trade to the dynamics of the nuclear arms race or draw a parallel between the balance of payments and the balance of terror.

But they are alike. It is no accident that the word "retaliation" dominates the dialogue in both trade discussions and arms control. The essential political psychology is the same in both fields. When a sovereign nation sees its vital interests threatened by actions of a rival, its almost inevitable tendency is to increase its own effort -- not to back off.

Japan and other countries with which we have an unfavorable balance of trade survive only because of their ability to tap international markets. If the United Staes imposes tariffs or quotas on their products, they must respond. No matter that their own behavior may well justify such action on our part; if we act, they must react.

Similarly with the Soviet Union and strategic arms. Ever since World War II brought massive losses to the Russian people, the first principle of the Soviet government has been to ensure its military parity, if not supremacy.

To suppose the Soviet Union will respond to the Strategic Defense Initiative, which has the avowed aim of nullifying the Russian nuclear threat, with anything except redoubled effort to increase the credibility of that nuclear attack force is to imagine the impossible.

That is the huge hole in President Reagan's argument. He got away with it in his Tuesday press conference, but Mikhail Gorbachev is not likely to be as indulgent. If Reagan tries to use the gas-mask analogy to defend his stated intention to remove SDI from the bargaining table at the November summit in Geneva, Gorbachev will knock that argument for a loop.

Somebody has to give the president a better argument to use in Geneva, or better yet a more plausible position to defend. You can't attack trade protectionism and defend Star Wars without bumping into yourself.