Hisham bin Sa'd (may Allah have mercy on him) says: We went to Mu'adh bin Abdullah al-Juhani (may Allah have mercy on him), and he said to his wife: When should a child pray? She said: A man [among us] used to narrate from the Prophet (peace and blessings be upon him) that when he (peace and blessings be upon him) was asked about this, he (peace and blessings be upon him) said: "When he can tell his right hand from his left, command him to pray."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5093