VISITS AMONG THE CAPITALS, by heads of goverment and state, are mainly symbolic but the symbolisms are important. President Carter is delivering a message with his first two invitations. This week the President of Mexico is here; next week it's the Prime Minister of Canada. Mr. Carter is responding to the view that in recent years American diplomacy had been too preoccupied with the superpowers and with military crises. The United States in now conveying a renewal of concern for the democracies and the economic relations among them - what you might call the diplomacy of mutural prosperity.

Even without waiting for Mr. Carter's invitations, this country's conversations with its two immediate neighbors seem to have got a bit less abrasive in the last few months. Perhaps we are entering the third phase of postwar relations on this continent. First there were the years dominated wholly by the Cold War, in which the United States tended to regard Mexico and Canada as its automatic allies. Then, with the disaster of the Vietnam War, the smaller countries began unhooking themselves from American leadership and occasionally going out of their way to needle cherished American orthodoxies. Now the economic surprises of the last serveral years are apparently changing the climate again.

In Canada, inflation and unemployment have helped the Quebec separatists. For Mexico, the decline in world markets led to a drastic devaluation; the peso is currently worth hardly more than half as much as last summer, with dire results for standards of living. Even here, in this land of great and stable wealth, recent events have made people start thinking again about where their resources come from - and some of them come from Canada and Mexico. Both have sent emergency exports of natural gas and oil into the United States this winter, and it's much appreciated.

So the Canadians are trying to keep their country together, the Mexicans are trying to keep their country solvent, and the Americans are trying to keep warm. Suddenly, it turns out, everybody is able to think of reasons for being a bit more polite to everybody else. It begins to look, at last, as though the long and polemical quarrel over Cuba is not the most important political subject in North America.

These two visits will be an interesting contribution to the new administration's education, for they represent the two poles of economic development. The Canadians are among the world's richest people - but, like Americans, they are nos struggling to recapture the sense of well-being that prevailed before 1973. Canada is presumably on the Carter administration's little list (headed by Janpan and Germany) of countries that now have a responsibility to reflate their own economies faster in order to pull the weaker and more fragile nations back into sustained growth. While Mexico is among the world's poor, it is not hopelessly poor; the country was building up its wealth rapidly until it got caught in the whirlpool of deficit and devaluation. If world trade does not begin to rise again rapidly, it is in Mexico and the countries like it that the severest price will be paid.

It is a time for realism. The stiff little statements issued by the White House give only the rarest glimpses of the actual conversations between Mr. Carter and his visitors, but the agendas aren't hard to guess. President Jose Lopez Portillo knows that Mexico's large trade deficits and huge foreign debts are dangerous. Mr. Carter knows that, if they are not managed intelligently they will prove dangerous to our country as well as President Lopez Portillo's. Prime Minister Pierre Elliot Trudeau wants to ensure that the United States does nothing to encourage the separatists. Mr. Carter will probably want to know how rapidly the Canadians can resolve the internal political disputes over a joint gas pipeline from Alaska and the Canadian Arctic. They are not questions that invite the kind of ideological posturing that has been a staple of continental politics over the past decade.That luxury has recently become too expersive.