Sometimes there appear mushtarak lafdhee words in the Qur’an, that sound and are written the same as one another, but appear to be somewhat different in meaning, and it is sometimes difficult to make a link between the various meanings or draw them back to an original meaning. An example of this the word دين ‘deen‘ in the following verses:
مَا كَانَ لِيَأْخُذَ أَخَاهُ فِي دِينِ الْمَلِكِ إِلاَّ أَن يَشَاءَ اللّهُ
He could not take his brother by the law of the king (as a slave), except that Allah willed it. [12:76]
Sovereign of the Day of Judgment [1:4]
The word ‘deen‘ comes from the root daal-yaa’-noon د – ي – ن, and the basic meaning of the word is submissiveness and obedience.
Thus, the word ‘deen‘ دين in its most well-known meaning of ‘creed’ is so called because one submits to the tenets of the creed and obeys them.
And if you look at Surah Yusuf, verse 76 (above), the word ‘deen‘ is being used in its original meaning of obedience, for to follow the law of the king necessarily implies obedience to the king.
It is also possible to take the etymological process one step further and looked for a shared meaning between derivates of the mushtarak lafdhee. For example, the word ‘Madeenah‘ مدينة (meaning ‘city’) comes from the same root as deen, and is so called because the concept of a city is based around obedience to its ruler, or person in charge.