Israeli Prime Minister Menachem Begin and Egyptian President Anwar Sadat agreed today to hold meetings in the Sinai Peninsula capital of El Arish and the Negev Desert capital of Beersheba on May 27, and then open almost immediately the frontier between the two countries.

In an unexpected quickening of the pace of normalizing relations between Egypt and Israel, the two leaders also agreed to start ministerial level negotiations on the future of the West Bank and Gaza on May 9 in Beersheba.

Moreover, they agreed to start a series of visits by Cabinet ministers between Cairo and Jerusalem next week, beginning Monday with a trip to the Egyptian capital by Israeli Foreign Minister Moshe Dayan.

On the heels of a stiffly formal and subdued official reception here yesterday, the Israeli prime minister appeared to have broken the ice with Sadat and to have established a new rapport that has not previously been evident in their relationship over 16 months of on-and-off peace negotiations.

Begin tonight was ebullient and animated as he flew back to Israel in an Air Force jetliner, joking with passengers and singing a spirited Israeli folk song that celebrates peace.

Referring to a brief bout of hand-shaking with Egyptain bystanders in Cairo, he reflected: "That was a real scene to be observed. How I was encircled on all sides...They liked me. They really like me."

"We have come back from Egypt, [but] this time it was a different exodus from the one thousands of years go." Begin added.

He made no attempt to hide his joy about having succeeded in stepping up the pace of normalizing relations with Egypt, which from the beginning has been his principal goal in the peace talks.

Dayan will formally present in Cairo the peace treaty that already has been ratified by Israel's parliament. His trip will coincided with or follow by a day a visit to Jerusalem by old Egyptian Deputy Foreign Minister Butros Ghali, to deliver Egypt's copy of the document.

Shortly afterward, Israeli Deputy Prime Minister Yigael Yadin will go to Egypt and Egyptian Justice Minister Ahmed Mussad will return the visit in what is envisioned as the beginning of repeated exchanges of officials.

President Carter spoke by telephone yesterday with Sadat and Begin, who reported individually on Begin's trip to Egypt.

A statement issued by the White House Press Office said Sadat and Begin each discussed the status of talks between their two nations and the next steps in working out differences between Egypt and Israel.

Behind the accelerated tempo of Egyptian-Israeli contacts is an agreement by Begin to turn over El Arish to the Egyptians on May 26, several weeks before the trnsition had been planned.

Under the treaty, El Arish had been scheduled to revert to Egyptian control two months after Egyptian ratification of the accord, and after ceremonial exchange of the documents. Most observers had pinned their hopes on the middle of this month at the earliest for the exchange of treaties, which were signed in Washington on March 26.

By advancing the ratification to Monday, Sadat opened the door to an earlier takeover of El Arish, while also gaining from the Israelis a pledge to begin talks on the West Bank and Gaza a month earlier than originally planned.

Diplomatic analysts interpreted Sadat's move as partly reflectin a desire to counter the sanctions imposed against Egypt by the other Arab nations at their Baghdad conference. By speeding up the normalization process, it was suggested, Sadat demonstrated that he was not shaken by the Arab boycott.

Begin, in turn, wrung from the Egyptians a promise to open the land border and the air corridor between Israel and Egypt upon completion of the summit conference in El Arish and Beersheba.

An aide to Begin said air traffic would begin "very soon" after that meeting, but that details would be announced later.

Begin denied that diplomatic horsetrading had led to the normalization timetable-"neither President Sadat nor I are merchants," he said. "We don't make trades; we make agreements"-the schedule of events announced today clearly was the result of compromises.

Throughout the tortuous peace talks, the Egyptians had pressed hard for an earlier start on the autonomy negotiations, while also seeking from Israel a goodwill gesture in the form of El Arish. Under the treaty, Israel is to withdraw from the Sinai to a line extending from El Arish in the north to Ras Mohammed in the south within nine months after the signing.

For his part, Begin has persistently sought a speedup in normalization of relations, including frontier openings.

Both leaders achieved their goals in today's compromise, without making major alterations to the accord.

The May 27 meetint will start in El Arish, a dusty city of 30,000, and then the two leaders will fly by helicopter to Beersheba. The negotiations for West Bank and Gaza autonomy are scheduled to begin in Beersheba May 9-because El Arish will not have reverted to Egypt by then-and then will alternate later between the two cities.

Today's accords came during a 50-minute meeting between Sadat and Begin at Cairo's Tahra Palace, a session described by Begin aides as unusually cordial. Begin said the Egyptian president had received him "in the warmest way possible."

The stage for a personal rapprochement between the two men had been set last night in a state dinner at the Qubbeh Palace, where Begin said later "Israelis and Egyptians sat together and had the feeling we are real friends."

In contrast to the almost somnolent reaction to the visit in the streets of Cairo yesterday, Egyptains today seemed to show more enthusiasm for Begin as his motorcade passed through the city.

After leaving the Cairo Museum, Begin instructed his driver to stop the limousine and then over the protests of his security detail, he walked into a crowd to shake hands. The Egyptians greeted him with cries of "Salaam, Salaam."

It appeared that many Egyptians, who had watched yesterday's cool official reception on television, were affected by Sadat's greeting last night, and reacted in kind.

Noting that Egypt's population in 40 million compared to Israel's 3.5 million, Begin said, "Now I have more friends in Egypt than in Israel."

Begin said he will address the Israeli parliament Wednesday to explain "the very important decisions we reached." CAPTION: Picture, Prime Minister Menachem Begin of Israel views Egyptian artifacts on visit yesterday to a Cairo meseum. UPI; Map, no caption, By Dave Cook-The Washington Post