- the Vākyapadīya, on Sanskrit grammar and linguistic philosophy, a foundational text of the Sphoṭa theory in the Indian grammatical tradition, and
- the Śatakatraya, a work of Sanskrit poetry, comprising three collections of about 100 stanzas each.
In the medieval tradition of Indian scholarship, it was assumed that both texts were written by the same person. However, early "orientalist" scholarship was sceptical, owing to an argument that dated the grammar to a date subsequent to the poetry. Recently however, scholars have argued based on additional evidence, that both works may have been contemporary, in which case it is likely that there was only one Bhartrihari who wrote both texts.
Both the grammar and the poetic works had an enormous influence in their respective fields. The grammar in particular, takes a holistic view of language, countering the compositionality position of the Mimamsakas and others.
The poetry constitute short verses, collected into three centuries of about a hundred poems each. Each century deals with a different rasa or aesthetic mood; on the whole his poetic work has been very highly regarded both within the tradition and by modern scholarship.
The name Bhrartrihari is also sometimes associated with Bhartrihari traya Shataka, the legendary king of Ujjaini in the 1st century.
Date and identity 
The account of the Chinese traveller Yi-Jing indicates that Bhartrihari's grammar was known by 670 CE, and that he may have been Buddhist, which the poet was not. Based on this, scholarly opinion had formerly attributed the grammar to a separate author of the same name from the 7th century CE. However, other evidence indicates a much earlier date:
Bhartrihari was long believed to have lived in the seventh century CE, but according to the testimony of the Chinese pilgrim Yijing [...] he was known to the Buddhist philosopher Dignaga, and this has pushed his date back to the fifth century CE.—
Yi-Jing's other claim, that Bhartrihari was a Buddhist, does not seem to hold; his philosophical position is widely held to be an offshoot of the Vyakaran or grammarian school, closely allied to the realism of the Naiyayikas and distinctly opposed to Buddhist positions like Dignaga, who are closer to phenomenalism. It is also opposed to other mImAMsakas like Kumarila Bhatta. However, some of his ideas subsequently influenced some Buddhist schools, which may have led Yi-Jing to surmise that he may have been Buddhist.
Thus, on the whole seems likely that the traditional Sanskritist view, that the poet of the Śatakatraya is the same as the grammarian Bhartṛhari, may be accepted.
The leading Sanskrit scholar Ingalls (1968) submitted that "I see no reason why he should not have written poems as well as grammar and metaphysics", like Dharmakirti, Shankaracharya, and many others. Yi Jing himself appeared to think they were the same person, as he wrote that (the grammarian) Bhartṛhari, author of the Vakyapadiya, was renowned for his vacillation between Buddhist monkhood and a life of pleasure, and for having written verses on the subject.
Bhartrihari's views on language build on that of earlier grammarians such as Patanjali, but were quite radical. A key element of his conception of language is the notion of sphoṭa - a term that may be based on an ancient grammarian, sphoTAyana, referred by Panini, now lost.
In his Mahabhashya, Patanjali (2nd century BCE) uses the term sphoTa to denote the sound of language, the universal, while the actual sound (dhvani) may be long or short, or vary in other ways. This distinction may be thought to be similar to that of the present notion of phoneme. Bhatrihari however, applies the term sphota to each element of the utterance, the letter or syllable, the word, and the sentence. In order to create the linguistic invariant, he argues that these must be treated as separate wholes (varNasphoTa, padasphoTa and vAkyasphoTa respectively). For example, the same speech sound or varNa may have different properties in different word contexts (e.g. assimilation), so that the sound cannot be discerned until the whole word is heard.
Further, Bhartrihari argues for a sentence-holistic view of meaning - saying that the meaning of an utterance is known only after the entire sentence (vAkya-sphoTa) has been received, and it is not composed from the individual atomic elements or linguistic units which may change their interpretation based on later elements in the utterance. Further, words are understood only in the context of the sentence whose meaning as a whole is known. His argument for this was based on language acquisition, e.g. consider a child observing the exchange below:
- Elder adult (uttamvr.ddha): bring a horse
- Younger adult (madhyamvr.ddha): brings the horse
The child observing this may now learn that the unit "horse" refers to the animal. Unless the child knew the sentence meaning a priori, it would be difficult for him to infer the meaning of novel words. Thus, we grasp the sentence meaning as a whole, and reach words as parts of the sentence, and word meanings as parts of the sentence meaning through 'analyis, synthesis and abstraction' (apoddhAra).
The sphoTa theory was influential, but it was opposed by many others. Later mImAMsakas like Kumarila Bhatta (650 CE) strongly rejected the vAkyasphoTa view, and argued for the denotative power of each word, arguing for the composition of meanings (_abhihitAnvaya). The Prabhakara school (c. 670) among mImAMsakas however took a less atomistic position, arguing that word meanings exist, but are determined by context (anvitAbhidhAna).
Bhartrihari's poetry is aphoristic, and comments on the social mores of the time. The collected work, of three centuries is known as shatakatraya (shataka "hundred", traya "three"), consisting of three thematic compilations on shringara, vairagya and niti (loosely: love, dispassion and moral conduct).
Unfortunately, the extant manuscript versions of these shatakas vary widely in the verses included, with some versions going to three hundred. However, extended work by D.D. Kosambi has managed to identify a kernel of two hundred that are common to all the versions.
Here is a sample that comments on social mores:
- yasyāsti vittaṃ sa naraḥ kulīnaḥ
- sa paṇḍitaḥ sa śrutavān guṇajñaḥ
- sa eva vaktā sa ca darśanīyaḥ
- sarve guṇaḥ kāñcanam āśrayanti (#51)
- A man of wealth is held to be high-born
- Wise scholarly and discerning
- Eloquent and even handsome —
- All virtues are accessories to gold! (tr. Barbara Stoler Miller)
And here is one dealing with the theme of love:
- The clear bright flame of a man's discernment dies
- When a girl clouds it with her lamp-black eyes. [Bhartrihari #77] [tr. John Brough; poem 167]
- Hajime Nakamura (1990), A history of early Vedānta philosophy, Part 1, Motilal Banarsidass Publ., p. 80, ISBN 978-81-208-0651-1
- Edward Craig, ed. (1998), Routledge encyclopedia of philosophy, Taylor & Francis, p. 764, ISBN 978-0-415-16916-5
- Harold G. Coward (1976), Bhartṛhari, Twayne Publishers, ISBN 978-0-8057-6243-3
- Saroja Bhate; Johannes Bronkhorst, eds. (1994), Bhartṛhari, philosopher and grammarian: Proceedings of the First International Conference on Bhartṛhari (University of Poona, January 6-8, 1992), Motilal Banarsidass Publ., p. 21, ISBN 978-81-208-1198-0
- Mulakaluri Srimannarayana Murti (1997), Bhartṛhari, the grammarian, Sahitya Akademi, p. 10, ISBN 978-81-260-0308-2
- Harold G. Coward; Karl H. Potter; K. Kunjunni Raja, eds. (1990), Encyclopedia of Indian philosophies: The philosophy of the grammarians, Motilal Banarsidass Publ., p. 121, ISBN 978-81-208-0426-5
- George Cardona (1998), Pāṇini: a survey of research, Motilal Banarsidass Publ., p. 298, ISBN 978-81-208-1494-3. Detailed discussion, see also notes on p. 366.
- The word and the world: India's contribution to the study of language (1990). Bimal Krishna Matilal. Oxford.
- N. V. Isaeva (1995), From early Vedanta to Kashmir Shaivism: Gaudapada, Bhartrhari, and Abhinavagupta, SUNY Press, p. 75, ISBN 978-0-7914-2450-6Bhartrihari may have been "within the fold of Vedānta".
- Vidyākara (1968), in Daniel Henry Holmes Ingalls, Sanskrit poetry, from Vidyākara's Treasury, Harvard University Press, p. 39, ISBN 978-0-674-78865-7
- Miller, Foreword and Introduction
- A. K. Warder (1994), Indian kāvya literature: The ways of originality (Bāna to Dāmodaragupta), Motilal Banarsidass Publ., p. 121, ISBN 978-81-208-0449-4
- Panini, ashTAdhyAyi, 6.1.123. The grammarian Haradatta from 10th century argued that sphoTAyana was the originator of the sphoTa theory
- Bhartrihari: Poems, trans. Barbara Stoller Miller, Columbia 1967
- John Brough (trans.) (1977). Poems from the Sanskrit. Penguin. poem 12