The notion of “Inner and outer” (Nei-Wai) is the polarity refining gender ethics in the Warring States and Han Dynasty. The phrase Nei-Wai defines the idea of “ the separation of men and women” (nan nü zhi bie 男女之别). Women were assigned to the inside, Nei, and men to the outside, Wai. The men were in charge of all affairs on the outside, the women managed the inside affairs. This notion was supported by the authority of the Five Classics, especially the Book of Changes (Yi Jing), the Book of Odes (Shi Jing), and the Book of Rites (Li Ji.)
According to the Book of Rites, one of the five Confucian classics, “Male and female should not sit together, not have the same stand for clothes, nor use the same towel and comb, nor let their hands touch in giving and receiving. A sister-in-law and brother-in-law do not interchange inquiries. Outside affairs should not be talked of inside the threshold [of the women’s apartments), nor inside affairs outside it.” (translated by Raphals 1998, 224) Beginning in the Song Dynasty, Neo-Confucian philosopher Sima Guang elaborated the precepts for the spatial segregation. He stated the front courtyards were the outer quarters used to receive visitors and conduct business, and the inner quarters were at the back of the house building, separated from the rest of the house by an interior gate. The Neo-Confucian philosopher Zhu Xi (1130-1200) developed the notion of spatial segregation in his Family Ritual (ca. 1169), and this notion was incorporated into the officially legal code for the society.
The inner quarters were a place for sleeping and womenly work as well as the leisure time of family. In a wealthy family, each married woman had a private room where she kept her private belongings and dowry. The female bedroom would contain an elaborate bed hung with draperies, the desk for reading, writing, and painting, tables and chairs, and a washstand with bowl and towels. The women also had living objects, such as toilet articles, mirrors, sewing boxes, and wooden boxes. The wood boxes with the locks could be used as her clothes chests, jewelry boxes, and household goods. Moreover, women conducted their work within the inner quarters. The inner quarters might include heated rooms for raising silkworms or sheds housing elaborate draw-looms or reeling machines.
 The Book of Rites ( Lǐ Jì 礼记), is written by the Confucian scholar Dai De (戴德) during the Former Han Dynasty (206 BCE-8 CE). It is a collection of texts describing the social forms, administration, and ceremonial rites of the Zhou Dynasty as they were understood in the Warring States and the early Han periods.
 Francesca Bray, “The Inner Quarters: Oppression or Freedom?” in House Home Family: Living and Being Chinese, ed Ronald G Knapp and Kai-yin Lo, Honolulu: University of Hawaii Press, 2005, 259-79.