Liz Magopa's ticket into the uncertain pleasures of the most affluent life that blacks are supposed to find in south Africa's cities came with the secretarial course she completed a year ago.

Bright and personable, hear wardrobe chosen with a flair and confidence uncommon in a country of downdy-dressing working women, the 23-year-old secretary now earns six times as much as her mother, an uneducated widow, who gets $35 a month as a full-time maid for a white family.

Despite her financial breakthrough and the new clothes bought in celebration, Magopa continues to dress each morning by lantern light, in a 12-foot-by-9-foot combination bedroom-living rom she shares with two sisters. Her mother and another younger sister sleep in the only other room.

"I could earn 600 times as mush as my mother and I would still be assigned to that house, which has no electricity or indoor toilet. Around us live a doctor, a pickpocket, a teacher and a garbage man," she says with bitterness.

Money isn't everything for urbanized black South Africans. When it comes to determing where they live or who their neighbors are, it isn't anything.

Across the Soweto housing compound where Magopa lives, patients line up between a Mercedes limousine and a large house trailer parked in front of the clinic of one of Soweto's most successful and wealthy physicians.

He owns a luxury speed boat he keeps in the country, and other sysmbols of material distinction - and he sleeps in the trailer in the yard.

Recently divorced, he turned over to his former wife the house they had been assigned by the white bureaucracy that runs Soweto and the world's most restrictive system of official segregation. The physician's name went to the bottom of a list of 20,000 families seeking housing in Soweto - where 761 houses were built in the last full year of construction.

The names are registered on 5-by-7 index cards stacked in bins and color-coded by tribal origin rather than income levels or family size.

One day recently, a clerk pulled a card filled in by a Zulu bus-driver one day after his marriage in 1971. Now, three children later, the family was being assigned a two-room house and could finally move out of the matching two-room dwelling of the bus-driver's parents.

The bureauerats who administer the system of discrimination and control known as apartheid - "separateness" in the Afrikaans language of the dominant white community - help keep long-standing and frequently explosive tribal rivalries alive within the black majority by assigning urban housing on a tribal basis.

But the secretary, the doctor and the bus-driver are members of a new tribe coalescing in the industrial centers of South Africa, under the contradictory demands of a modern economy that needs their skills and apartheid's restrictions on their abilities to educate and house themselves and to use their labor and capital freely.

This small but influential black middle class shares common economic interests and educational backgrounds that outweigh the tribal loyalties and the rural culture that were binding forces for previous Africa generations.

This elite escapes some of the familiar and harsher features of apartheid that have enflamed race relations here. The well-dressed Liz Magopa can frequently neglect to carry the "reference book" that less-well-dressed young laborers are jailed for not carrying. The doctor can afford to lunch in the half-dozen expensive Johannesburg hotels authorized to serve blacks. The bus-driver can buy his house, although not the land on which it stands.

But it is still one of the world's most vulerable elites, trapped between the government's skillful manipulation of an elusive carrot and a heavy stick to keep urban blacks divided and running, and the demands of its own children for more freedom.

"Many of the young men think I don't have to carry a pass like they do," said T. W. Kambule, an African educator who speaks out forcefully against apartheid. "Intellectuals in this society run a double danger."

A Soweto woman whose business brings her into contact with whites asked her teen-age children to see her home through riot-torn Soweto after a business meeting in Johannesburg last August, and was told:

"Mama, if you're still talking to whites, you deserve to have your throat cut. You'll have to look after yourself."

Moderates of both races assumed that the middle class would be an important bridge between black and white in attempts to evolve peacefully toward a multiracial society. Now, the sharp and specific frustrations of the middle class are feeding black nationalist sentiment and the urban uprisings for the past seven months that have shaken this white-ruled country at the tip of Africa.

The occasional comparisons of the black middle class here to the rising bourgeoisie that staged the French revolution are clearly overstated; but much of the new political turbulence of South Africa flows from the blocked aspriations of this racial economic interest group, whose education and affluence are rising faster than the outlets available to them.

"Young people coming out of middle-class families have arrived at a stage where the basic struggle for survival is ended," said J. L. Sadie, one of South Africa's most respected Afrikaner economists. "They want something better, and have other ideas about getting it."

Nearly a third of the country's 18 million Africans have been drawn into the cities and mining compounds that the government has decreed are "white" property, reserved for occupation and ownership by the country's 4.3 million whites.

About 40 per cent - mostly women, children and old men - have remained in the tribal reserves that are being converted into "independent" homelands to be ruled by Africans. The third large slice of the African population lives and works in the isolation of white-owned farms.

Apartheid was established to keep the Africans in the homelands and out of the cities, and to control as tightly as possible those who did slip through.

