Gotra is a clan in Hindu society. It means the people who are descended in an unbroken male line from a common male ancestor. In the 4th century, Pāṇini wrote that gotra are the descendants of a sage, "beginning with the son's son."(IV. 1. 162). A person who says "I am Kashyapa-gotra," can trace his family from the ancient sage Kashyapa through an unbroken male line.
According to the Brihadaranyaka Upanisad 2.2.6, Gautama and Bharadvāja, Viśvāmitra and Jamadagni, Vashishtha and Kaśhyapa, and Atri are seven sages (also known as Saptarishi). The descendants of these eight sages are said to be gotras. This explanation of the eight primary gotras seems to have been known to Pāṇini. Descendants of others are called gotrâvayava.