Om Namah Shivaya, homage to Shiva, is the panchakshara, the mantra of five syllables, counted as na-mah-shi-va-ya, with Om standing outside the count as the primordial sound. It is the central formula of Shaiva devotion, drawn from the heart of the Shri Rudram, the great Vedic litany to Rudra in the Yajurveda, which gives the phrase a canonical scriptural root rather than a later sectarian one.
Shaiva theology loads the five syllables with correspondences: they are read as the five elements (earth, water, fire, air, ether), as the five faces of Shiva, and as the five acts by which he creates, sustains, dissolves, conceals and reveals the world. Repeated as japa, aloud, murmured or silently in the mind, the mantra functions as a compressed act of self-surrender, the devotee placing the self at Shiva's feet with each recitation. It is at once a formula accessible to any worshipper and, in the tantric Shaiva schools, an object of elaborate initiatory analysis, a good example of how a single short mantra can serve both popular devotion and technical contemplative practice.