"We've made it clear," an ebullient President Reagan told friendly members of Congress who helped him win his first great legislative victory, "that spending can be controlled and that our system works."

The political headline was simple to write after both House and Senate embraced the president's economic program: "Reagan's Wins First Budget Test." But behind the headline is a more complicated budgetary reality: a shift in national priorities that will alter American life and politics in ways that cannot be foreseen.

This week, for instance, the House and Senate Agriculture committees approved changes in the food-stamp program that would knock off 1 million beneficiaries. But the Senate voted yesterday for a defense program that will be costing $300 billion by 1984, nearly twice the current defense budget.

In other words, Reagan and Congress are fundamentally overhauling national priorities. Federal programs devoted to domestic problems are being curtailed; military spending is rising: To a large extent, the money is going from one to the other.

Reagan told a reception for members of Congress that there is an "X factor in human affairs -- a confidence or a spirit that makes men and women dream and dare and take greater risks." The Reagan program, particularly the prosposed tax cuts, will unleash that X factor, the president promised, reviving "the can-do spirit that made this country an industrial and economic giant."

There is also an X factor in the Reagan program, one that worries many members of Congress, including some who voted for the Reagan budget resolution. It includes: what will happen when cities lose about a quarter of their federal aid, when a million or more perosns are taken off of food stamps, when federal aid to education is drastically reduced and redirected?

What happens when the Pentagon is given what many members consider a blank check, and defense spending grows by billions every year, year after year?"

What happens to public attitudes if, as is likely, the Reagan economic program, sold as "budget-cutting" and austerity, ends up producing a federal deficit as big as any Jimmy Carter ever had?"

A few comparative figures help explain the way Reagan is altering his predecessor's final plans:

Carter, just before leaving office, proposed a budget for 1982 calling for outlays of $739 billion, tax revenues of $712 billion and a deficit of $27 billion. The Reagan budget proposal is smaller. It calls for outlays of $695 billion, tax receipts of $650 billion and a deficit of $45 billion (although administration officials already say it will be hard to keep the deficit this low).

In fiscal 1982, then, the new administration envisions a federal government trimmed by $44 billion from the one Carter suggested. But the Reagan budget cuts even more than that, about $49 billion, from the non-defense spending Carter proposed.

Reagan also proposes increasing defense expenditures by about $5 billion more than Carter wanted to raise them, which was a lot to begin with. (In 1983 and beyond Reagan wants much larger defense increases.)

Seen in a historical context, Reagan proposes to abandon the trend of government spending in the '70s, returning to a situation that is more typical of the other postwar decades.

In the '50s about half the U.S. budget went to defense; in the '60s it fluctuated around 40 percent. In the '70s defense fell to just one-fourth of all government spending. Under the Reagan budget it will get back to a third of the total by 1984, and will then be on a rising trend line.

Like the Carter budget (which is now a dead letter, useful only as a benchmark for comparisons), the Reagan budget calls for growth in the budget, not overall cuts.

The reductions that Congress has signaled a willingness to adopt would only slow the rate at which government will grow. With the huge Reagan defense program and the big tax cuts the White House wants, the government will go further into the red than it would have under the freer spending Carter approach.

Has Congress, in accepting the Reagan approach, chosen an economic plan that will merely increase the deficit and worsen inflation? The administration says no. It argues that problems that evolved over many years cannot be solved in one year.

But when taxes and domestic spending are cut, the White House promises, that X factor Reagan spoke of will go to work, the American economy will boom, the burden of government will shrink, and everyone will be better off, even those people who are now losing their food stamps.

"I have no doubt that we are going to give this experiment a chance," said Sen. Joseph R. Biden Jr. (D-Del.), one of the Democrats once known as liberals who voted for the Reagan budget proposals. "I think it deserves that chance, and will vote for it for that reason. However, I feel compelled to state that I am skeptical about the likelihood of this program's success."

The Reagan political steamroller has dealt harshly with skepticism like Biden's, and his prognosis seems accurate. So far, at least, the Reagan experiment seems destined to be part of the nation's future, whatever its ultimate consequences.