It is permissible for women, and also for men, to pray with a congregation in the mosque even if they cannot see the imam or the men praying behind him, if they are able to follow the imam. If the voice reaches the women in their part of the mosque and they are able to follow the imam, then it is valid for them to pray in congregation with the imam, because it is all one place, and it is possible to follow either hearing the voice through loudspeakers or hearing the imam’s voice directly, or by hearing the voice of the one who repeats the imam’s takbeer. It does not matter if they cannot see the imam or the men praying behind him. Rather some of the scholars stipulated that one should be able to see the imam or the men praying behind him if one is praying outside the mosque. The fuqaha’ said that the prayer of one who is praying outside the mosque is only valid if he can see the imam or the men praying behind him. But the correct view in my opinion is that it is not valid for a person to follow the imam from outside the mosque, even if he can see the imam and the men praying behind him, if there is a place in the mosque where he could pray. That is because the purpose of praying in congregation is to bring together the place and the deeds. But if the mosque is full and those who are outside the mosque pray with the imam and are able to follow him, then the correct view is that it is permissible for them to follow the imam, whether they can see the imam or not, if the rows are continuous. End quote from Majmoo’ Fataawa al-Shaykh Ibn ‘Uthaymeen (15/213)
And Allaah knows best.