Yichud in a taxi:
When a woman takes a taxi with a male taxi driver, or a man takes a taxi with a female taxi driver, the possibility of a Yichud prohibition arises. This is dependent on several factors as will be explained:
People/cars outside: If the windows of the vehicle are transparent and hence an outsider could see any occurrences inside the car, then Yichud would be permitted under the basis of “Pesach Pasuch Lereshus Harabim” and one may take a taxi being driven by the opposite gender. This would apply even at night. However, this only applies if one is driving in an area, and at a time, that there are passersby’s outside, or if there is still a steady flow of cars driving on the road. If however one is in an area, or at a time of night, that people are no longer outside, and cars are scarcely found on the road, then Yichud would be forbidden. This would apply even if only part of the travel involves passing through such an area. The same would apply even in an area with passerby’s if the windows are tinted or have shades, and it is hence impossible to see inside. Likewise, if the roads are not well lit [but some light is available] and it is difficult for passerby’s to see inside the car, then it is preferable, when possible, for her have her to have her husband go together with her, or take a woman taxi driver. If there are no passersby’s outside, or it is completely dark outside, then this would be required from the letter of the law. Usually, in the beginning of the night, there are still passersby’s and other cars outside, however towards late into the evening people and other cars become scarce and therefore the above prohibition would apply. Practically, one is to consult with a Rav in their area for a ruling of at what time Yichud becomes prohibited in her area.
Amount of people in car: If there are four women in the car together with the male driver, it is permitted to take the taxi at any time of night and in any area. Likewise, if there are three Kosher men in the car, it is valid. In a time of need, some Poskim permit to travel even if there is only three women in the car. However, in such a case, they are to keep a light on at night in the car.
Husband in city: Even if one’s husband is in the city, it does not help to permit his wife to take a taxi with a male driver in areas of the city, or at times of night, that people are no longer outside. Thus, when a woman needs to travel at a time/area that there is a Yichud prohibition, she should either have her husband go together with her, or take a woman taxi driver. However, in a time of need, one may be lenient if she is driving within the city and her husband is in the city and calls her husband at the beginning of the journey and he remains on the phone with her until she arrives.
It is permitted for a woman to take a cab with a male driver if any of the following apply:
1. There are people or cars outside throughout the area that they will be driving, and it is possible for them to see into the car.
2. There are three men, or four women in the car.
3. Her husband is in the city that she is driving in and is on call with her throughout the ride.
 See Nitei Gavriel 43-44; “The laws of Yichud” Halachos 160-166
 See Toras Menachem 1991 1:244 [printed in Shulchan Menachem 6:67] that the Rebbe mentioned the need to verify that the laws of Yichud are not broken when taking a taxi and that one is to speak to a Rav
 Igros Moshe Y.D. 2:82; Nitei Gavriel 43:4; However, see Shevel Halevi 8 [brought in Nitei Gavriel 43:6] who is stringent regarding a single man and woman being in Yichud in a car at night even with passerby’s
 Igros Moshe Y.D. 2:82; Nitei Gavriel 43:4
 Igros Moshe Y.D. 2:82; Nitei Gavriel 43:2
 Nitei Gavriel 43:3
 See Igros Moshe Y.D. 2:82 that at night, when it is difficult for the people passing by to see outside, although there is not a real prohibition of Yichud, nevertheless one is to be stringent when possible.
Other reasons for leniency are: a) There is a window separating between the taxi driver and the passenger. [Nitei Gavriel 43:8]
 Nitei Gavriel 43:4 footnote 7
 Nitei Gavriel 43:5
 Rebbe ibid; Nitei Gavriel 43:7
 See Rama 22:5; Igros Moshe 4:65; Nitei Gavriel 21:7
 Rama 22:5
 Igros Moshe ibid
 See Ezer Mikodesh 22; Nitei Gavriel ibid
 Nitei Gavriel 35:6 in name of Morei Horah
 The reason: As a) Some Poskim rule the allowance of “Baala Bair” does not apply when the wife is not at home. B) Even according to the lenient opinion, since a car is mobile, naturally the wife does not have as much fear.
 See Nitei Gavriel ibid who permits Yichud for the wife in a taxi in the same city as her husband if he knows the taxi driver or can reach him or her at any moment through the telephone.