Industrialization's demand for black labor largely defeated the first aim and is now giving apartheid its gravest test. A permanent black urban population of nearly 5 million has grown up in the past three decades despite the most strenuous efforts of apartheid's planners, who required blacks to live in Soweto and other all-black housing compounds and then refused to sell them land in these compounds.

This underscores to the blacks, and to the white electorate, that they are supposed to be "temporary sojourners" without any permanent rights or interest here except the labor they sell to white-owned industry and commerce.

Now, in the wake of the worst urban rioting in the country's history, the government and its more liberal crities in the business community are suddenly concentrating their efforts on improving the amenities offered to this urbanized population. African housing and education are suddently being reexamined, and some of the rules of apartheid changed.

African housing goes to the heart of apartheid. In a reversal of standard economic laws, access to a house is the key to getting a job here. Moreover, homesteading is visible defiance of apartheid's rapidly fading dictate that white South Africa would not have a permanent urban black population.

"The government doesn't ever talk about sending all Africans back to the homelands any more," said Soweto's "Mayor" David Thebehali, whom many militants accuse of being a pro-government sell-out. "They accept now that we are here to stay."

Before 1968, blacks could get 30 year leases on homes. determined to stop the flow of Africans to the cities, the government halted all leases, cut back on the number of new houses it was building and increased the number of hostels for single immigrant workers. It also stepped up its campaign of expelling Africanw without urban-residence permits back to the jobless rural homelands.

As signs of urban unrest grew last year, the government began to relax this severe policy. It first went back to 30-year leases and then announced, after the first wave of riots, that leases could be bought by Africans for "indefinite" periods, implying but not stating that they would be in perpetuity.

The government has also made it clear that Africans will never be allowed to buy the land on which the houses stand, because this is "white" land. Expanding on laws passed in 1913, the Nationalist Party government allows Africans to buy land only in the 13 per cent of the country covered by the "homelands."

Without a clear title, urban Africans will not be able to get mortgages from most banks for the $2,000 an average Soweto house costs. Although the housing office there had received 11,000 queries in the first month of the program's opertion, only 106 Africans signed contracts to buy Soweto houses.

Even the concessions the government is prepared to make toward the black middle class appear to be caught on a treadmill, overtaken by economic political and demographic trends.

Having failed to build more houses and improve the black ghettos when it was economically feasible, the government now finds itself strapped for cash and unable to carry out many of the improvements it admits are needed to dampen black anger.

About 75 per cent of the 100,000 houses in Soweto are without electicity. An official from the township's administration board estimates that it would cost $50 million to electify them, and an equal amount to build the 20,000 houses already needed to cope with the housing backlog. "We don't have a cent," he said. "We are completely broke."

Private businessmen - led by mining magnates who control more than 70 per cent of the non-Communist world's gold exports, which have brought enormous windfall profits in recent years - have promised to set up a fund to improve Soweto housing and provide some mortgage money.

"It may sound paternalistic," admitted Liberal parliamentarian Helea Suzman, "but it is all that can be done right now."

"The crux of the problem is not owning a house in Soweto," said Kambule, the principal. "It is owning a house where I want to live. The white man has been giving us a slice of bread at a time. Now we want the thing. We will slice the loaf ourselves."

Adds Nimrod Mkele, a black writer and intellectual: "I am a middle class individual and the whites have been exploiting this. We are always thrown back on our blackness. Well, I'm through being reasonable. Now I say what I want to say. Blacks have noticed that the size of the pay packet is related to whether or not they have any political say."

Education triggered the new racial confrontation in South Africa. Once viewed as a gateway to advancement, when white and black shcools taught the same subject, the renamed and reorganized "bantu education," has come "to be seen as a vehicle of enslavement," asserts a black clergyman.

African students quickly escalated their protest at being forced by the white administration to learn Afrikaans as well as English and a tribal vernacular in their separate curriculum into a general indictment of the educational system.

It is an overcrowded, poorly managed system in which only seven out of every 1,000 African student who start primary school graduate from high school. Black parents have to pay raises and school construction costs that the government pays for white parents.

"It doesn't matter if I graduate." said a young back student. "If I graduate, they still send me to the kitchen to cook because I am black. For the boy, he has to become a driver. They don't prepare us to do the jobs we could do."

"I don't have the skills of the white secretaries, that is true," said Liz Magopa in considering that her white counterparts make twice as must as she does. "But none of the schools the white will let us go to teach you those things. If they dany me the education, they should pay me the difference anyway."

Police repression of black political activity is also taking a dreadful toll of people who may want to be middle class but who are given little chance under apartheid.

Shortly after her children told her she should stop talking to whites, the Soweto businesswoman mentioned earlier was arrested and held for six months without charges, evidently for interrogation. So was her husband.

"They were certainly not terrorists when they were picked up," said a white friend. "But her business is in ruins now, and his professional practice is shot. If I were them, I would be tempted to think there would be nothing left but terrorism to make this stupid government change."