The ba gua (Chinese: 八卦; pinyin: bā guà; Wade-Giles: pa kua; literally "eight symbols") are eight diagrams used in Taoist cosmology to represent the fundamental principles of reality, seen as a range of eight interrelated concepts. Each consists of three lines, each either "broken" or "unbroken," representing a yin line or a yang line, respectively. Due to their tripartite structure, they are often referred to as "trigrams" in English.
The trigrams are related to taiji philosophy and the wu xing, or "five elements" . The relationships between the trigrams are represented in two arrangements, the Primordial (先天八卦), "Earlier Heaven" or "Fuxi" 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 consists of all 64 possible pairs of trigrams (called "hexagrams") and commentary on them.
The eight trigrams are:
* ☰ Qián (Tian1) 天 "Heaven"
* ☱ Duì (Ze2) 澤(泽) "Lake/Marsh"
* ☲ Lí (Huo3) 火 "Fire"
* ☳ Zhèn (Lei2) 雷 "Thunder"
* ☴ Xùn (Feng1) 風(风) "Wind"
* ☵ Kǎn (Shui3) 水 "Water"
* ☶ Gèn (Shan1) 山 "Mountain"
* ☷ Kūn (Di4) 地 "Earth"
Relation to other Principles
There are two possible sources of bagua: The first is from traditional Yin and Yang philosophy. The interrelationships of this philosophy were described by Fuxi in the following way:
The Limitless (Wuji) produces the delimited, and this is the Absolute (Taiji)
The Taiji produces two forms, named yin and yang
The two forms produce four phenomena, named lesser yin, great yin (taiyin also means the Moon), lesser yang, great yang (taiyang also means the Sun).
The four phenomena act on the eight trigrams (ba gua), eight eights are sixty-four hexagrams.
Another philosophical description of the source is the following, attributed to King Wen of the Zhou Dynasty: "When the world began, there was heaven and earth. Heaven mated with the earth and gave birth to everything in the world. Heaven is Qian-gua, and the Earth is Kun-gua. The remaining six gua are their sons and daughters".
The trigrams are related to the five elements of wu xing, used by feng shui practitioners and in Traditional Chinese Medicine. Those five elements are metal, fire, earth, wood, and water. The Water (Kan) and Fire (Li) trigrams correspond directly with the Water and Fire elements. The element of Earth corresponds with both the trigrams of Earth (Kun) and Mountain (Gen). The element of Wood corresponds with the trigrams of Wind (Xun) (as a gentle but inexorable force that can erode and penetrate stone) and Thunder (Zhen). The element of Metal corresponds with the trigrams of Heaven (Qian) and Lake (Dui).
Bagua used in Feng Shui
The Bagua is an essential tool in the majority of Feng Shui schools. The Bagua used in Feng shui can appear in two different versions: the Earlier Heaven Bagua, used for burial sites and the Later Heaven Bagua, used for the residences.
Xiantian Bagua or Earlier Heaven Bagua
In Xiantian Bagua, also known as Fu Xi (2852 - 2737 BCE) Bagua, the Heaven is in the higher part and the Earth is in the lower part. The trigram Qian (Heaven) is at the top, in the South (in the past, the South was located at the top in Chinese maps), and Kun (Earth) at the bottom, in the North. Li (Fire) and Kan (Water) on the left and on the right-hand side form a pair. Zhen (Thunder) and Xun (Wind) form another pair, while being one opposite the other. Gen (Mountain) and Dui (Lake) form another pair, while being one opposite the other, in balance and harmony. The adjustment of the trigrams is symmetrical by forming exact contrary pairs. They symbolize the opposite forces of Yin and Yang and represent an ideal state, when everything is in balance.
Houtian Bagua or Later Heaven Bagua
The sequence of the trigrams in Houtian Bagua, also known as the Bagua of King Wen (1099 - 1055 BCE), describes the patterns of the environmental changes. Kan is placed downwards and Li at the top, Zhen in the East and Dui in the West. Contrary to the Earlier Heaven Bagua, this one is a dynamic Bagua where energies and the aspects of each trigram flow towards the following. It is the sequence used by the Luo Pan compass which is used in Feng Shui to analyze the movement of the Qi that affects us.
Bagua of the eight aspirations – also called Bagua Map
Feng Shui was made very popular in the Occident thanks to the Bagua of the eight aspirations. Each trigram corresponds to an aspect of life which, in its turn, corresponds to one of the cardinal directions. Applying Feng Shui using the Bagua of the eight aspirations made it possible to simplify Feng Shui and to bring it within the reach of everyone. The Masters of Traditional Feng Shui call it Neo Feng Shui or Mc Feng Shui, for its simplicity, because it does not take into account the forms of the landscape or the temporal influence or the annual cycles. The Bagua of the eight aspirations is divided into two branches: the first, which uses the compass and cardinal directions, and the second, which uses the Bagua by using the main door. It is clear that, not taking into account the cardinal directions, the second is even more simplified without any sense.
A bagua map is a tool used in modern forms of feng shui to map a room or location and see how the different sections correspond to different aspects in one's life. These sections are believed to relate to every area or aspect of life and are divided into such categories as fame, relationships/marriage, children/creativity, helpful people/travel, career, inner knowledge, family/ancestors/health, and wealth/blessings.
In this system, the map is intended to be used over the land, one's home, office or desk to find areas lacking good chi, and to show where there are negative or missing spaces that may need rectifying or enhancing in life or the environment.
For example, if the bagua grid is placed over the entire house plan and it shows the toilet, bathroom, laundry, or kitchen in the wealth/blessings area it would be considered that the money coming into that particular environment would disappear very fast, as if to be 'going down the drain.'
In popular culture
A Tibetan "Mystic Tablet" containing the Eight Trigrams on top of a large tortoise (presumably, alluding to the animal that presented them to Fu Xi), along with the 12 signs of Chinese Zodiac, and a smaller tortoise carrying the Lo Shu Square on its shell
The Unicode character set has characters for each of the eight trigrams at codepoints U+2630 to U+2637: ☰☱☲☳☴☵☶☷
In the cartoon Jackie Chan Adventures, the trigrams are each written on a face of the Pan Ku Box.
The creators of the television series Lost incorporated the bagua symbol into the logos for the DHARMA Initiative stations found on and off the island.
In the anime/manga Naruto, the clan known as the Hyuga clan uses combat based on the Eight Trigrams, with their main attack called the Eight Trigrams Sixty-Four Palms, involving a series of heavy strikes into pressure points on the opponent's body, or as a means of fast weaker attacks against many opponents.
In the anime Cowboy Bebop, episode titled Boogie Woogie Feng Shui, the device that Maefa uses with the Sunstone contains trigrams from the Bagua, shaped in a Octagon that has a gyroscopic outer and inner ring. The device was used as a MacGuffin of sorts to get Maefa and Jet Black out of trouble. This would be in contrast to the Sunstone, which functions more as a Plot coupon: it not only powered the device, but was destroyed with a single shot from Spike's Swordfish II and opened a rift in hyperspace to provide a resolution to the story.
In the anime/manga Outlaw Star, there is a form of energy called Tao Magic which is employed extensively by the Kei Pirates. There is a somewhat obscure bagua reference near the end of the series when the Kei Pirate Hazanko constructs a method to force the Galactic Leyline open. When the method is completed, a giant bagua-like shape appears in space with the Leyline as the center just before the way inside is opened.
The map is also seen briefly in Quest mode of the popular video game Tao Feng: Fist of the white Lotus
The 8 Diagrams, an album released by The Wu-Tang Clan in 2007, features an adaptation of the Bagua map on its cover. The title of the album itself is a reference to the eight trigrams that are found around the outside of the map.