Yes, two people are enough to pray in congregation, whether that is in the house or elsewhere. Imam al-Bukhaari (may Allaah have mercy on him) said: “Chapter: Two or more form a congregation (jamaa’ah).” Then he narrated the hadeeth of Maalik ibn al-Huwayrith (may Allaah be pleased with him), that the Prophet (peace and blessings of Allaah be upon him) said: “When the time for prayer comes, give the adhaan and iqaamah then let the oldest of you two lead you in prayer.” (al-Bukhaari, 658).
Al-Haafiz ibn Hajar (may Allaah have mercy on him) said: “Chapter: Two or more form a congregation”: this heading was narrated in a hadeeth which was narrated via weak isnaads, which said that the Prophet (peace and blessings of Allaah be upon him) saw a man praying by himself and said: “Will not a man perform an act of charity for him and pray with him?” So a man stood up and prayed with him, and he said: “These two are a congregation (jamaa’ah).”
The story mentioned – apart from the words, “These two are a congregation” – was narrated by Abu Dawood and al-Tirmidhi with a different, saheeh, isnaad.
He also said:
This (the hadeeth of Maalik ibn al-Huwayrith (may Allaah be pleased with him)) may be understood as meaning that the smallest a congregation can be is an imam and one follower, which is more general in meaning than saying that the follower may be a man or a boy or a woman.
The hadeeth referred to by al-Haafiz is narrated by Abu Dawood (554) who classed it as saheeh. The report is as follows: It was narrated from Abu Sa’eed al-Khudri (may Allaah be pleased with him) that the Messenger of Allaah (peace and blessings of Allaah be upon him) saw a man praying on his own and said: “Why doesn’t a man perform an act of charity for him and pray with him?” Classed as saheeh by al-Albaani in Saheeh al-Jaami’, 2652.
It says in ‘Awn al-Ma’bood: so that he may attain the reward of praying in congregation, so it will be as if he gave him charity.
It was narrated from Ubayy ibn Ka’b (may Allaah be pleased with him) that the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “… for a man to pray with another man is better than his praying alone, and for a man to pray with two other men is better than his praying with one man. The more there are, the more beloved that is to Allaah.” Al-Nasaa’i, 843; Abu Dawood, 554; classed as saheeh by al-Albaani in Saheeh al-Jaami’, 2242.
But it should be noted that what is required of men is to offer the prayers in congregation in the mosque; it is not permissible to offer the obligatory prayers at home, whether in congregation or alone, unless one has an excuse.
The Standing Committee was asked: If two people pray together is that a jamaa’ah (congregation) or not?
They replied: If two or more people pray together, that is a congregation, but the more people there are, the better; it should also be noted that prayers in congregation should be offered in the mosque.
Fataawa al-Lajnah al-‘Daa’imah, 7/289.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked about some people who prayed in congregation at home. He said:
We advise them to fear Allaah and to pray in congregation with the Muslims in the mosque, because the most correct scholarly view concerning this matter is that it is obligatory to offer prayers in congregation in the mosque, unless one has an excuse. The Prophet (peace and blessings of Allaah be upon him) said: “I thought of ordering that the iqaamah be given, then I would order a man to lead the people in prayer, and I would take some men carrying bundles of wood and go to people who did not attend the prayer, and burn their houses down on them.” See al-Bukhaari, 644; Muslim, 651.
Those people may be have been offering the prayers in congregation in their own places, but the Prophet (peace and blessings of Allaah be upon him) wanted them to pray with the congregation which was performing the prayer in the manner prescribed in sharee’ah, and the congregation which sharee’ah says one should pray with is those who pray in the mosques, the mosques to which they are called when the time for prayer comes. Hence ‘Abd-Allaah ibn Mas’ood (may Allaah be pleased with him) said: “Whoever would like to meet Allaah tomorrow as a Muslim, let him offer these prayers regularly where the call for them is given.” The word haythu (where) refers to place, i.e., let him offer them regularly in the place from which the call to prayer is given.
Fataawa al-Shaykh Ibn ‘Uthaymeen, 15/19