Margaret Thatcher was formally appointed Britain's first woman prime minister by Queen Elizabeth at Buckingham Palace this afternoon after Thatcher's Conservative Party easily won yesterday's election.

The Conservatives' 43-seat overall majority in the 635-seat House of Commons-the largest any party has won here since 1966-appeared to give Thatcher the mandate she had sought to move Britain to the right by trimming welfare programs and encouraging private enterprise.

In wresting control of the government from the Labor Party, Thatcher's Tories increased their seats in Parliament by 55 while Labor's total fell by 40.

The composition of the new House of Commons, to convene later this month, is:(TABLE) Conservatives(COLUMN)339 Labor(COLUMN)268 Liberals(COLUMN) 11 Scottish Nationalists(COLUMN) 2 Welsh Nationalists(COLUMN) 2 Northern Ireland Protestants(COLUMN) 10 Northern Ireland Catholics(COLUMN) 2 Speaker of House (nonpartisan)(COLUMN) 1(END TABLE)

The Conservatives' 44 percent share of the total vote was an improvement of 8 percent over their showing in the last election, in October 1974, while Labor's 37 percent was 2 percent less than in 1974. The rest of the Conservatives' gain came from large losses suffered by most of the minor parties.

The Conservatives amassed 13.7 million votes, Labor 11.5 million, the Liberals 4.3 million (14 percent of the total), and the other minor parties, including the sectarian parties that contest Northern Ireland, 1.7 million. The turnout of 76 percent of the electrorate was about average for a British election.

The slow, steady count last night and today, which a bleary nation watched on television, was followed this afternoon by the pageantry of a change of government in the world's oldest parliamentary monarchy.

While Prime Minister James Callaghan's wife, Audrey, moved family necessities out the back door into a waiting car, he walked out the front door of 10 Downing Street to ride to Buckingham Palace and hand his resignation to the queen.

Shortly after Callaghan left the palace for a stop at Labor Party head quarters on his way to his Sussex farm, Thatcher, as leader of the party winning a majority in Parliament, was summoned to the palace for a 45-minute audience with the queen.

The two women, who both happen to be 53, discussed Thatcher's plans for the new Conservative government. Thatcher formally accepted her appointment to the office of prime minister by kissing the queen's hands. She then rode from the palace in the prime minister's black Rover to 10 Downing Street, which is both the offices and home of British prime ministers.

Cheered lustily by a large crowd that had gathered across Downing Street, Thatcher, appearing subdued and slight in a swirl of reporters and hulking police security officers, appealed to the people of Britain to get together and strive to serve and strengthen the country."

Reciting "some words of St. Francis of Assisi, which I think really are just particularly apt at the moment," she said, looking intently into the television cameras, "'Where there is discord may we bring harmony, where there is error may we bring truth, where there is doubt may we bring faith, and where there is despair may we bring hope.'"

Before entering 10 Downing Street to consult with advisers about her Cabinet-to be named in part early next week-she also recalled "the words of Airey Neave," her close adviser who was assassinated at the beginning of the campaign, "whom we had hope to bring here with us. "There is now work to be done.'"

At a press conference at Labor Party headquarters, meanwhile, Callaghan congratulated Thatcher and said that "for a woman to occupy that office is a tremendous moment in our country's history."

He refused to discuss whether he might now retire, at 67, from the Labor Party leadership. That would trigger a struggle between the party's left and centrist wings. The leader of each wing, the burly former chancellor of the exchequer, Denis Healey, of the centrists, and the pipe-smoking former energy minister, Tony Wedgwood Benn, of the leftists, were both reelected to their Commons seats yesterday.

Callaghan blamed his defeat on the union strife and strikes of this past winter. "Memories of the winter have been too great," he said. "People were voting against last winter, rather than for the proposals of the Conservatives."

Public opinion poll data showed, however, that many voters also wanted the income tax cuts promised by Thatcher and hoped that a change of government would somehow revive the economy, even if they were wary of Thatcher herself and the rest of the Conservatives' plans to reduce government involvement in the economy.

Among notables winning reelection were former Conservative prime minister Ted Health, former Labor prime minister Harold Wilson, and Callaghan's embattled young foreign secretary, David Owen. Heath has been the focus of speculation about whether he will be offered a Cabinet position by Thatcher, who ousted him as party leader in a bitter battle four years ago.

