In the Arabic language, the consonants are divided into two groups, called the sun letters (or solar letters) and moon letters (or lunar letters), based on whether or not they assimilate with the ﻝ (l) of a preceding article. The word for "the sun", aš-šams, assimilates, while the word for "the moon", al-qamar, does not. It was from this circumstance that the two categories of consonant were named.
When followed by a sun letter, the l of the Arabic definite article al- assimilates to the initial consonant of the following noun, resulting in a doubled consonant. For example, for "the Nile", one does not say al-Nīl, but an-Nīl. When the definite article is followed by a moon letter, no assimilation takes place.
Sun letters represented coronal consonants in the classical language. Since the article, al-, ends is a coronal consonant, it lends itsself to assimilation with these sounds. The letter ج ǧ is a coronal consonant [ʒ] or [dʒ] in most varieties of Arabic today. However, it represented a palatalized voiced velar plosive, /ɡʲ/, in the classical language. As a result, its sound does not assimilate the article and it is classified as a moon letter.
The 14 sun letters are ﻥ ,ﻝ ,ﻅ ,ﻁ ,ﺽ ,ﺹ ,ﺵ ,ﺱ ,ﺯ ,ﺭ ,ﺫ ,ﺩ ,ﺙ ,ﺕ; transliterated from left to right t, ṯ, d, ḏ, r, z, 's, š, ṣ, ḍ, ṭ, ẓ, l, n.
The 14 moon letters are ه ,ﻱ ,ﻭ ,ﻡ ,ﻙ ,ﻕ ,ﻑ ,ﻍ ,ﻉ ,ﺥ ,ﺡ ,ﺝ ,ﺏ ,ء; transliterated from left to right ʾ, b, ǧ, ḥ, ḫ, ʿ, ġ, f, q, k, m, w, y, h.
In the written language, the الـ al- is retained regardless of how it is pronounced, though gemination may be expressed by putting a šadda on the following letter.