It is narrated from Sayyiduna Sabrah (may Allah be pleased with him), through his son, that the Messenger of Allah (peace and blessings be upon him) said: "Teach the child the prayer at the age of seven, and beat him for it (for not praying) at the age of ten."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6516