The most notable casualty yesteday was Shirley Williams, education secretary in Callaghan's Cabinet. She had been considered contender to succeed Callaghan as party leader if he retires. Callaghan said today he was "heartbroken" about Williams' loss, but predicted, "She will be back again and I believe there is a most distinguished future for her."

Ironically, on the same day that Britain gained its first woman prime minister, seven of the 23 women members of Parliament standing for reelection lost their seats, leaving fewer women in Parliament than at any time since 1950. Five of the women losers, including Williams are Labor and two are Scottish nationalists.

Of the 16 women who won reelection, 10 are Labor and 6 are Conservative, including Thatcher and Sally Oppenheim, who had been opposition spokeswoman for prices and is almost certain to be in Thatcher's Cabinet.

Other notable losers were Liberal country campaign boosted his personal popularity as high as Thatcher's in some public opinion polls-said the losses were "very disappointing" but "at least we have survived intact as a party."

The Welsh nationalist party, Plaid Cymru, kept two of its three rural seats in Wales, but its leader, Gwynfor Evans, lost his seat to Labor. His loss follows the overwhelming defeat of a porposal for limited home rule for Wales in a referendum there earlier this year, leaving the minority Welsh language nationalist movement in disarray.

The Scottish nationalists lost nine of their 11 seats in Parliament and about 40 percent of their total vote in 1974. Their collapse allowed the Conservatives to pick up some of their rural seats despite Labor's dominance elsewhere in Scotland.

The Liberals and Scottish nationalists voted with Thatcher and the Conservatives in late March to bring down the minority Labor government on a no-confidence vote. Callaghan gave the minority parties a prophetic warning then that it was "the first John Pardoe, the party's deputy leader, and Jeremy Thorpe, the former leader who stands trial next week on charges of conspiring to murder male model Norman Scott.

"I think you will find it is very unlikely that I shall retire from politics," Thorpe said after his loss. "I am an innocent man and I was perfectly entitled to stand. It would have been totally lacking in courage if I had not gone ahead with the fight."

The Liberals lost three of their 14 seats in Parliament as their vote nationally fell from 18 percent in 1974 to less than 14 percent yesterday. Liberal leader David Steel - an earnest, energetic 40-year-old whose cross-time in recorded history that turkeys have been known to vote for an early Christmas."

In Northern Ireland, all but one of the 12 Ulster seats in Parliament were won by Protestant Ulster unionists of various factions. Two seats in Belfast were wrested from the most moderate Ulster unionist party by the more militant Democratic Unionists, headed by the Rev. Ian Paisley.

The leader of the Social Democrat and Labor Party in Northern Ireland, Gerry Fitt, and a Catholic independent Frank Maguire are the only Ulster Catholic's in Parliament.

As early trends indicated last night, the election has generally split mainland Britain into a Conservative south and Labor north , and into Conservative suburbs and countryside and Labor cities - except London.

The Conservatives' biggest gains were in central and southern England, especially in and around London, where they swept all but a few inner-city seats. Somewhat surprisingly, they also were strong in rural Wales. Labor gained against the Conservatives only in Scotland, while holding its own in urban areas in northern England and in Wales.

Francis Pym, a likely member of Thatcher's Cabinet, warned that "it is easy to exaggerate" the regional differences. He pointed out that the Conservatives increased their share of the vote by almost the same amount everywhere except Scotland, even though their gains in seats were not evenly distributed.

Labor appeared to have been helped significantly in some inner-city areas by black and Asian immigrants from the Commonwealth voting in larger numbers than usual against Thatcher's outspoken support for restrictions on new immigrants.

In the midlands cities of Leicester and Bradford and the Southall and Paddington areas of London, where many Asian and black Immigrants live, for example, Labor did much better against the Conservatives than in surrounding and similar constituencies without high immigrant population. Labor also won close contests in both constituencies in the industrial city of Bolton outside Manchester, where the Asian population has grown recently and was well organized by the Labor candidate.

The right-wing National Front, the most vociferous opponents of non-white immigrants, failed to win any seats.

Bolton, singled out by the media during the campaign as a demographic microcosm of Britain, lost its status as a bellwether city when the Labor member of Parliament, David Young, won reelection from Bolton West, which until yesterday had voted for the party winning nationally in the past nine elections. CAPTION: Picture 1, Margaret Thatcher arrives at 10 Downing Street after being appointed prime minister by the queen. UPI; Picture 2, James Callaghan leaves 10 Downing Street for palace to submit his resignation to the queen. UPI; Picture 3, Former Liberal Party leader Jeremy Thorpe reflects on his defeat in North Devon. AP