Alexander Wynne observes that formless meditation and elemental meditation might have originated in the Upanishadic tradition. The earliest reference to meditation is in the Brihadaranyaka Upanishad, one of the oldest Upanishads. Chandogya Upanishad describes the five kinds of vital energies (prana). Concepts used later in many yoga traditions such as internal sound and veins (nadis) are also described in the Upanishad. Taittiriya Upanishad defines yoga as the mastery of body and senses.
During the period between the Mauryan and the Gupta eras (c. 200 BCE–500 CE) the Indic traditions of Hinduism, Buddhism and Jainism were taking form and coherent systems of yoga began to emerge. This period witnessed many new texts from these traditions discussing and systematically compiling yoga methods and practices. Some key works of this era include the Yoga Sūtras of Patañjali, the Yoga-Yājñavalkya, the Yogācārabhūmi-Śāstra and the Visuddhimagga.
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.
There is no consensus on its chronology or specific origin other than that yoga developed in ancient India. Suggested origins are the Indus Valley Civilization (3300–1900 BCE) and pre-Vedic Eastern states of India, the Vedic period (1500–500 BCE), and the śramaṇa movement. According to Gavin Flood, continuities may exist between those various traditions:
Intensive weight training causes micro-tears to the muscles being trained; this is generally known as microtrauma. These micro-tears in the muscle contribute to the soreness felt after exercise, called delayed onset muscle soreness (DOMS). It is the repair of these micro-traumas that results in muscle growth. Normally, this soreness becomes most apparent a day or two after a workout. However, as muscles become adapted to the exercises, soreness tends to decrease.
Description of an early form of yoga called nirodhayoga (yoga of cessation) is contained in the Mokshadharma section of the 12th chapter (Shanti Parva) of the Mahabharata (third century BCE). Nirodhayoga emphasizes progressive withdrawal from the contents of empirical consciousness such as thoughts, sensations etc. until purusha (Self) is realized. Terms like vichara (subtle reflection), viveka (discrimination) and others which are similar to Patanjali's terminology are mentioned, but not described. There is no uniform goal of yoga mentioned in the Mahabharata. Separation of self from matter, perceiving Brahman everywhere, entering into Brahman etc. are all described as goals of yoga. Samkhya and yoga are conflated together and some verses describe them as being identical. Mokshadharma also describes an early practice of elemental meditation. Mahabharata defines the purpose of yoga as the experience of uniting the individual ātman with the universal Brahman that pervades all things.
^ On the dates of the Pali canon, Gregory Schopen writes, "We know, and have known for some time, that the Pali canon as we have it — and it is generally conceded to be our oldest source — cannot be taken back further than the last quarter of the first century BCE, the date of the Alu-vihara redaction, the earliest redaction we can have some knowledge of, and that — for a critical history — it can serve, at the very most, only as a source for the Buddhism of this period. But we also know that even this is problematic... In fact, it is not until the time of the commentaries of Buddhaghosa, Dhammapala, and others — that is to say, the fifth to sixth centuries CE — that we can know anything definite about the actual contents of [the Pali] canon."