The Supreme Court last week concluded the longest, most grueling and most sharply polarized term ever, with the justices deciding a high number of cases on 5-to-4 votes and issuing an unusual number of opinions on emotionally and politically charged issues such as abortion, racial discrimination, obscenity and sodomy.

Perhaps most significantly for the future, the last year of the Burger Court also saw the "floating center" of five moderate justices -- the group that has dominated the court during Chief Justice Warren E. Burger's years -- shrink noticeably to essentially two justices: Lewis F. Powell Jr. and Sandra Day O'Connor.

O'Connor, President Reagan's first appointee, emerged as a significant swing vote after several years of voting with Burger and Chief Justice-designate William H. Rehnquist. Still staunchly conservative on most issues, she moved toward the center this term, voting with the liberals on affirmative action and First Amendment issues, casting deciding votes on occasion to doom administration positions.

That was, in part, the cause of the least successful term the Reagan administration -- or any administration -- has experienced in years. The term "witnessed the most pronounced rebuff to the litigation objectives of the chief executive in 50 years," said Bruce Fein, a former Reagan administration official and court analyst for the American Enterprise Institute. "Not since the Supreme Court scuttled . . . Roosevelt's New Deal," Fein said, "has a president's policy agenda fared so poorly before the high court."

Fein said Reagan "will probably enjoy a more hospitable court" next term if Rehnquist is confirmed to succeed Burger and federal appeals Judge Antonin Scalia joins the high court.

The court, though issuing inconsistent rulings, steadfastly ratified its views of morality and fairness, from the board room to the bedroom, voting to expand protection for some groups -- blacks and women -- but casting adrift another group, homosexuals.

The court upheld affirmative action, condemned racial discrimination in jury selection, gave new strength to the Voting Rights Act, reaffirmed the right to abortion, ruled that sexual harassment was illegal under federal civil rights law, and banned execution of the insane -- something every state already prohibited.

At the same time, the justices blessed and deferred to traditional authority. Burger invoked "the shared values of a civilized order" to permit school officials to discipline a student for using sexual innuendos in a speech and cited "millennia of moral teaching" as grounds for the court's ruling that the Constitution does not protect homosexual conduct even in the home.

The court also voted to allow the military to set rigid dress codes and prohibit the wearing of yarmulkes, to let cities close some pornography bookstores and to let cities zone into oblivion theaters featuring pornography.

The term was marked by a firestorm over Justice Byron R. White's opinion for the five-member majority in the sodomy case. White brusquely dismissed as "at best, facetious," arguments that the court should declare that the Constitution protected private, consentual homosexual conduct.

White, generally perceived for years as strict on crime but moderate on other issues, continued his pattern of recent terms by voting consistently with Burger and Rehnquist on social issues as well.

In contrast, Justices Harry A. Blackmun and John Paul Stevens, once considered part of the traditional center, found themselves firmly in the liberal camp with Justices William J. Brennan Jr. and Thurgood Marshall across a broad variety of issues, including criminal cases.

Powell continued to be the pivotal vote on the court, crucial in determining which way the court would rule on major social issues.

The departure of Burger -- the second most conservative member of the court after Rehnquist -- is expected to produce little immediate change. There were no major cases this term in which Burger's vote was critical to the outcome, and the same may hold true if Scalia takes his seat, although Scalia is believed to be more conservative than Burger on some First Amendment and women's rights issues.

Either the 78-year-old Powell or one of the increasingly cohesive liberal quartet will have to step down before the court can be counted on to help accomplish Reagan's political and social agenda.

Powell said last week that he is not leaving, and none of the others in the liberal spectrum has indicated anything but a desire to stay on the court.

"It is extremely unlikely," said Harvard Law School Prof. Laurence H. Tribe, "that the nominations of Justice Rehnquist and Judge Scalia will make any difference. But it is important to remember how massive a difference the next series of appointments will make."

Tribe said the term showed "a court whose constitutionalism is deeply confused," and "how unprincipled the court's views on judicial activism can be."

The court was willing for the first time to declare that the Constitution allows judges to consider charges of unfair political gerrymandering, he said, but "found no place for the Constitution to serve as a shield in the bedroom."

In addition, while the Burger Court has generally said judicial deference to the other branches is a paramount virtue, it has shown a willingness to almost casually overturn major legislative initiatives.

This term saw the court strike down the heart of the Gramm-Rudman-Hollings budget law that Congress and Reagan felt necessary to control mounting deficits, marking the fourth time in a decade that the court has declared a significant political compromise unconstitutional.

Civil rights and civil liberties organizations, facing stiff challenges from the Justice Department and fearing the worst, were elated by a string of victories.

Two terms ago, the court, in what appeared to be a radical shift, voted 81 percent of the time against individuals' claims of a constitutional right against a local, state or federal government action.

The 1984-85 term saw the Bur- ger Court return to more typical patterns, ruling with government about 57 percent of the time. This last term saw the court rule with government 56 percent of the time.

But the cases that individuals won against government action, with the notable exception of the sodomy ruling, tended to be the most significant of the term. And liberal groups won major clashes with the administration over proper interpretations of law governing voting rights, attorneys' fees and affirmative action.

In some cases -- including interpretations of the Voting Rights Act and the rights of the mentally ill to take Social Security officials to court -- the justices unanimously dismissed the administration's views.

The victories on highly charged social issues often obscured the generally moderate to conservative makeup of the court, where seven of the nine justices have been appointed by Republican presidents.

The political divisions and the shrinkage of the "floating center" were most evident in cases where push came to shove -- where one vote either way made the ideological difference.

There were 33 such cases involving 5-to-4 votes among the court's 147 full decisions.

The most liberal justices, Brennan and Marshall, won only 10 of those 33 rulings. They picked up Blackmun's vote and Stevens' vote nine of 10 times in those cases.

Powell voted with the liberal bloc in six of those cases and O'Connor voted with them five times. White voted with them only once.

By another measure, Powell and O'Connor were on the winning side more than any other justices, each losing about 15 times during the term. Brennan, Marshall and Stevens found themselves in dissent nearly 50 times, while Burger was on the losing side 23 times and Rehnquist 30 times.