Prime Minister Margaret Thatcher dropped Foreign Secretary Francis Pym from her Cabinet today, probably ending his hopes of succeeding her, and replaced him with Sir Geoffrey Howe, who had been chancellor of the exchequer.

Thatcher made a dozen Cabinet changes, fulfilling her pledge to give the reelected Conservative government "a new look." In elevating 65-year-old William Whitelaw, who was home affairs minister, to be Tory leader in the House of Lords, Thatcher nominated him to become a viscount, the first hereditary title to be awarded since 1964.

The new chancellor of the exchequer is Nigel Lawson, 41, a former financial journalist, who was energy ministry. The new home affairs minister is Leon Brittan, 43, who had been number two at the treasury. Neither is politically popular, but their appointments give the senior echelon of Thatcher's Cabinet a younger cast of considerable technical skill.

The ouster of Pym had been anticipated because it was clear almost from the moment of his appointment during last year's Falklands war that he and Thatcher had trouble getting along.

Pym's fate was sealed when he publicly expressed concern early in the campaign about the possibility that Thatcher might win a landslide. His performance in 14 months as foreign minister was regarded widely as uninspired but without apparent diplomatic blunders. His exchange of letters with Thatcher over his departure was icily perfunctory.

Pym, 61, suffered by comparison with his dazzling predecessor, Lord Carrington, who took responsibility for the failure to prevent Argentina's invasion of the Falklands and resigned. Carrington's exoneration was completed today when he was made a companion of honor in the queen's birthday honors list.

With Pym's departure and Whitelaw's elevation to the Lords today, the liberal wing of the Conservative Party effectively loses its two most prominent representatives in Thatcher's government. Instead of genteel upper-class Tories, Thatcher has increasingly turned to meritocrats who share her right-wing economic philosophy.

As chancellor of the exchequer through all four years of Thatcher's first term, Howe, 56, has been responsible for Britain's tight fiscal policies and its overall economic strategy. His appointment as foreign secretary is considered a reward for those services.

In another major shift, Cecil Parkinson, who was chairman of the Conservative Party throughout its enormously successful campaign for reelection, was named minister for trade and industry. These two ministries had functioned separately. Combining them gives Parkinson, 52, considerable power.

Members of Thatcher's last Cabinet who remain in place include Michael Heseltine, the defense minister who has been credited with mounting a successful propaganda offensive to counter the impact of antinuclear demonstrations; Norman Tebbitt, the employment secretary whose hard-eyed glare has made him the symbol, for Thatcher's opponents, of a Tory tough line on social issues, and James Prior as secretary of state for Northern Ireland.

The new deputy minister at the treasury, a Cabinet post, is Peter Rees, who as deputy trade minister made repeated trips to Washington during the past year seeking to resolve trade disputes between Europe and the United States. The outgoing trade minister, Lord Cockfield, remains in the Cabinet in the loosely defined position of chancellor of the Duchy of Lancaster.

The other new ministers are Peter Walker at energy, Patrick Jenkins at environment, Michael Jopling at agriculture and Tom King at transport. Walker, King and Jenkins were already in the Cabinet in different posts. The outgoing transport minister, David Howell, was not offered any new job.

By nominating Whitelaw for a hereditary title, Thatcher has revived an age-old practice of such honors that recent prime ministers had let lapse. Whitelaw's heirs will automatically have a place in the House of Lords.

The defeated Labor Party had planned if it won the election to name hundreds of new peers who would then use their majority to vote the upper chamber out of existence.

Whitelaw retains his largely honorary deputy prime ministership. As Tory leader in the Lords, he will replace Baroness Young, who was the only woman in Thatcher's last Cabinet besides herself.