A $20.6 million building for Washington's old Dunbar Senior High School opened yesterday, an expensive monument of hope in one of the city's poorest areas and a focus of controversy about its architecture and school traditions.

The air-conditioned school, at New Jersey Avenue and N Street NW, has large "open space" rooms with few walls and few windows, a 90-foot-high central tower, escalators, and an Olympic-size indoor swimming pool.

It replaes asturreted red-brick building at the other end of the same city block that was built in 1916 as the city's only academic high school of blacks.

Until 1954, when the Supreme Court struck down school segregation, Dunbar was a strictly academic school, drawing the brightest black youngsters from throughout the city and sending about 80 per cent of them on to college.

Dunbar since has become a neighborhood high school, drawing its studends from some of the poorest neighborhoods in the city. It has the same difficult problems of discipline, absenteeism and low academic achievement that beset schools in big city slums throughout the country.

Yesterday, ast the new building opened, principal Phyllis Beckwith announced, "We have been second-class citizens too long. Now we have a building that's first-class, and we must have pride in it."

But about 20 per cent of the students were absent on opening day, which was the first day after Easter vaction.

In early afternoon, the escalators stopped running, and Mrs. Beckwith said they had been turned off by student pranksters.

"It is your buddies, your classmates, your peers who are doing this," she announced over the loud-speaker. "If they do this again, you will be walking the rest of the week, I am very very disappointed. We do not want people here who do not know how to appreciate this building."

Later she told the students: "Despite the escalator incident, most of you have been doing beautifully."

Most of the students themselves seemed enthusiastic about the new shcool, although some were confused by it unsual design.

"It's No. 1, man," said Norman Williams, a 16-year-old sophomore. "It's the baddest structure in the District, and in Maryland and Virginia, too. It's a mean building, man. It's mean."

Williams explained that he means the building is first-rate.

An obviously tired girl who was climbing a ramp complained, "There are so many areas. It's like going around in circles. Imagine going through all this every day."

The school's central tower is 10 stories high, but most of the floors don't go from wall to wall. Instead, they are arranged in staggered split levels of five floors and five intervening mezzanines.

Yesterday, the school opened separate large wings for home economics and business courses and for the gymnasium, armory and pool. It also will have a large auditorium with professional stage equipment in another wing, expected to be ready by June.

These facilities take up a considerable amount of space - 343,380 square feet for a capacity of 1,566 students. (Dunbar has about 1,350 enrolled now.)

In contrast, the new South Lake Senior High School under construction in Fairfax County will have 316,000 square feet of space for a capacity of 2,400 students. The cost of the Fairfax school which is two stories high on a large property, was $9.2 million, slightly under half the cost of Dunbar.

The open-space design at Dunbar is warmly welcomed by some teachers as a way to encouraged individualized teaching techniques and to cut down on discipline problems by doing away with the halls where trouble-making often occur.

Others, though, seem concerned about increased noise and distraction. To meet their complaints, several floors have been divided up by partitions. The partitions, however, stop about 18 inches below the ceiling and are open at the corners. By yesterday afternoon, some teachers already had moved file cabinets into the corners of their classroom areas to try to make-them more private.

The new building also has caused unhappiness amng some Dunbar alumni who won a court injunction last month blocking the demolition of the old Dunbar building, which was scheduled to make way for a track and football field.

Mary Hundley, chairman of the board of the alumni group, said the building represents "a history that shouldn't be destroyed and forgotten." She said the old building should be refurbished and opened to he as it once was as a school for Washington's brightest students, only integrated with both blacks and whites.

Most of the students who now go to Dunbar want their track and football field, not the old building that has fallen into disrepair.

"We're proud to have this school," said James Alston, an 18-year-old senior. "And we'll see that it's properly taken care of. We want it to be the best-run school in the city."