The president did what he had to do in deciding to retaliate economically now for Col. Muammar Qaddafi's support of terrorism against American citizens. Military reprisal would have been risky, given the Americans and the American interests hostage in Libya and elsewhere and the difficulty of pinpointing the right targets and penetrating Libya's new Soviet-supplied missiles. The economic squeeze is unilateral and lets Libya play off the United States against its allies. This is troublesome but not so troublesome as standing by helplessly on grounds that the Europeans won't go along. Some things have to be done for their own sake, though they are not fully effective and entail certain costs. After all, innocent Americans were murdered.

It has become a clich,e that Mr. Reagan began by promising swift vengeance against terrorists and that his actual record constitutes a humbling education in political reality. The president might have spared himself some grief by picking a more modest course. The principal source of grief, however, lies not in any politician's embarrassment but in terrorism itself. It is awful, it is difficult to deal with, and it continues. It continues against principal targets such as Israel and the United States and against countries in Europe that have tried to set themselves apart.

The tendency of many in Europe is, after a point, to become resigned to terrorism, to succumb to the political excuses readily available for it, to accept it as a part of the permanent surroundings. A code of business as usual is in effect. But this is not for Mr. Reagan. Even in his frustration, he retains an evident rage. He has made political concessions to the struggle against terrorism but not moral concessions. This is his strength.

For taking the new steps alone, Mr. Reagan will doubtless be accused of practicing a unilateralism that willfully separates the United States from its friends. There is a whole school of criticism of American "global unilateralism," commonly juxtaposed to the "liberal internationalism" of earlier memory. There is something to this, but it can easily become an excuse for Europeans and others to evade their duty and to dump the more thankless tasks of international life, like containing Col. Qaddafi and easing the Israeli- Palestinian dispute, on the United States.

Rather kindly, Mr. Reagan this week offered the allies an alibi, saying that economic considerations may keep Europe from joining the new American sanctions. But he also said that "Americans will not understand other nations moving into Libya to take commercial advantage of our departure." This is a modest but necessary marker. Internationalism, Europeans surely would agree, cuts both ways.