Matsarya is a derivative of mastara. Matsarya is mentioned as one of the vices in Hinduism and Hindu religious and philosophical literature. In the Nyaya system of Hindu philosophy, three doshas (defects) are acknowledged. They are raga or iccha (attachment or desire), dvesha (aversion) and moha (delusion). In the commentaries of Nyaya Sutra, matsarya or matsara (envy) is included under attachment or desire.
Matsarya is defined in Vivanatha Nayapancanana’s Gautamasutravritti as the desire to preventwhat is like by another person without having any connection with one’s own purpose.
In Nyayamanjari of Jayantabhatta, Matsara is defined as the desire not to give away the thing to another person, although the thing does not get reduced when it is given to another.
For instance, knowledge is a form of wealth which one does not lose even it is imparted to others. However, an envious person does not like to part with knowledge because he does not like others to rise in status. This idea is clearly explained in the Jaina text Rajavartika.
Envy can very well be subsumed under dwesha or aversion.
In Vacaspatyakosha, for instance, it is defined as the “aversion towards virtues of others”.
Encyclopedia of Hinduism Volume VII – page 100 – 101