These three hadeeths explain the obligation of congregational prayer, and that it should be in the mosque.
One of them is the hadeeth of Aboo Hurayrah, the last hadeeth, that the Prophet ﷺ swore –and he is truthful and reverent without swearing- that he considered instructing that the Prayer be established and appointing someone to lead the people. Thereafter, he would go to the people who were not present for the Prayer with firewood and burn down their houses on them.
This shows the compulsion of attending congregational Prayers because the Prophet ﷺ would not have worried about it this much but because it involves abandoning an obligatory matter. He did not inform people of it except to warn them against abandoning it or disregarding it. Otherwise, there would not have been any benefit in informing them.
The fact that he considered punishing them in this manner shows the status of congregational Prayer, and that it is an important matter. It is reported with a weak chain of narration that he ﷺ said: “Were it not that women and children are in the houses.”(1) However, this is weak. But it is sufficient that he thought of it and he informed his Ummah.
Then, who is congregational prayer obligatory for? It is obligatory for one who is able to attend it and hears the Adhan; that is, anyone who hears the Adhan and has the ability must attend the congregational prayer. A man once sought the legal opinion of the Prophet ﷺ; he said: ‘O Messenger of Allah, I am a blind man with no guide to lead me to the mosque’; he wanted the Prophet ﷺ to grant him a concession, which he ﷺ readily approved. When he turned to leave, he ﷺ called him and asked: “Do you hear the call to prayer?” He replied, ‘Yes’. He ﷺ said, “Then respond.”
This proves the obligation of congregational prayer on the blind and that blindness is not an excuse for abandoning congregational prayer. This also indicates that it must be in a mosque, and the intent is not only to pray in congregation.
Likewise, it shows that what is essential is hearing the call to prayer. However, the intent is hearing the call to prayer naturally without the aid of speakers which can amplify voice to a far distance. The normal
call, if there is no hindrance to hearing the voice, is that which makes attendance at congregational Prayers obligatory.
In addition, it demonstrates that it is not correct for someone outside the mosque to follow those in the mosque even if that is conceivable. For instance, a person who resides within the vicinity of the mosque where he hears the Takbirs of the Imam. Then, he tells his son, for example, that both of them should observe the Prayer with the congregation from their house. This is not correct. It is compulsory to be present at the place where the congregational prayer is being held except if the mosque is filled up and people extend to the streets. The ones outside the mosque should follow the mosque in joining the rows; otherwise, the Prayer of the one outside will be invalid without joining the rows. He must attend even if he hears each of the Takbirs.
Someone may ask about a sick person who is unable to attend but he can hear the call to prayer through a speaker following the Imam. We respond that he should not pray with the Imam, and he is excused for leaving the congregational prayer. If he usually observes Prayers with the congregation, he will be rewarded for whatever he used to do when he was healthy. This is based on the statement of the Prophet ﷺ: "Whoever is ill or travels, whatever he used to do when he was healthy and a residence would be written for him."(1) Allah knows best.