Bhartṛhari is a well-known name in the classical Sanskrit literature. However, we come across two of them.

The first was a grammarian who lived probably in the 5th century A. D. He has been classed among the famous trinity of grammarians—the other two being Pāṇini (400 B. C.) and Nāgeśa or Nāgoji Bhaṭṭa (18th cent. A. D.)—who developed the Sphoṭavāda, the theory that the meaning of a word or a sentence reveals itself in a flash as soon as its utterance is completed. (See SPHOṬAVĀDA.) He is said to have been a Buddhist. Mahābhāṣya-dīpikā and Vākyapadīya are the two works attributed to him. The former is a commentary on the Mahābhāṣya of Patañjali on the sūtras of Pāṇini. The latter is a grammatico-philosophical work in three kāṇḍas or sections dealing with Brahman, the Supreme, as Śabda or Logos.

The second Bhartṛhari, whose period has been placed somewhere between 100 B. C. and A. D. 500, was the author of the three well-known Śatakas (one hundred verses) viz., the Śṛṅgāraśataka, the Nīti-śataka and the Vairāgyaśataka. The first deals with erotics, the second with general ethics and the last with renunciation.

Though very little is known of him, tradition describes him as a king ruling in Ujjayinī who later abdicated his throne in favour of his younger brother Vikramā-ditya, the originator of the Saṁvat era, since he was disgusted with the infidelity of his queen.