In a remarkably active first 100 days as prime minister, Margaret Thatcher has surprised Britain and attracted worldwide attention with the boldness of her leadership.

She has moved more swiftly and decisively than expected to try to wean Britain away from its postwar welfare-style economy by making drastic changes in its tax structure, ordering deep cuts in future government spending and beginning the denationalization of government-owned industries.

She also has been more flexible in foreign affairs than expected. She has changed dramatically her policy on black majority rule in Zimbabwe-Rhodesia at the Commonwealth conference in Lusaka, Zambia; has allowed many more Vietnamese refugees into Britain than she originally wanted, and has tried tactfully to persuade the European Economic Community that Britain is being shortchanged financially in the Common Market.

And Thatcher has been more unflappable under pressure than expected, running her surprisingly diverse Cabinet with a strong hand. She has been easily squelching hecklers in the rowdy rough-and-tumble of the twice-weekly questioning of the prime minister in the House of Commons and is winning over skeptical foreign leaders with warm face-to-face diplomacy.

But as she prepares to leave London next week for a brief vacation after a workaholic's hectic pace these last 100 days. Thatcher knows that the real testing time still lies ahead.

Her Lusaka statemanship will be tested when the warring factions in Zimbabwe-Rhodesia come here next month to debate a new black-majority-rule constitution. It may well be impossible to reach any agreement, much less one that satisifies both her new African allies and the British right-wing Conservatives who vociferously champion the interests of Zimbabwe-Rhodesia's white minority.

More importantly, Thatcher's resolve to reduce the government's role in Britain's falling economy will be tested by what is expected to be a very difficult autumn and winter.

Inflation has been fueled by Thatcher's decision to help finance income tax cuts by raising sales taxes and to cut oil consumption by pushing the price of gasoline. Inflation is expected to jump from 11 percent to 15 percent this month and reach nearly 20 percent before the end of the year.

Unemployment, aggravated by Thatcher's cuts in government spending, government jobs and government subsidies of jobs in declining industries, also is expected to rise sharply from 1.3 million jobless now to 1.7 million next year and more than 2 million after that.

Labor unions, angered by these trends and by Thatcher's plans to legislate new limits on their legal powers, are expected this winter to demand wage increases of more than 20 percent and shorter hours to create more jobs.

British industry, squeezed by rising labor and raw material costs plus the high interest rates and strong pound sterling produced by Thatcher's tight money policies, is expected to suffer from falling sales, exports, profits and investment, which could produce a rash of bankruptcies.

Thatcher's chancellor of the Exchequer, Sir Geoffrey Howe, has characterized the country's overall economic prospects in the near future as "almost frighteningly bad." British treasury experts forecast little or no national economic growth for the next several years.

A Confederation of British Industry survey of business leaders and a study by the Trade Unions Congress revealed widespread gloom. The stock market here has fallen 100 points since Thatcher became prime minister.

As prices have gone up in the shops and at the gas pumps, Thatcher's popularity in public opinion polls has fallen slightly but steadily, and the Conservatives have dropped behind the opposition Labor Party. The Conservative Party's chairman, Lord Thorneycroft, has warned party workers "to remain steady in support of the government we put in to do this job, no matter what the polls may say."

It is precisely because the British economy is so sick and the short-term prognosis is so bleak that Thatcher and key Conservative Cabinet members believe that now is the time for them to administer such bitter medicine. While it may hurt for a while, they believe it is the only way to cure the patient in the long run.

The Guardian newpaper's veteran political commentator, Peter Jenkins, used a different metaphor: "We have a government prepared to play a long match and to lose the first couple of sets if need be."

"It's a long haul exercise," Howe explained recently. "Turning around this economy requires the next four or more years before the next election and then five more after that. Our determination is to go for long-run change and not keep jumping around."

Howe says he should not intervene, for example, to hold down the value of the pound to keep British exports from costing too much abroad, as the Conservatives' supporters have suggested.

"I just don't believe that every short and middle-term problem should be responded to by the government," Howe said. "The market forces should work on their own."

Howe also said he believes that labor unions will understand that market forces dictate that they must moderate their wage demands this winter and fall behind inflation for a time. Otherwise not enough money will be in the Thatcher-squeezed economy to pay for large wages without a compensating loss of jobs, he said.

Similarly, the young energy secretary, David Howell, a personal protege of Thatcher's who closely follows her lead, has been content, even eager, to allow surging gasoline and heating oil prices to depress the consumption of crude oil here.

He said recently that he saw little need for such U.S.-style conservation incentives as tax credits for home insulation. Howell said he believed British drivers used less gasoline by taking shorter vacation trips this summer because gasoline prices, now at more the $2.50 a gallon, finally rose faster than inflation last month.

Shock therapy to stimulate self-interest, with the encouragement of gradual reductions in the income tax rate each year, is essentially the treatment that Thatcher's government is administering in Britain to try to heal its economy.

Thatcher runs her government in the same no-nonsense fashion. She dictates the agenda and many of the decisions of her Cabinet meetings, which often have been more collegial councils in previous governments. She impatiently scolds ministers who inpede her progress, embarrassing them in front of their peers.

Commentator Jenkins has pointed out that "her style of prime ministership means that, if and when things go badly wrong, there will be nobody else to blame. Moreover, she will not find herself surrounded by loyal and affectionate colleagues."

A number of respected politicians and political jounalists here on both the left and right privately predict that, although the Conservatives have a safe majority in Parliament to finish out a full five-year term in power before the next election, Thatcher might be replaced as prime minister by the Conservatives in midterm.

Thatcher, however, already has confounded critics with a surprising flexibility. Her personal instinct on Zimbabwe-Rhodesia was to support the multiracial government of Prime Minister Abel Muzorewa. The new Zimbabwe-Rhodesian government grants the white minority a disproportionate amount of power.

But she responded to arguments by Lord Carrington, her influential foreign secretary, that it would be in Britain's best interests to bend to the opinion of black Africa and try again to produce a more acceptable black majority government. Carrington also overcame Thatcher's personal feeling that Britain is being flooded by too many immigrants of "alien cultures" and persuaded her to accept a large number of Vietnamese refugees.

In both cases, Thatcher turned what seemed to critics to be embarrassing policy positions, made worse by insensitive-sounding off-the-cuff remarks, into personal diplomatic victories. Thatcher took the credit for the Zimbabwe-Rhodesian peace initiative worked out in Lusaka by Austrailian and African leaders as well as the British. She suggested the United Nations conference on the Vietnamese refugee problem and led what became a chorus of criticism that put Hanoi on the defensive.

Having fought hard to win power she once thought would always be denied her because she was a woman, Thatcher seems ready and able to do whatever is necessary to protect and increase it so that she can carry on her crusade against socialism and for the revival of Britain's economic health and global prestige. She is both a boldly ideological and shrewdly practical politician who worries a great deal about her image.

"I think I am an Iron Lady," she told Zambian President Kenneth Kaunda during their exercise in mutual admiration at the conclusion of the Commonwealth conference in Lusaka. "But the softer you are inside, the more necessary it is to have an iron cladding on the outside." CAPTION: Picture, Prime Minister Margaret Thatcher faces key tests in foreign and ecnomic policy. The Financial Times