When the economic summit opened in Ottawa last Sunday, President Reagan was pleasantly surprised by French President Francois Mitterrand, who took a firm anti-Soviet stand and pledged to honor his nation's commitments to the North Atlantic Treaty Alliance.

"He sounded like me," Reagan said with a smile.

Reagan's delight at learning that the French socialist leader shares his own stern views about the Soviets was, for the U.S. president, one of the highlights of a summit meeting that also demonstrated anew the close friendship between Reagan and Prime Minister Margaret Thatcher of Britain. Summing up the summit, Reagan said the forging of better personal relationships among the leaders of the world democracies "was worth its weight in gold."

Reagan's reflections on his first venture into international summitry came in a brief interview aboard Air Force One as the president returned Tuesday night from Ottawa to Andrews Air Force Base. His recollections were augmented yesterday by the comments of two close aides, White House counselor Edwin Meese III and deputy chief of staff Michael K. Deaver, who accompanied him to the summit meetings.

No one except interpreters was with the seven heads of states when they assembled Sunday evening for a private dinner in the Chateau Montebello, a rustic resort of Ottawa. At Canadian Prime Minister Pierre Trudeau's suggestion, Reagan had prepared opening remarks aimed at defusing European concern about high U.S. interest rates.

But the night of the dinner, when Trudeau queried other heads of state on how they would like to proceed, Thatcher spoke up and said that a series of statements would be "too formalized." Reagan said he then decided against giving his prepared speech, and only Japanese Prime Minister Suzuki and Mitterrand made opening statements.

Notes made by Meese after a conversation with West German Chancellor Helmut Schmidt show that Mitterrand made this declaration: "I want to make it very clear to all of you that France will absolutely honor all of its obligations to the NATO alliance."

This statement evidently had the effect of an icebreaker at the initial summit meeting, contributing to what Reagan called "a free-flowing discussion."

Reagan said that at no time did he bring up the previous objections of his administration to Mitterrand's inclusion of four communists in his 44-member cabinet. The public U.S. rebuke of this action was widely resented in France, especially by the socialists, whose stunning electoral victory reduced the communists to a marginal political influence in the nationa for the first time since World War II.

The president said he was briefed beforehand on the negative French view of the U.S. reaction. On this basis, Reagan apparently decided against raising the issue.

Reagan appeared tired to the point of near-exhaustion as he reviewed the summit during an interview punctuated by an in-flight telephone call to his recuperating press secretary, James S. Brady. Aides said that the president had spent many hours in preparation for the summit meetings, and that he was also preoccupied part of the time by sessions with his advisers on the tense and sensitive situation in the Middle East.

Deaver said Reagan approached the summit with "a little apprehension," not quite knowing whether the Europeans would gang up on him over U.S. interest rates or whether the Reagan economic program would be understood and appreciated.

But Reagan told his aides, and said again in the interview, that he was pleased by the way the leders of the other summit nations responded to his explanation of the administratin's economic program.

"They all wish us well," Reagan said. "They make no secret of the fact that our economy has a great effect on theirs. The size of it is such that they're affected by us, so they truly want us to succeed."

The president said he believed that the Europeans now better undrestand the reasons for high U.S. interest rates, which Reagan frequently described as "inherited." At the same time, Reagan seems to have a far more vivid understanding of the depth of European concern about interest rates, which Schmidt and Mitterrand pointed out had a deep impact on European economies.

Schmidt told Reagan that on returning to Germany he would have to cut the budget. Mitterrand said that if the high interest rates continue they could lead to "despair and social uprisings" in France.

Meese said that Reagan sympathized with this view before the summit but that his understanding was "more personalized now and he's heard it in more graphic terms."

According to Meese, Reagan also was pleased by the summit commitment to free trade and the acknowledgment by several European leaders that certain non-tariff policies -- such as the European Economic Community's sale of butter to the Soviet Union below cost -- infringe on this concept.

The president said that Thatcher proved especially adept at intervening to solve language disputes in the final comunique. At one point Reagan said, Trudeau complimented the British prime minister by saying "Margaret has solved it again."

On the foreign exchange plank the prime minister introduced compromise language that settled a difference between the United States and Britain on one hand and France and Italy on the other. She also worked out compromise language on the market system acceptable to Mitterrand, Meese said.

Of Thatcher, whom he has known for many years, Reagan said: "I have a great admiration for her, and a great respect for her. And it was evident in those meetings, too. There were many times that Margaret Thatcher spoke up and put her finger on the little thing we were trying to resolve. . ."

Based on his experience at the first economic summit. Reagan is looking forward to his second, which will be held next year in France. He also agrees with the summit prescription proposed by Mitterrand: "Less people, less paper and shorter communiques."