…after the majority to follow (Exodus 23:2)
As discussed, capital crimes require a supermajority to convict but other cases are decided based on a simple majority. (This would necessarily be the case in civil suits where the beis din is composed of three judges, as the only options there are a simple majority of 2-1 or a unanimous decision of 3-0.)
Following the majority is the general rule in deciding matters of Torah law, assuming that all of the people involved in the debate are of comparable stature. (We’re speaking of differences of opinion among those who are experts in the field. Non-experts must defer to experts, whether the topic is landing a plane, performing surgery or deciding matters of Jewish law.) The Talmud in Yevamos (14a) discusses how the students of Beis Shammai did not follow their own opinion in a certain matter as they were outvoted by the students of Beis Hillel; they acknowledged the principle that in deciding matters of halacha, a majority vote of the Sages rules.
The reason for this mitzvah is that if every individual was left to observe the Torah as he or she personally understood it, there would be as many versions of Judaism as there are Jews! No one could ever defer to another opinion, as everyone would be personally obligated to follow his or her own conscience in every matter. In order to have a feasible society, the Torah had to dictate that a majority consensus of the Sages would decide matters of religious practice. This unifies Jews worldwide and enables the Torah to survive and be transmitted from generation to generation.
In the event that the Sanhedrin rules incorrectly in a matter of Jewish law, the onus is on them rather than on the individuals who act according to the erroneous ruling. In a famous case, Rabbi Eliezer disagreed with the majority in a matter of ritual impurity. He said, “If I’m right, let this tree prove it, let this fountain prove it, let these walls prove it, let the Heavens prove it!” The tree uprooted itself and walked across the yard, the water flowed backwards, the walls bent in and a Heavenly voice said, “He’s right!” This made no difference to the rest of the Sages who said, “The Torah is not decided by trees, fountains, walls or Heavenly voices, it is decided by majority rule!” (See Talmud Baba Metziah 59b.)
This mitzvah applies to both men and women in all times and places because it doesn’t just apply to judges; all of us must table our own opinions and defer to the halacha as determined by the majority. In the Talmud, it is discussed in the tractates of Sanhedrin (2a), Chulin (11a) and Baba Metzia (59b). In the Shulchan Aruch, it is found in Choshen Mishpat 18. It is #175 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos. (Despite the fact that the Sefer HaChinuch says that this mitzvah applies in all times and places, the Chofetz Chaim does not include it in his Sefer HaMitzvos HaKatzar.)