When Ronald Reagan was inaugurated four years ago, the ceremony seemed an actor's dream in which the new president played himself in a movie destined to have a happy ending. For Reagan, everything was right about that first day four years ago. Even the chilly Washington weather cooperated, turning into a January thaw that provided a balmy touch of California Camelot for Reagan's inauguration as 40th president of the United States

On a day when high fashion returned to the inaugural ceremonies and U.S. hostages were released from captivity in Iran, Reagan stood on the reconstructed west front of the U.S. Capitol and talked about American heroes who had died at the Argonne, Omaha Beach, Pork Chop Hill and ''a hundred rice paddies and jungles of a place called Vietnam.''

In that speech four years ago, Reagan did not mention the Soviet Union. Other than in a general way, he did not refer to the worsening economic conditions. He spoke, as in a movie, of his vision of America and said, in a memorable line, ''We have every right to dream heroic dreams.''

It is different now. After four years in the White House and slightly more than two weeks before his 74th birthday, Reagan has matured from an actor who seemed magically to become chief executive into the president of the United States.

In the intervening four years, he has survived a would-be assassin's bullet with grace and courage, scored a stunning triumph over a Democratic House of Representatives with a budget that was supposed to have no chance of passage and presided over an economic recovery that defied all predictions but his own.

He also has learned the hard way, as presidents do, that the world imposes its own realities on even the most fortunate of nations. He has learned, at frightful cost to men who served there, that U.S. Marines do not bring peace to Lebanon. He has learned that the government in Peking, not Taipei, speaks for China. He has learned that bitter denunciation of the Soviet Union as ''the focus of evil'' and ''the evil empire'' does not improve the chance for world peace.

In these four years, Reagan has been called many things by man people. He has been denounced as heartless and cruel for curtailing social programs that benefited the poorest Americans. He has been hailed for restoring the spirit and patriotism of a nation that had drifted into doubt and uncertainty.

Even Reagan's detractors acknowledged his public-relations skills and hailed him as ''The Great Communicator.'' But even Reagan's supporters admitted that he sometimes spoke without knowing the facts and pictured the world the way he wanted it to be rather than the way it was. Former vice president Walter F. Mondale, whom Reagan defeated soundly last November, said the president practiced ''leadership by amnesia.''

Some Reagan aides, speaking under the ground rules of ''background'' that shieldedd their idetity and became a mainstay in the administration, would have agreed with Mondale.

But whatever the politicians said under whatever ground rules, whatever they thought and whether they admired Reagan or detested him, they agreed out one thing: Reagan could no longer be dismissed as an actor and never would be again.

The transformation from performer to president was evident in many ways.

It showed in Reagan's quiet confidence in his economic program at a time when his economic advisers had all but abandoned it.

It showed his willingness to use the supposedly devalued currency ot the presidency to advance his agenda in the Congress and abroad.

It showed in his determination to aid anti-Sandinista rebels in Nicaragua, whom Reagan called ''freedom fighters,'' no matter what polls said about popular reluctance at such U.S. involvement.

It showed in his conviction, which grew steadily during his first two years in office but was never publicly enunciated, that he could do a better job than anyone else as chief executive. This is the sort of conclusion that presidents reach when they believe in what they are doing and are no longer playing a part.

Most of all, it showed in Reagan's brimming belief in himself and his country. One telltale sign, which few highlighted when it occurred, was Reagan's decision nearly a year before the 1984 election to debate his Democratic opponent.

Some of Reagan's more cautious political advisers wanted to delay the decision and turned out to be correct in believing that debates would not be politically necessary. But Reagan wanted to debate and, on the day that he formally announced his candidacy for reelection, he told the world that he would do so.

Up close, Reagan, seemed unchanged to those who had known him over the year.s He left details and sometimes decisions to others, and he lived up to his campaign maxim of 1980 that an executive who worked long, hard hours was a ''a bad executive.''

He sometimes scrambled his facts. He memorized what was important to him,even if it was wrong, and sometimes dismayed those around him by calling forth an anecdote that had no bearing on the subject under discussion.

He was courteous but distant to his staff, except for longtime intimate Michael K. Deaver, the deputy chief of staff, and a few members of his Cabinet who enjoyed his one-liners and off-color stories. Significantly, one member of this appreciative audience, no mean storyteller in his own right, was Treasury Donald T. Regan, who will be chief of staff in Regan's second term.

Reagan missed few opportunities to return to his beloved mountaintop ranch northwest of Santa Barbara, and few Americans seemed to begrude him these vacations.

He was, after all the quintessential California president, a laid-back cowboy who combined qualities of the Old West and modern southern California. At Rancho del Cielo, he rode horses for pleasure and worked his ranch from a jeep.

Reagan was vacationing at his ranch the day a Soviet fighter plane shot down a South Korean jetliner with 269 persons aboard. Aides wanted him to return to Washington immediately, but Reagan resisted, saying he could do everything from the ranch as president that he could do in the Oval Office. A day later, having made his point, Reagan returned to Washington.

Reagan's enduring quality was his optimism. When an aide briefed him during the depths of the 1981-82 recession, Reagan looked at several charts giving a gloomy picture of the economy and found one statistic hinging at an upturn. It was enough for the president, who used this one harbinger of hope to dispel all of the negative omens.

Although he is the oldest U.S. president, Reagan's vision was one of a glowing American future that would build on accomplishments of the past. He liked to talk of America's ''drive to the stars.'' This optimism was expressed in the campaign one-liner that promised little and suggested much: ''You ain't seen nothing yet.''

Reagan retained his boyhood optimism by cutting his losses.

He withdrew Marines from Lebanon after the catastrophic terrorist bombing there while proclaiming unwavering support for the embattled government of President Amin Gemayel.

He compensated partially for the overreaching nature of his income tax cuts by approving a 1982 tax increase that came to him disguised as tax reform.

Most important, he recognized that harsh rhetoric about the Soviet Union had become counterproductive and substituted conciliatory words for denumications even while remaining firmly committed to the defense buildup from which he has never wavered.

Now, at the start of a new term, Reagan is secure in a presidency that many believe will turn sour long before he leaves office.

At home, he is bedeviled by soaring deficits, troubled industries and a growing gulf between rich and poor. Abroad, his new start with the Soviets remains to be translated into concrete deeds and agreements.

But Reagan is secure in the belief, which he expressed repeatedly during the 1984 campaign, that the nation's best days lie ahead.

He understands the limitations of presidential power better than he once did, but he also intuitely understands the strengths of the presidency. He is willing to perserve for his agenda.

As he formally launched his second term today, no one is likely to think that Ronald Wilson Reagan is play-acting.

He is truly president now.