The Bagua (Chinese: 八卦; pinyin: bāguà; literally: "eight symbols"), or Pa Kua, are eight trigrams used in Daoist cosmology to represent the fundamental principles of reality, seen as a range of eight interrelated concepts. Each consists of three lines, each line either "broken" or "unbroken," respectively representing yin or yang. Due to their tripartite structure, they are often referred to as "trigrams" in English.
The trigrams are related to Taiji philosophy, Taijiquan and the Wu Xing, or "five elements". The relationships between the trigrams are represented in two arrangements, the Primordial (先天八卦), "Earlier Heaven" or "Fu Xi" bagua (伏羲八卦), and the Manifested (後天八卦), "Later Heaven," or "King Wen" bagua. The trigrams have correspondences in astronomy, astrology, geography, geomancy, anatomy, the family, and elsewhere.
The ancient Chinese classic, I Ching (Pinyin: Yi Jing), consists of the 64 pairwise permutations of trigrams, referred to as "hexagrams", along with commentary on each one.
There are two possible sources of bagua. The first is from traditional Yin and Yang philosophy. This is explained by Fuxi in the following way:
無極生有極、有極是太極、
太極生兩儀、即陰陽;
兩儀生四象: 即少陰、太陰、少陽、太陽、
四象演八卦、八八六十四卦
Wújí shēng yǒu jí, yǒu jí shì tàijí
Tàijí shēng liǎngyí jí yīnyáng
Liǎngyí shēng sìxiàng: jí shǎo yīn, tàiyīn, shǎo yáng, tàiyang
Sìxiàng yǎn bāguà bābāliù shísì guà