May one sit next to the opposite gender on a bus?
From the letter of the law, there is no prohibition involved in sitting near a person of the opposite gender. This applies whether on a bus, train or airplane, in which a man may be seated next to a woman and a woman may be seated next to a man. This applies even if one unintentionally comes into contact with the other gender in the process of sitting, [such as if the seats are very close to each other and one ends up touching or rubbing by the sides while sitting]. There is not even an act of indecency involved in sitting next to each other in such a case. Nevertheless, if there are other seats available, one is to sit elsewhere. Likewise, if a man knows that he will have forbidden thoughts due to the touch, or come to have erotic gratification, it is forbidden to sit next to the woman, and in such a case he is to either stand up or find another seat. Due to this, some Poskim take a more stringent approach regarding a man and rule that a man is to always stand up on the bus rather than sit next to a woman as it is very difficult to avoid erotic thoughts, and only in a time of great necessity may one do so, being very careful to avoid touching. [Due to this latter point, as well as other issues, many buses serving in Frum areas have enacted a policy of gender segregation, having a men and women section on the bus. There is however no justification to demand the woman to move, unless the segregation is part of the bus code per law or per its owners. It is certainly forbidden to cause strife and dispute over the matter and if one feels so strong about the issue he should stand or take another bus.]
One’s wife who is a Nida: When the wife is a Nida, it is forbidden for the couple to sit next to each other on a bus/train/plain if they will touch each other in the process of sitting. Other Poskim however rule it is permitted to sit next to each other even in such a case, unless there are other seats available or one knows he will come to have erotic gratification from it. If they can sit next to each other without touching each other, then it is permitted according to all to sit next to each other on a bus/train/plane in which the seats are attached to the ground and the couple cannot feel each other’s movement.
One is not to sit next to the opposite gender if another seat is available or one will have erotic thoughts. If there are no seats available, it is permitted to do so long as one will not entertain erotic thoughts. This applies even if one’s side will brush against the other person while sitting. [One may not demand a person of the opposite gender to move seats in order so he can sit in a Mehadrin way, and one is not to make an issue of it if it may offend the person.]
The famous Posek, Rav Shlomo Zalman Aurbach, once had a woman sit next to him on the bus he took regularly to Bayit Vagan. He regularly sat right behind the bus driver and people avoided sitting in the second seat out of respect for the great Rabbi. In this instance, the bus driver, noticing the situation, stopped the bus and wanted to request from the woman to sit elsewhere, however Rav Shlomo Zalman caught him before the act and told him to continue driving. A few stops later Rav Shlomo Zalman went off the bus, still not having reached his destination. Upon being question by his students who took interest in this occurrence he explained that on the one hand he did not feel comfortable sitting next to the woman, even though it is permitted from the letter of the law, and on the other hand he did not want to embarrass the woman and possibly cause her to dislike Frum people. He thus decided to get off the bus a few stops later in an inconspicuous manner that will not embarrass her.
 Igros Moshe E.H. 2/14; Response of Rogatchaver Gaon printed in Salmas Yosef 9/2 “According to my understanding [of the Poskim] there is no prohibition involved and there is even no indecent act involved”; Halichos Bas Yisrael 7/22 in name of Rav SZ”A; Ohel Yaakov p. 236
 The reason: As the prohibition against touching the opposite gender is only applicable when it is done for the sake of sexual gratification or affection. However touch which is done for work purposes [such as a doctor] or unintentionally due to lack of space, does not contain any prohibition when the person has no gratification involved in doing so. [Igros Moshe ibid based on Shach Y.D. 157/10; 195/20; Rambam Issurei Biyah 21; Sidrei Taharah 195/24] Now, although it is forbidden for a man and woman to sleep together on the same bed even if they are clothed [Shabbos 13], this is because sleeping together causes extra warmth and closeness, which stimulates gratification [Tosafus Sanhedrin 37a] and cannot be compared to simply sitting next to each other. [Rogatchaver ibid]
 Rogatchaver ibid “Ein Bezeh Mishum Kiur” based on Tosafus Sotah 19a that the Kohen held the hand of the Sotah using a towel and thus there was no Kiur
The reason: As the clothing separate between them. [Rogatachaver ibid]
 Igros Moshe ibid; However see Halichos Bas Yisrael 7/22 in name of Rav SZ”A who rules regarding women that this is not required and one may sit next to a man even if other seats are available.
 Shevet Halevi 4/136; Mishnas Yosef 10/171
 Such as that a man should not be behind a woman. [See Michaber E.H. 21/1]
 Pashut, as Machlokes is Biblcially forbidden, and some Poskim allow this even initially, and if one has erotic thoughts it is his own behavioral problem that cannot be taken out on the woman sitting
 Rama 195/5 “So long as they sit in a way that they do not touch each other”; Igros Moshe 1/92; 2/83; Taharah Kehalacha 14/44; Shiureiy Sheivet Halevi p. 262
 Igros Moshe E.H. 2/14
 The reason: As seemingly, even by a wife who is a Nida the entire prohibition and stringency against contact is only with intentional touch, and not regarding that one must avoid entering a situation of possible unintentional touch. Thus whether according to Shach ibid or Beis Yosef ibid there is no prohibition involved. [Igros Moshe ibid]
 Printed in Ohalei Yaakov p. 237 footnote 186