One of the most widely used words in Sanskrit religious literature is the word ‘mantra.’ It is, etymologically speaking, defined as that which protects (tra = to protect) when repeated and reflected upon (man = to think, to reflect).
This word has two meanings: the poetical part of the Vedas and, the names and syllables used to indicate or propitiate deities. The former is Vedic and the latter is tāntrik.
The Vedas are generally divided into two broad divisions: the Mantra and the Brāhmaṇa. The Mantra part of the first three Vedas is again classified as ṛk, yajus and sāman. The Brāhmaṇas are in prose, deal with the details of sacrificial rites and quote the appropriate mantras (sacred formulae) to be used in the rites.
In the Mantra section, a fourth category, the nigada, is sometimes added. Nigadas are, strictly speaking, not mantras but instructions uttered loudly by one priest to another, during a sacrificial rite.
There are several rules in the Śrauta sūtras (See ŚRAUTASŪTRAS.) about the recitation of the Vedic mantras.
The most famous of all the Vedic mantras which is popular and very much in vogue even today is the Gāyatrī-mantra.
The latter kind of mantras appear in the earlier purāṇas. They extol the greatness of the pañcākṣarī or ṣaḍākṣarī (mantra of five or six letters namaśśivāya and oṁ namaśśivāya), aṣṭākṣarī (of eight letters—oṁ namo nārāyaṇāya) and dvādaśākṣari (of twelve letters—oṁ namo bhagavate vāsudevāya) mantras and a few others.
However it is the tantras or Śāktā-gamas that developed the art and science of the mantras, both extensively and intensively. Various types of mantras for the various deities of the Hindu pantheon along with different bījākṣaras (See BĪJAMANTRA.) and their usages have been dealt with in the well-known works like the Prapañcasāra, Śāradātilaka and Mahānirvāṇatantra.
For more details see under TANTRAS.