It is used also in other historical, religious and cultural contexts, for example in Hinduism, Occultism and Islam and in last centuries as Jewish identity too.
In mathematics, the G2 root system is in the form of a hexagram.
The hexagram, as a simple geometric shape, like for example the triangle, circle, or square, has been created by various different peoples with no connection to one another. But there is a belief that King David had used it as an emblem. Some say that Solomon had it on his ring too.
The hexagram is a mandala symbol called satkona yantra or sadkona yantra found on ancient South Indian Hindu temples. It symbolizes the nara-narayana, or perfect meditative state of balance achieved between Man and God, and if maintained, results in "moksha," or "nirvana" (release from the bounds of the earthly world and its material trappings).