The siheyuan's gate is usually at the southeastern corner according to the traditional concepts of the five elements that were believed to compose the universe, and the eight diagrams of divination. Normally there is a screen-wall inside the gate so that outsiders cannot see directly into the courtyard and it is also believed to protect the houses from evil spirits. Outside the gate of some large siheyuan, there is a pair of stone lions on each side. Such a residence offers space, comfort and quiet privacy. It is also good for security as well as protection against dust and storms.
The gates are usually painted vermilion and have large copper door rings. Usually a whole family lives in compound. The elder generation lives in the main house, the younger generation live in the side houses, and the south house is usually their sitting room or study.
All the siheyuans, from their size and style one could tell whether they belonged to private individuals or the powerful and rich. The simple house of an ordinary person has only one courtyard with the main building on the north facing, across the court, the southern building with rooms of northern exposure and flanked on the sides by the buildings of eastern and western chambers. The mansion of a titled or very rich family would have two or more courtyards, one behind another, with the main building separated from the view of the southern building by a wall with a fancy gate or by a guoting (walk-through pavilion). Behind the main building there would be a lesser house in the rear and, connected with the main quadrangle, small "corner courtyards".
Not only residences but also ancient palaces, government offices, temples and monasteries were built basically on the pattern of the siheyuan, a common feature of traditional Chinese architecture.
Some large siheyuans have two or more courtyards, inhabited by an extended family with several generations. "Four Generations under One Roof", a novel by the contemporary writer Lao She, depicts Beijingers in the 1930s and 1940s living in siheyuan.
Beijing still has about 400,000 residential quadrangles now, mainly distributed over the East, West, Xuanwu and Chongwen districts. The municipal government has earmarked a number of siheyuans for protection.