It is forbidden from the Torah for a man to seclude himself with a woman to whom he is forbidden. It is Rabbinically forbidden for a man to seclude himself with any woman, even a single woman. It doesn’t matter if the woman is Jewish or non-Jewish.
Multiple Men and Women
It is permitted for many men and women to be secluded together. What constitutes many men and many women? Some poskim write that only if there’s 3 men and 3 women , some say 2 men and 3 women, and some say 2 men and 2 women constitute many men and many women. The poskim are general strict to consider it 3 men and 3 women.
According to Sephardim, one man may not be secluded with multiple woman and one woman may not be secluded with multiple men.
Family Members
It is permitted for a man to seclude himself with his mother, daughter, granddaughter, or wife even when she in her state of Niddah. It is permissible for a man to seclude himself with his sister, however, it shouldn’t be done frequently. A brother and sister still living in their parents home may be left alone together for only a few days and not for an extended period of time.
If a woman’s husband is in the city, it’s permissible to seclude with her unless one has a close relationship with her such as if one grew up with her or is a relative.
When one’s wife is with him, there is no problem of being alone with other women as well. Most poskim assume that this leniency applies to one’s mother, daughter, and sister as well. Therefore, if a man is in a room with his wife, mother, daughter or sister, and one other woman he does not violate the yichud prohibition.
Open to the Public
It is permitted for a man and woman to be secluded with one another in an area that is open to the public except at nighttime.
Some say that as long as the door is unlocked even if it is closed that area is considered open to the public, however, some say that it is only considered open if the door is actually open. Practically, some say that one can be lenient only if people in that area enter without knocking and getting permission. Some say that in cases of need one can be lenient regarding any rabbinical form of yichud.
Many poskim hold that it is forbidden to seclude oneself with a woman which one is comfortable around in an area open to the public.