Shiva became Adiyogi on the day he attained enlightenment. He first expounded yogic philosophy to his consort and wife, the goddess, Parvati. The teaching was about the very essence of creation and liberation. His next disciples were seven ancient sages, or saptarishi, who spread the philosophy of yoga to mankind.
Hindu myth maintains that Matsya, a fish, overheard Adiyogi's teachings to Parvati and attained enlightenment. Matsya then accepted Shiva's offer of reincarnation and came to be known as Matsyendra, after whom the yoga pose Matsyendrasana was named. He was also one of the saptarishi.