Name and why it is called so
The name Al-Ikhlas (sincerity, purity) comes from the surah's content: it presents Allah's oneness in pure form, free from every kind of shirk, and whoever believes in it makes his belief pure for Allah. In the hadith it is usually referred to by its first verse, "Qul huwallahu ahad" (Say: He is Allah, the One), and it is also called Surah al-Tawhid.
Time of revelation and background
In the common copies of the Quran it is counted as a Meccan surah, and this is the view of most commentators, while some scholars have called it Medinan. One narration about its revelation says that the idolaters said to the Prophet ﷺ: Tell us the lineage of your Lord, and this surah was revealed. Hadith scholars have criticized the chain of this narration, so it is not presented as the definite cause of revelation. In any case, the content of the surah answers every notion that likens Allah to His creation.
Main themes
The first verse declares that Allah is One: unique in His Essence, His Attributes and His right to be worshipped. The second verse calls Him al-Samad, the perfect Master to whom all creation turns in its needs, while He Himself needs no one. The third verse says that He has no offspring and is not the offspring of anyone, and the fourth that there is none equal to Him.
In this way this short surah refutes all beliefs that ascribe to Allah sons, daughters, partners or any equal. In a hadith qudsi in Sahih al-Bukhari, Allah declared that ascribing a child to Him is an insult to Him, and said: I am the One, the Self-Sufficient; I have no child, nor am I anyone's child. Scholars give one explanation of why this surah equals a third of the Quran: a large part of the Quran is about Allah's oneness and Attributes, and this surah is the summary of that.