Yamas (Sanskrit: यम), and their complement, Niyamas, represent a series of "right living" or ethical rules within Hinduism and Yoga. It means "reining in" or "control". These are restraints for Proper Conduct as given in the Holy Veda. They are a form of moral imperatives, commandments, rules or goals. The Yamas are the "don't do these" list of self-restraints, typically representing commitments that affect one's relations with others and self. The complementary Niyamas represent the "do these" list of observances, and together Yamas and Niyamas are personal obligations to live well.
The earliest mention of the word Yamas is in the Rigveda, and over fifty texts of Hinduism, from its various traditions, discuss Yamas. Patañjali lists five yamas in his Yoga Sūtras. Ten yamas are codified as "the restraints" in numerous Hindu texts including Yajnavalkya Smriti in verse 3.313, the Śāṇḍilya and Vārāha Upanishads, the Hatha Yoga Pradipika by Svātmārāma, and the Tirumantiram of Tirumular.
The most often mentioned Yamas are – Ahimsa (non-violence), Satya (non-falsehood, truthfulness), Asteya (non-stealing), Mitahara (non-excess in food, moderation in food), Kṣamā (non-agitation about suffering, forgiveness), Dayā (non-prejudgment, compassion) are among the widely discussed Yamas. The Yamas apply broadly and include self-restraints in one's actions, words and thoughts.
The earliest mention of Yamas is found in the Hindu scripture Rigveda, such as in verse 5.61.2. The word in the Rigveda means a "rein, curb", the act of checking or curbing, restraining such as by a charioteer or a driver. The term evolves into a moral restraint and ethical duty in the Jain Agamas.
At least sixty (60) ancient and medieval era Indian texts are known so far that discuss Yamas. Most are in Sanskrit, but some are in regional Indian languages. Of the sixty, the lists in eleven of these texts are similar, but not the same, as that of Patanjali's. Other texts list between 1 and 10 Yamas, however 10 is the most common.
The order of listed yamas, the names and nature of each yamas, as well as the relative emphasis vary between the texts. Some texts use the reverse of Niyamas in other texts, as Yamas; for example, Vairagya (dispassion from hedonism, somewhat reverse of the niyama Tapas) is described in verse 33 of Trishikhi Brahmana Upanishad in its list for Yamas. Many texts substitute one or more different concepts in their list of Yamas. For example, in the ten Yamas listed by Yatidharma Sangraha, Akrodha (non-anger) is included as a Yamas. Ahirbudhnya Samhita in verse 31.19 and Darshana Upanishad in verses 1.14-15 include Dayā as a Yamas, and explain it as the ethical restraint of not jumping to conclusions, being compassionate to every being and considering suffering of others as one's own. In verse 31.21, Ahirbudhnya Samhita includes Kṣamā as the virtue of forgiveness and restraint from continued agitation from wrong others have done. Mahakala Samhita in verses II.11.723 through II.11.738 lists many of the 10 Yamas above, but explains why it is a virtue in a different way. For example, the text explains Dayā (or Dayaa) is an ethical precept and the restraint from too much and too little emotions. It suggests Dayā reflects one's inner state, is the expression of kindness towards kin, friend, stranger and even a hostile person, and that one must remain good and kind no matter what the circumstances. Refraining from maintaining or teaching ethics gives excuse to deceit and even lying toone's guru to advance in position and life. This view for the Yamas of Dayā is shared in Shandilya Upanishad and Jabala Darshana Upanishad. Atri Samhita in verse 48, lists Anrshamsya (आनृशंस्य) as the restraint from cruelty to any living being by one's actions, words or in thoughts. Shivayoga Dipika in verse 2.9 substitutes Sunrta for Satya, defining Sunrta as "sweet and true speech".
Yamas are related to Niyamas in ancient and medieval era Indian texts. The former are restraints (the "don'ts") of virtuous life, while the latter are observances (the "dos").
Some texts such as the Hatha Yoga Pradipika use the classification flexibly, where yamas (restraints, the "don'ts") are understood as reverse of niyamas (positive attitudes, behaviors, the "dos"). For example, Ahimsa and Mitahara are called as yama as well as niyama in verses 17 and 40 of Book 1. In verse 1.40, Hatha Yoga Pradipika calls Ahimsa (non-violence and non-injuring anyone by one's actions, words or in thoughts) as the highest virtuous habit, Mitahara (moderation in one's eating and drinking habits) as the best personal restraint, and Siddhasana as the foremost of Asanas.