Hundreds or thousands of Chinese family names have been historically used by Han Chinese and Sinicized Chinese ethnic groups in mainland China, Taiwan, and among overseas Chinese communities. In ancient times two types of surnames, family names (xìng) and clan names (shì), existed.Prior to the Warring States Period (fifth century BC), only the royal family and the aristocratic elite could generally take surnames. Historically there was also difference between xing and shi. Xing were surnames held by the immediate royal family. They generally are composed of a nü (meaning “female”) radical which suggests that they originated from matriarchal societies based on maternal lineages. Another hypothesis has been proposed by sinologist Léon Vandermeersch upon observation of the evolution of characters in oracular scripture from the Shang dynasty through the Zhou. The “female” radical seems to appear at the Zhou period next to Shang sinograms indicating an ethnic group or a tribe. This combination seems to designate specifically a female and could mean “lady of such or such clan”. The structure of the xing sinogram could reflect the fact that in the royal court of Zhou, at least in the beginning, only females (wives married into the Zhou family from other clans) were called by their birth clan name, while the men were usually designated by their title or fief.
Prior to the Qin Dynasty (third century BC) China was largely a feudal society. As fiefdoms were divided and subdivided among descendants, so additional sub-surnames known as shi were created to distinguish between different seniority of lineages among the nobles though in theory they shared the same ancestor. In this way, a nobleman would hold a shi and a xing.
After the states of China were unified by Qin Shi Huang in 221 BC, surnames gradually devolved to the lower classes and the difference between xing and shi blurred.
Throughout most of Chinese history, surnames have served sociological functions. Because of their association with the aristocratic elite in their early developments, surnames were often used as symbols of nobility. Thus nobles would use their surnames to be able to trace their ancestry and compete for seniority in terms of hereditary rank. hinese emperors sometimes passed their own surnames to subjects as honors. Unlike European practice in which some surnames are obviously noble, Chinese emperors and members of the royal family had regular surnames except in cases where they came from non-Han ethnic groups. This was a result of Chinese imperial theory in which a commoner could receive the Mandate of Heaven and become emperor. Upon becoming emperor, the emperor would retain his original surname. Also as a consequence, many people also had the same surname as the emperor, but had no direct relation to the royal family.
The Tang Dynasty was the last period when the great aristocratic families, mostly descended from the nobility of pre-Qin states, held significant centralized and regional power. The surname was used as a source of prestige and common allegiance.During the Song Dynasty, ordinary clans began to organize themselves into corporate units and produce genealogies. This trend was led by the poet Su Shi and his father. As competition for resources and positions in the bureaucracy intensified, individuals used their common ancestry and surname to promote solidarity. They established schools to educate their sons and held common lands to aid disadvantaged families. Ancestral temples were also erected to promote surname identity. Clan cohesion was usually encouraged by successive imperial governments since it aided in social stability.As a result of the importance of surnames, rules and traditions regarding family and marriage grew increasingly complex. For example, in Taiwan, there is a clan with the so-called “double Liao” surname. The story is that “Chang Yuan-zih of Liao’s in Siluo married the only daughter of Liao San-Jiou-Lang who had no son, and he took the oath that he should be in the name of Liao when alive and should be in the name of Chang after death.” In some places, there are additional taboos against marriage between people of the same surname, considered to be closely related. Conversely, in some areas, there are different clans with the same surname which are not considered to be related, but even in these cases surname exogamy is generally practiced.