Fiqh-us-Sunnah Volume 1, Purification and Prayer, Fiqh 1.080.

Section : Who Must Pray.

Prayer is obligatory upon every sane, adult Muslim. ‘Aishah related that the Messenger of Allah, upon whom be peace, said, “The pen is raised for three (meaning: there is no obligation upon three): one who is sleeping until he wakens, the child until he becomes an adult, and one who is insane until he becomes sane.”

As to the authenticity of this report, it is recorded by Ahmad, Abu Dawud, at-Tirmizhi, an-Nasa’i, Ibn Majah, and al-Hakim, who grades it sahih according to the criterion of al-Bukhari and Muslim. At-Tirmizhi classifies it as hassan.

Although it is not obligatory for a child to pray, it is a must that his guardian order him to do so when he is seven, and he should beat him if he does not pray after he reaches the age of ten. A minor should practice praying until he reaches puberty. ‘Amr ibn Shu’aib related from his father on the authority of his grandfather that the Prophet, peace be upon him, said, “Order your children to pray when they reach the age of seven. Beat them (if they don’t pray) when they reach the age of ten. And have them sleep separately.”

The hadith is related by Ahmad, Abu Dawud, and al-Hakim. The latter grades it sahih according to Muslim’s criteria.