Vachmi

Māheswar Sutra (माहेश्वर सूत्र) are written by famous Sanskrit grammarian Pāṇini. Pāṇini's work अष्टाध्यायी (Aṣṭādhyāyī) is considered to be a foundation of Sanskrit grammar. Māheswar Sutra are a set of 14 sutras (verses) elaborated by Pāṇini in अष्टाध्यायी (Aṣṭādhyāyī). They are also called as शिव सूत्राणि or प्रत्याहार सूत्राणि. It is said that they were revealed to Pāṇini by God Śiva Himself.

Pāṇini is said to have lived between 6th and 4th century BCE. In that era, oral composition and transmission was the norm. Pāṇini used these sutras as instruments to keep Sanskrit grammar rules compact and easy to remember.
It is said that the god Śiva sounded his drum fourteen times to reveal these sounds to Pāṇini. Each of the 14 verses consists of a group of basic Sanskrit phonemes or वर्ण (varṇa).
Nataraj
नृत्तावसाने नटराजराजो ननाद ढक्कां नवपञ्चवारम् ।
उध्दर्तुकामो सनकादिसिध्दानेतद्विमर्शे शिवसूत्रजालम् ॥

Word Analysis
नृत्तावसाने - At the end of Cosmic dance (Tandav)
नटराजराजो - Shiv the Lord of Dance (Nataraj)
उध्दर्तुकामो सनकादिसिध्दानेतद्विमर्शे - with a view to bless the sages Sanaka and other sages
ननाद - played on His
ढक्कां - drum
नवपञ्चवारम् - fourteen times
शिवसूत्रजालम् - (from which emerged) Shiva Sutras or Maheshwara Sutras.

Meaning
At the end of Cosmic dance (Tandav), Śiva, the Lord of Dance (Nataraj), with a view to bless the sages Śanaka and other sages, played on His drum fourteen times, (from which emerged) Shiva Sutras or Maheshwara Sutras.

These sutras are as follows.
सूत्र सङ्ख्यासूत्रTranscription
अ इ उ ण् a i u Ṇ
ऋ ऌ क् ṛ ḷ K
ए ओ ङ् e o Ṅ
ऐ औ च् ai au C
ह य व र ट् ha ya va ra Ṭ
ल ण् la Ṇ
ञ म ङ ण न म् ña ma ṅa ṇa na M
झ भ ञ् jha bha Ñ
घ ढ ध ष् gha ḍha dha Ṣ
१० ज ब ग ड द श् ja ba ga ḍa da Ś
११ ख फ छ ठ थ च ट त व् kha pha cha ṭha tha ca ṭa ta V
१२ क प य् ka pa Y
१३ श ष स र् śa ṣa sa R
१४ ह ल् ha L
The last varna in every sutra is called 'इत्'
Although at first glance they appear to be randomly organised, there is a definite pattern behind the organization of these sutras
Swar (vowels) are covered in the first 4 sutra as follows.
१ अ इ उ ण् (a i u Ṇ)
२ ऋ ऌ क् (ṛ ḷ K)
३ ए ओ ङ् (e o Ṅ)
४ ऐ औ च् (ai au C)
The first phoneme of first sutra is 'अ' and the last phoneme of fourth sutra is 'च्'. Between 'अ' and 'च्', all the swaras (vowels) of Sanskrit language are covered. Hence swaras are also called 'अच्'.

Likewise, all Vyanjans (consonants) are covered from 5th sutra to 14th sutra.
५ ह य व र ट् (ha ya va ra Ṭ)
६ ल ण् (la Ṇ)
७ ञ म ङ ण न म् (ña ma ṅa ṇa na M)
८ झ भ ञ् (jha bha Ñ)
९ घ ढ ध ष् (gha ḍha dha Ṣ)
१० ज ब ग ड द श् (ja ba ga ḍa da Ś)
११ ख फ छ ठ थ च ट त व् (kha pha cha ṭha tha ca ṭa ta V)
१२ क प य् (ka pa Y)
१३ श ष स र् (śa ṣa sa R)
१४ ह ल् (ha L)
The first phoneme of 5th sutra is 'ह' and the last phoneme of 14th sutra is 'ल्'. Between 'ह' and 'ल्', all the Vyanjans (consonants) of Sanskrit language are covered. Hence vyanjanas are also known as 'हल्'.
प्रत्याहार​ (pratyaahaar)
प्रत्याहार​ (pratyaahaar) is a group of वर्ण (varṇa) starting with आदि वर्ण and ending with इत् वर्ण.
आदि वर्ण can be any वर्ण in the sutra except इत् वर्ण.

The word प्रत्याहार means to summarize or to tell something in short. By creating प्रत्याहार, Paṇini has created groups of वर्ण with a similar manner of articulation togehter and have used them for encoding the rules of Sanskrit grammer. In the absence of प्रत्याहार, one can imagine how difficult it would become to mention rules for each and every वर्ण.

e.g.
  • अक् (aK) pratyāhāra covers all the वर्ण from अ to क् i.e. अ इ उ ऋ ऌ
    Note that इत् वर्ण are not considered to be part of pratyāhāra - ण् and क् in this case.

  • अच् (aC) pratyāhāra covers all the वर्ण from अ to च् i.e. अ इ उ ऋ ऌ ए ओ ऐ औ (9 स्वर)

  • हल् (ha L) pratyāhāra covers all the वर्ण in between हल्

  • यट् (yaṬ) pratyāhāra covers all the वर्ण in between यट् i.e. य व र

Note 1: While writing व्यञ्जन (Vyanjan) वर्ण, halant is added to the वर्ण such as र्, ल्

Note 2: While writing स्वर (Swar) वर्ण, halant is not added to the वर्ण such as अ इ उ
From the 14 verses of Maheshwara sutras, a total of 281 pratyāhāras can be formed.

14*3 + 13*2 + 12*2 + 11*2 + 10*4 + 9*1 + 8*5 + 7*2 + 6*3 * 5*5 + 4*8 + 3*2 + 2*3 +1*1, minus 14 (as Pāṇini does not use single element pratyāhāras) minus 10 (as there are 10 duplicate sets due to h appearing twice); the second multiplier in each term represents the number of वर्ण in each.
But Pāṇini uses only 42 out of these possible combinations.

As seen above, अच् प्रत्याहार​ covers all vowels and हल् प्रत्याहार​ covers all the consonants.
अल् प्रत्याहार​ covers all the वर्ण (vowels + consonants).