President Carter's commitment to use military force, if necessary to protect the Persian Gulf oil supply struck a responsive chord in American public opinion. In a notable shift, Americans are expressing strong support for the kind of muscular new policies announced by the president in recent weeks.

The findings of a Washington Post poll of 1,828 people nationwide, conducted from Jan. 23, the night of Carter's State of the Union address, through Jan. 28, suggest a rallying around the president in a time of crisis.

On an array of issues, from boycotting the Moscow Olympics to reviving a military draft to facing up to Russia after its invasion of Afghanistan, the public shows overwhelming support of Carter's stands. In some of these cases, the public supports measures that it opposed only a few weeks ago.

The most dramatic and explicit shift, as measurd by the Post survey, involved the possible use of U.S. military force nearly halfway around the world in the Middle East. Some 52 percent of those interviewed agreed that "the U.S. should take all the steps, including the use of force if necessary, to insure that we have an adequate supply of oil from the Middle East." About 38 percent disagreed, and 10 percent expressed no opinion.

Ten weeks before, another national sample of American public opinion interviewed by The Post gave a quite different answer to the identical question. In a poll of 2,505 people Nov. 1-12, 49 percent disapproved the use of military force to secure oil, while 39 percent approved and 12 percent had no opinion.

A substantial number of persons -- 876 -- was interviewed in both polls. About one-fourth of these -- 231 -- shifted their positions from November to January in the direction of using military force.

A computer study of the makeup of this "swing group" disclosed scarcely any significant differences between them and the public at large in age, race, region, religion, political party or other factors that often divide groups. This suggests that the combination of events and presidential persuasion has resulted in a conversion of large dimensions across the board.

Closely related is another finding which reflects a shift. For the first time in more than a year of asking the question, The Post found a plurality of Americans, 47 to 43 percent, believing that "there really is an energy shortage." Previously a majority or large plurality had thought the energy shortage "a hoax."

The support of Americans for stronger policies in the military field ranged beyond the oil supply to the problem of confronting the Soviet Union, even at the risk of war. Asked to choose between two positions, 63 percent said, "We must face up to the Russians after this invasion of Afghanistan, even if that could lead to war." Only 25 percent said, "The Russian activity in Afghanistan is not a threat to U.S. national security and we should not overreact to what happens there."

Sen. Edward M. Kennedy (D-Mass.) charged last week that Carter's policies have created a "war hysteria" in the United States. Whatever the truth of this, an impressive swing in opinion is evident since the early-November polling, which came at the beginning of the Iran crisis.

At that time, 58 percent of the public agreed that "we should concentrate on problems here at home and not think so much in international terms." Only 22 percent took the alternate view that "the United States should maintain its position as the world's most powerful nation at all costs, even going to the very brink of war if necessary."

In still another shift, the lastest Post poll found 67-to-27 percent support for reimposition of the military draft "so that every physically fit young man serves in the armed forces." A similar question in November produced 54 percent support for the draft.

The new poll exposed a sharp difference in attitudes along age lines. Those 18 to 26 years old and thus subject to registration for the draft as proposed by Carter were in favor of the draft by a narrow 49 to 45 percent. Those over 26 favored the draft by an overwhelming 72 to 21. This was the only major difference among age groups in the response to questions involving the use of military force.

In other opinions supporting Carter's stands, the poll found.

Two out of three people (67 percent) said the United States should boycott the Moscow Olympic games because of the Afghanistan invasion.

By 51 to 38, the public opposed setting a deadline for the return of U.S. hostages held in Tehran since Nov. 4.

A 58-to-36 majority said criticism of Carter's handling of Iran by presidential candidates is "improper" so long as the hostages are being held.

A solid majority, 56 percent, said Carter is doing about as well as most presidents could in handling the hostage crisis; 27 percent said he is doing better than most, and 14 percent said he is doing worse.