The Scholars differed regarding the number of people required to do the Eid prayer. Some of them, such as the Hanbalis, stipulated that there should be forty people. Others, such as the Shaafa‘is, said that it is permissible for one who is alone to offer the Eid prayer.
An-Nawawi (may Allah have mercy on him) said in al-Majmoo‘ (5/26): With regard to the rulings: is it prescribed for the slave, the traveller, the woman and one who is alone in his house or elsewhere to offer the Eid prayer?
There are two views concerning that, the more sound and more well known of which is that it is definitely prescribed for them.
The view that is more likely to be correct is that the number required is three.
as-Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said in Ash-Sharh al-Mumti‘ (5/131): … One of the conditions [for Eid prayer] is that the number of worshippers should be the same as that required for Jumu‘ah prayer, and the number required for Jumu‘ah prayer, according to the well-known view in our madhhab, is forty men who are local residents. We have noted above that the more correct view is that the number required for Jumu‘ah is three, so this is based on that. So it is essential to have three men, and if there is only one Muslim man in the village, then he cannot offer the Eid prayer, and if there are only two men in the village, they cannot offer the Eid prayer, but if there are three, then they can offer it.
Shaykh Ibn Baaz (may Allah have mercy on him) was asked: For Eid prayer, is it stipulated that there be a specific number of worshippers, as in the case of Jumu‘ah prayer? What is the ruling if Eid falls on a Friday, with regard to Jumu‘ah prayer, because I heard that Jumu‘ah prayer is not obligatory [in that case] for the members of the congregation, in contrast to the imam? So how can it be obligatory for the imam on his own, and how can he offer Jumu‘ah prayer on his own?
He replied: The Eid prayer and Jumu‘ah prayer are two of the great symbols of the Muslims, and they are both obligatory. Jumu‘ah prayer is an individual obligation, and the Eid prayer is a communal obligation according to the majority of scholars and is an individual obligation according to some of them.
The scholars differed concerning the number required for both of them. The soundest view is that the number required to offer both the Jumu‘ah and Eid prayers is three or more. As for the stipulation that forty are required, there is no reliable sound evidence to that effect.
Another of the conditions for both prayers is that one should be a resident in the place. As for the people of the desert (nomads) and travellers, they are not obliged to attend Jumu‘ah or offer the Eid prayer. Hence when the Prophet (blessings and peace of Allah be upon him) did the Farewell Pilgrimage, and the Day of ‘Arafah fell on a Friday, he did not pray Jumu‘ah, and he did not offer the Eid prayer on the Day of Sacrifice. This indicates that travellers are not obliged to offer the Eid prayer or Jumu‘ah prayer; the same also applies to those who live in the desert (nomads).
So if Eid falls on a Friday, it is permissible for the one who has attended the Eid prayer to pray Jumu‘ah, or to pray Zuhr, because of the proven reports from the Prophet (blessings and peace of Allah be upon him) concerning that. It is proven that he (blessings and peace of Allah be upon him) granted a concession allowing the one who had attended the Eid prayer not to attend Jumu‘ah, as he said: “Two Eids have come together on this day of yours, so whoever attended the Eid prayer does not have to attend Jumu‘ah.”
But one should not omit to pray Zuhr. The best is to attend Jumu‘ah prayer with the people, but if he does not pray Jumu‘ah, he must pray Zuhr. As for the imam, he should lead in prayer those who attend Jumu‘ah, if they are three or more, including the imam. If only one person attends with him, they should pray Zuhr.” (Majmoo‘ Fataawa Ibn Baaz 13/12).
Eid prayer may be offered with three men or more.
And Allah knows best.