The origins of yoga have been speculated to date back to pre-Vedic Indian traditions; it is mentioned in the Rigveda,[note 1] but most likely developed around the sixth and fifth centuries BCE, in ancient India's ascetic and śramaṇa movements.[note 2] The chronology of earliest texts describing yoga-practices is unclear, varyingly credited to Upanishads. The Yoga Sutras of Patanjali date from the first half of the 1st millennium CE, but only gained prominence in the West in the 20th century. Hatha yoga texts emerged sometimes between the 9th and 11th century with origins in tantra.
The first Hindu teacher to actively advocate and disseminate aspects of yoga, not including asanas, to a western audience, Swami Vivekananda, toured Europe and the United States in the 1890s. The reception which Swami Vivekananda received built on the active interest of intellectuals, in particular the New England Transcendentalists, among them Ralph Waldo Emerson (1803–1882), who drew on German Romanticism and philosophers and scholars like G. W. F. Hegel (1770–1831), the brothers August Wilhelm Schlegel (1767–1845) and Karl Wilhelm Friedrich Schlegel (1772–1829), Max Mueller (1823–1900), Arthur Schopenhauer (1788–1860), and others who had (to varying degrees) interests in things Indian.
Tantra is a range of esoteric traditions that began to arise in India no later than the 5th century CE.[note 17] George Samuel states, "Tantra" is a contested term, but may be considered as a school whose practices appeared in mostly complete form in Buddhist and Hindu texts by about 10th century CE. Tantric yoga developed complex visualizations which included meditation on the body as a microcosm of the cosmos. They included also the use of mantras, pranayama, and the manipulation of the subtle body, including its nadis and cakras. These teachings on cakras and Kundalini would become central to later forms of Indian Yoga.
Niyama (The five "observances"): Śauca (purity, clearness of mind, speech and body), Santosha (contentment, acceptance of others and of one's circumstances), Tapas (persistent meditation, perseverance, austerity), Svādhyāya (study of self, self-reflection, study of Vedas), and Ishvara-Pranidhana (contemplation of God/Supreme Being/True Self).
If the meaning of yoga is understood as the practice of nirodha (mental control), then its goal is "the unqualified state of niruddha (the perfection of that process)", according to Baba Hari Dass. In that context, "yoga (union) implies duality (as in joining of two things or principles); the result of yoga is the nondual state", and "as the union of the lower self and higher Self. The nondual state is characterized by the absence of individuality; it can be described as eternal peace, pure love, Self-realization, or liberation."
^ "application or concentration of the thoughts, abstract contemplation, meditation , (esp.) self-concentration, abstract meditation and mental abstraction practised as a system (as taught by Patañjali and called the yoga philosophy; it is the second of the two sāṃkhya systems, its chief aim being to teach the means by which the human spirit may attain complete union with īśvara or the Supreme Spirit; in the practice of self-concentration it is closely connected with Buddhism". Monier-Williams, A Sanskrit Dictionary (1899)
Various yogic groups had become prominent in Punjab in the 15th and 16th century, when Sikhism was in its nascent stage. Compositions of Guru Nanak, the founder of Sikhism, describe many dialogues he had with Jogis, a Hindu community which practiced yoga. Guru Nanak rejected the austerities, rites and rituals connected with Hatha Yoga. He propounded the path of Sahaja yoga or Nama yoga (meditation on the name) instead. The Guru Granth Sahib states:
Classical yoga incorporates epistemology, metaphysics, ethical practices, systematic exercises and self-development techniques for body, mind and spirit. Its epistemology (pramana) and metaphysics is similar to that of the Sāṅkhya school. The metaphysics of Classical Yoga, like Sāṅkhya, is mainly dualistic, positing that there are two distinct realities. These are prakriti (nature), which is the eternal and active unconscious source of the material world and is composed of three gunas, and the puruṣas (persons), the plural consciousnesses which are the intelligent principles of the world, and are multiple, inactive and eternal witnesses. Each person has a individual puruṣa, which is their true self, the witness and the enjoyer, and that which is liberated. This metaphysical system holds that puruṣas undergo cycles of reincarnation through its interaction and identification with prakirti. Liberation, the goal of this system, results from the isolation (kaivalya) of puruṣa from prakirti, and is achieved through a meditation which detaches oneself from the different forms (tattvas) of prakirti. This is done by stilling one's thought waves (citta vritti) and resting in pure awareness of puruṣa.