Matsya (मत्स्य, lit. fish) is the fish avatar of the Hindu god Vishnu. Often described as the first of Vishnu's ten primary avatars, Matsya is described to have rescued the first man, Manu, from a great deluge. Matsya may be depicted as a giant fish, often golden in color, or anthropomorphically with the torso of Vishnu connected to the rear half of a fish.
The earliest account of Matsya is found in the Shatapatha Brahmana, where Matsya is not associated with any particular deity. The fish-saviour later merges with the identity of Brahma in post-Vedic era, and still later, becomes regarded with Vishnu. The legends associated with Matsya expand, evolve, and vary in Hindu texts. These legends have embedded symbolism, where a small fish with Manu's protection grows to become a big fish, and the fish saves the man who would be the progenitor of the next race of mankind. In later versions, Matsya slays a demon named Hayagriva who steals the Vedas, and thus is lauded as the saviour of the scriptures.
The tale is ascribed with the motif of flood myths, common across cultures.
The deity Matsya derives his name from the word matsya (मत्स्य), meaning "fish". Monier-Williams and R. Franco suggest that the words matsa and matsya, both meaning fish, derive from the root mad, meaning "to rejoice, be glad, exult, delight or revel in". Thus, matsya means the "joyous one". The Sanskrit grammarian and etymologist Yaska (600 BCE) also refers to the same stating that fish are known as matsya as "they revel eating each other". Yaska also offers an alternate etymology of matsya as "floating in water" derived from the roots syand (to float) and madhu (water). The Sanskrit word matsya is cognate with Prakrit maccha ("fish").
The section 1.8.1 of the Shatapatha Brahmana (Yajur veda) is the earliest extant text to mention Matsya and the flood myth in Hinduism. It does not associate the fish Matsya with any other deity in particular.
The central characters of this legend are the fish (Matsya) and Manu. The character Manu is presented as the legislator and ancestor king.