This is the story of how Matsyendra learned the secrets of Hatha Yoga from Shiva.
Shiva decided to teach his wife, the goddess Parvati, the teachings of Hatha Yoga; however, these powerful teachings needed to remain closely held secrets. So Shiva took Parvati to the ocean floor and created a giant air dome in which to transmit these sacred lessons.
Years earlier, a human child had been born under terribly inauspicious signs. This child, who would become Matsyendra, was cast into the ocean at birth. He was swallowed whole by a giant fish, within which he grew to be a man.
The stories of Shiva and Matsyendra meet up when Matsyendra, inside his fish, came across Shiva teaching Parvati in their bubble under the sea. He stayed nearby, listening. Parvati eventually became bored. (Goddess devotees inform us that this was because she already knew everything about Hatha Yoga and was just humoring her husband.) As Parvati's eyes glazed over Shiva said, “Fine! Is there no one listening to me?”
“I am listening,” said Matsyendra from his fish.
Shiva taught Matsyendra the secrets of Hatha Yoga. Matsyendra stayed in the fish another 12 years practicing, and then his fish was caught and sliced open. He emerged, a fully realized yogin.