The Five Elements are Metal, Water, Wood, Fire and Earth. They can be broken down into Yin and Yang as Yang Wood, Yin Wood, Yang Fire, Yin Fire, Yang Earth, Yin Earth, Yang Water and Yin Water . They also have affinity and enmity interrelationships.
Affinity Relationship (Attraction)
A lot of ancient Chinese philosophy came from observing the laws of nature. One legend tells of how ancient Chinese philosophers saw a diagram on the back of a horse (maybe a hippopotamus) coming out of river just like this . One and six are at the bottom, two and seven are on the top, three and eight are on the left, and four and nine on the right and five and ten are at the center. Odd (Yang) and even (Yin) numbers together just like husband and wife. So they applied this numerology on the Heavenly Stem sequence.
There is an Affinity/Attraction Relationship when the difference of two Stem sequences is five.
When it applies on the Chinese Fortune Calendar, If your DAY stem is a Yang Wood, the Yin Earth represents your spouse. Yin Water represents your mother (Water helps Wood grow and Yin is the female sex). Yang Earth represents your father (Yang Earth and Yin Water love each other).
Enmity Relationship (Fighting/Rejection)
The enmity relationship is determined from the direction of elements. Ancient Chinese considered "face to face" as the enmity relationship. Wood is in the east and faces Metal in the West. Water is in the north and faces Fire in the south. They dislike each other, so they live in different places. When Yang meets Yang or Yin meets Yin, they reject each other which is also natural.
There is an Enmity/Fighting Relationship when the difference of two Stem sequences is six.
The affinity and enmity relationships affect the power level of the lucky element. (Find your lucky element from Chinese Fortune Calendar)
When Yang Wood (1) meets Yin Earth (6), they generate Earth element. If the lucky element is Wood, the power level of it decreases. If the lucky element is Earth, then power level of it increases.
When Yang Wood (1) meets Yang Metal (7). they will fight each other. If the lucky element is Wood, the power level of it decreases.