The Thai greeting referred to as the wai (Thai: ไหว้, pronounced [wâːj]) consists of a slight bow, with the palms pressed together in a prayer-like fashion. It has its origin in the Indian Añjali Mudrā, like the Indian namaste and Burmese mingalaba. The higher the hands are held in relation to the face and the lower the bow, the more respect or reverence the giver of the wai is showing. The wai is traditionally observed upon formally entering a house. After the visit is over, the visitor asks for permission to leave and repeats the salutation made upon entering. The wai is also common as a way to express gratitude or to apologise.

Origins
The wai gesture originated in Buddhism and has similar origins as namaste in Hinduism. It was basically a yogic posture of the palms and signifies the equal meeting of the two palms. It means that the other party is treated as an equal human being.The word often spoken with the wai as a greeting or farewell is "sawatdi" (RTGS for สวัสดี, pronounced [sā.wàt.dīː], sometimes romanized as sawasdee). This verbal greeting is usually followed by "kha" when spoken by a female and by "khrap" when spoken by a male person (see note on Thai polite particles). The word sawatdi was coined in the mid-1930s by Phraya Upakit Silapasan of Chulalongkorn University. Derived from the Sanskrit svasti (स्वस्ति meaning 'well-being'), it had previously been used in Thai only as a formulaic opening to inscriptions. The strongly nationalist government of Plaek Phibunsongkhram in the early–1940s promoted its use in the government bureaucracy as well as the wider populace as part of a wider set of cultural edicts to modernise Thailand.

Usage
Waiing remains to this day an extremely important part of social behavior among Thais, who are very sensitive to their self-perceived standing in society. It is also frequently used as an accompaniment to an apology, sometimes even serving as a "get out of jail free card". Foreign tourists and other visitors unaccustomed to the intricacies of Thai language and culture should not wai someone younger than them except in return for their wai. However, one should always return a wai that is offered as a sign of respect. Corporate wais, such as those performed by convenience store cashiers, generally are reciprocated with a smile or a nod.
If one receives a wai while carrying goods, or for any reason that makes returning it difficult, one should still show their respect by making a physical effort to return it as well as possible under the circumstances.

Similar gestures in other countries
Pranāma or Namaste, the part of ancient Indian culture has propagated to Southeast Asia, which was part of indosphere of greater India, through the spread of Hinduism and Buddhism from India. It has influenced the following nations.
In China, similar greetings—called suk sabaidee by Tai Lue people (Xishuangbanna) and ᥛᥬᥰ ᥕᥧᥱ ᥘᥤ ᥕᥧᥱ ᥔᥣ? by Tai Nua people (Dehong Dai).
In Cambodia, Laos, and Myanmar, similar greetings—called chum reap sour (ជំរាបសួរ),  sabaidee (ສະບາຍດີ), mingalaba (မင်္ဂလာပါ), maur sung kha (မႂ်ႇသုင်ၶႃႈ) (Shan people) respectively—are also in use.
In Indonesia, wai-like gestures are in use in various parts of the country, in the royal courts of Java it is called sembah (Javanese: ꦱꦼꦩ꧀ꦧꦃ, Sundanese: ᮞᮨᮙᮘᮃᮠ, Balinese: ᬲᬾᬫ᭄ᬩᬄ), and also common in Lombok and Bali, where Hinduism and Buddhism is or has been widely practiced. In Bali the greeting word spoken during the sembah is om swastiastu, which is equivalent to sawatdee in Thai. Both originated from the Sanskrit svasti. In Sanskrit svasti means "safe, happy, and prosperous", and astu means "be it so". Thus Om Swastiastu means: "Oh God, I hope all goodness (safety, happiness, and prosperity) comes from all directions."In Malaysia and Brunei, it was historically used to convey thanks or salutations to a patron or higher personage, with the hands raised to a level in accordance with the rank or caste of the individual to whom it was directed. It is still used in the presence of Malaysian or Bruneian royalty.
In the Philippines, although not used as a greeting gesture, similar wai-like gestures (the clasping of both hands at the stomach-level, chest-level or chin-level) are used to convey heartfelt gratitude to a helper or benefactor, especially if that benefactor's social status is above that of the one who is assisted. This has its origins in the pre-Hispanic and pre-Islamic Hindu-Buddhist beliefs and customs of the archipelago. It is still used as a salutation before and after the pangalay dance of the Tausug and Bajau peoples of the Sulu Archipelago.
In South India and Sri Lanka,  a similar gesture is used to  greet. In Tamil for instance, the greeting expression Vanakkam (வணக்கம்), meaning greeting, is derived from the root word vanangu (வணங்கு), meaning to bow or to greet. In Sinhalese, "Ayubowan", meaning, "may you live longer", is used. The gesture is commonly used to greet people in India.

See also
Añjali Mudrā
Gassho
Indian honorifics
Namaste
Sampeah
Sembah
Thai culture

Further reading
Diller, Anthony (1991). National Identity and Its Defenders. Chapter 4: "What Makes Thai Central Language". ISBN 974-7047-20-9.

References
External links
Learn Thai - Lesson 2: Thai Greetings and how to WAI on YouTube