But should there be a genuine need to hold the congregational prayer outside the mosque—such as when the worshippers are employees in their office or at an industrial complex, and performing the prayer on-site is more orderly for the work and obliges the staff to attend and establish it, while the nearby mosque is not left idle because others continue to pray there—then, in that situation and for these reasons, there is, it appears, no sin upon them for praying in their workplace.
The congregational prayer is valid with a minimum of two people, for the term jamaʿah (congregation) is derived from “gathering,” and two is the smallest number that fulfills the notion of gathering. Abu Musa—may Allah be pleased with him—narrated a Prophetic report: “Two or more constitute a congregation,” transmitted by Ibn Majah. In another narration, the Prophet said, “Who will give charity to this man?” A man then stood and prayed with him, and the Prophet commented, “These two are a congregation,” recorded by Ahmad and others. He also said to Malik ibn al-Huwayrith, “Let the older of you lead the prayer,” and consensus on this point has been cited.
Women may attend the congregational prayer in the mosques with their husbands’ permission