In the Vedas, all the true disciplines are mentioned in the form of sutras. The description of Yoga is also found in the original form in the four Vedas. All the scholars of the world agree with one opinion that - Vedas are the oldest texts in the library of the world. According to Indian tradition, at the time of creation of the universe, the Supreme Lord had given the knowledge of Rigveda, Yajurveda, Saamaveda and Atharvaveda to four sages named Agni, Vayu, Aditya and Angiraa; for the welfare of mankind. In this way, the tradition of yoga is also present since the creation of the universe. According to Indian tradition, the creation of the universe was done 1,97,29,49,122 years ago.
युञ्जते मन उत युञ्जते धियो विप्रा विप्रस्य बृहतो विपश्चितः।
The principles of yoga have been described in detail in the Braahmanical literature, Aaranyaka literature, and Upanishad literature, the oldest explanatory texts of the Vedas.
यदा पञ्चावतिष्ठन्ते ज्ञानानि मनसा सह।
बुद्धिश्च न विचेष्टते तामाहुः परमां गतिम्॥
तां योगमिति मन्यन्ते स्थिरामिन्द्रिय-धारणाम्।
अप्रमत्तस्तदा भवति योगो हि प्रभवाप्ययौ॥ (कठोपनिषद् 2.3.10-11)
Yadā pañcāva-tiṣṭhante jñānāni manasā saha ,
Budhiśca na viceṣṭate tāmāhuḥ paramāṁ gatim.
Tāṁ yogamiti manyante sthirām-indriya-dhāraṇām,
Apramattas-tdā bhavti yogo hi prabhavāpyayau. (kaṭhopaniṣad 2.3.10-11)
A glimpse of the history of yoga is found in Shrimad-Bhagavad-Gita (4.1-3) Described in the Bhishma Parva of Mahaabhaarata, written five thousand years ago. Manu preached this yoga to his progeny Ikshvaaku. Thus the tradition of yoga continued progressively. Maryaadaa Purushottam Shri Ram and Mahatma Buddha were born in the lineage of Maharaja Manu. Yogeshwar Shri Krishna had explained the principles of this yoga in detail to Arjuna on the battlefield.
According to Indian tradition, Aadi Yogi (First Yogi) is considered to be Shiva. He had given the knowledge of yoga to the seven sages on the banks of a lake called "Kaanti" in the Himalayas, thousands of years ago. These seven sages spread the knowledge of this yoga to the world including Asia, Middle-Eastern countries, North Africa and South America. Shiva was the king of the Himalayan region. In whose kingdom Bhagiratha had taken out the Ganges, the figurative description of which is found in Indian literature.
Evidence of YOGA- AASANAAS (Yoga Postures) and YOGIC- MUDRAAS etc., in the sculptures and seals found in the Indus Valley and Saraswati Valley of 2700 AD, are also clearly proving that the tradition of systematic yoga existed in India.
Maharshi Patanjali has done the work of compiling the experiences of various sages and Maharshi Yogis in 195 sutras in the book “Yoga-darshanam”, long before Mahabharata. The first explanation on these sutras was written by “Maharshi Vedavyaasa”, whose name is” Vyasa Bhaashyam.”
In “Yogadarshanm”, eight parts of yoga have been discussed –
1- Yama,
2- Niyama,
3- Aasana,
4- Praanaayaama,
5- Pratyaahaara,
6- Dhaaranaa,
7- Dhyaana,
8- Samaadhi.
This is known as "Ashtanga-yoga". All other kinds of yoga come under Ashtaanga yoga, hence it is also called "Raj-yoga".