We all know that Patanjali systematized the Yoga. However, he merely systematized the practices that were already there. What is the historical origin of Yoga?
TLDR; The historical origin of Yoga is attributed Adiyogi aka Lord Shiva, around 15000 years ago. This is neither Vedic or Non-Vedic, its Pre-Vedic. Shiva taught Yoga, before which there was no idea of spirituality or religion anywhere on the planet. Because of his teaching people realised and Vedas were revealed to them. So Adiyogi is the Source of Vedas. In other words Yoga is the source of Vedas.
I think one of the best theories about the historic origin of Yoga out there is Sadhguru's theory. Here please don't understand Yoga as one of the six darshanas founded by Patanjali. It's a common knowledge in India that Patanjali only codified Yoga and that it existed before him. So Yoga here is defined as the Science of union of individual and cosmic soul. So it is generalised spirituality.
Sadhguru's view is that Shiva or Adiyogi wasis the progenitor of Yoga. He was an extraterrestrial being who arrived on Earth somewhere between 60000 years ago to 15000 years ago. Before this there was no idea of spirituality or religion of any kind in Humans or anywhere on the planet. So Vedas were not yet revealed to Humans. So the arrival of Adiyogi is before the revelation of Vedas, so he is Pre-Vedic. Adiyogi taught Yoga to Humans from which they eventually got realised. These first seven disciples taught Yoga to others and it spread on. These realised people became seers who eventually composed Vedas as it was revealed to them. Shiva is the source of Vedas.
This is still supported by the verse "Shivo hi Vedah, Vedo hi Shivah", that is Shiva is Vedas and Vedas are Shiva. And he is celebrated as Adiguru even today. We have stotram which starts, "Sadashiva Samarambham.." means "Starting from Sadashiva.."It's not that he wasis Vedic or Non-Vedic. It's that he wasis the source of Vedas, to Humans. So much so that even Vaishnava traditions hold Shiva as the giver of Vedas to Humans. According to them Vishnu taught Brahma, and Brahma taught Shiva and Shiva to Rishis(Humans)and then it spread. So the tradition of Hindus, both Shaiva and Vaishnava agree that Shiva wasis first giver of Vedas to Humans. Even Hata-Yoga text books like Hathayoga pradipika and other related books consider Shiva as Adiguru. So this is not a new thing. This theory according to me, is a very sound theory. So Yoga, philosophially speakingisphilosophically speaking is the source of Vedas. It's not that Yoga is Vedic or Non-Vedic, its that Vedas are Yogic. Later Patanjali codified the sutras and that particular school came to be called as Yoga. But if you address Yoga as a philosophy, rather than a school, then every kind of spirituality is some kind of Yoga.
Maharshi Patanjali systematized the yogic practices, wrote the Sutra, but the yogic practices predate him.
The historical origin of Yoga is a subject of scholarly debate. A definite answer is yet to be found. Mainly there are two schools of thoughts.
A. Vedic origin - The practices have developed in a linear fashion through the Upanishads to the Buddhist Tripitaka. So basically they say that Buddist meditational techniques inherited the meditational techniques described in the Rig Veda. Supporters of this theory are M Monier Williams (1964), Berriedale Keith (1923), Hauer (1922), Heesterman (1964). There is though a difference of opinion on who were the forerunners of Yoga whether Ksatriya (Hauer, 1922) or Brahmans (Heesterman 1964). Indian Researchers such as Barua (1921) and Radhakrishnan (1929) favoured this linear theory. They presented detailed arguments to show that Upanishads are the source of Yogic practices. They dismissed the possibility of any non-Aryan component.
B. Non-Vedic origin - The alternative theory. It argues for indigenous non-Aryan practices got mixed with Vedic practices and gave rise to Yoga. So basically it talks about the influence of non-Aryan elements and argues for the synthesis of Aryan and non-Aryan elements. This theory was advocated by J. N. Farquhar (1920) and Heinrich Zimmer (1951).
Their main argument goes like this. Yoga depends on three concepts - soul, rebirth and release from rebirth. These concepts of transmigration of souls, desire for salvation etc. are not found in Rig Veda. They first appear suddenly in the Upanishads. This is an indigenous non-Aryan element. Indus valley archaeological evidence also strongly suggests an indigenous non-Vedic Yoga tradition. Though yogic concepts were discussed in Upanishads the practices were atypical of Brahmanism.
Among Indian scholars, Belvalkar and Ranade also argue for a non-Aryan influence. They argued that the sudden impulse towards contemplative practices became more mainstream at the end of the Upanishadic period.
Bhandarkar also supported this non-Aryan origin of Yoga. He wrote that a pre-Vedic, non-Aryan cult known as muni-yati cult was present in ancient India. Its characteristic features were yoga, tapas, and samnyasa. It was an essential component of Siva religion (R. N. Bhandarkar,1987 in Lindsay Jones Encyclopedia of World religion).
Marshall also commented that the root of Yoga is traceable to the beliefs and practices of the pre-Aryan inhabitants of India (Marshall J. Mahenjodaro and Indus Civilization (3 volumes), Vol I, p-54, 1931).
The proto-Siva of the Harappa civilization was a person seated in a yogic posture. Like Saivism, yoga also plays an important role in Aryan religion from the epic period, not before that. In the Epic period, the Vedic rituals of sacrifice had been supplanted by tapas, yoga or asceticism. The Vedic Rudra was not an ascetic. However, the Rudra-Siva of later days used to getting depicted as a figure seating in a meditative posture and became known as Mahayogin and Yogisvara. (The concept of Rudra-Siva through the ages by Mahadev Chakravarti. 1986. Motilal Banarsidass, New Delhi).
Anyway, it is a heated debate and the problem is far from being resolved.
To know more about this I would recommend the following sources.
- Origin and development by early Indian contemplative practices by Edward Fitzpatrick Crangle, 1994.
- The origins of Yoga and Tantra by Geoffrey Samuel, 2008 [Cambridge University Press].