It is narrated from Sayyiduna Abu Malik (may Allah be pleased with him): "The Messenger of Allah (peace and blessings be upon him) led the prayer and had the men stand close to him, made the row of the boys behind them, and had the women stand behind them." In support of this hadith there is the narration of Sayyiduna Anas (may Allah be pleased with him), which Imam al-Tirmidhi narrated and declared "hasan sahih". The people of knowledge act upon it: if there are one man and one woman with the imam, the man stands on the imam's right and the woman behind them. Imam al-Tirmidhi also says that some people have used this hadith as evidence that the prayer of a person who stands alone behind the row is valid; they say that since a minor boy has no prayer of his own, it is as if Sayyiduna Anas (may Allah be pleased with him) was alone in the row behind the Prophet (peace and blessings be upon him). But the matter is not as they supposed, because the Prophet (peace and blessings be upon him) made him stand behind him together with an orphan boy; had the Prophet (peace and blessings be upon him) not considered the orphan's prayer valid, he would not have made him stand with Sayyiduna Anas (may Allah be pleased with him) but would have made him stand on his right. Also, it is narrated from Musa bin Anas that Sayyiduna Anas (may Allah be pleased with him) prayed with the Prophet (peace and blessings be upon him) and he (peace and blessings be upon him) made him stand on his right. In this hadith there is an indication that he (peace and blessings be upon him) prayed this prayer as a voluntary prayer, intending thereby to bring blessing to the household.