The first Mishna in Massekhet Sanhedrin (2a) taught that for simple cases of monetary matters the appropriate court is made up of three judges. Several sources are offered by the Gemara for this number of judges. According to Rabbi Yonatan, the repeated use of the word elohim in Shemot 22:8 indicates that we need two judges. We do not want to have an even number of judges, since we want to allow court decisions to be made based on a majority ruling, so we add a third judge to the bench.
While this is the accepted ruling, several other opinions are presented in the Gemara-
Rav Aḥa brei d’Rav Ika suggests that on a Torah level, one judge would be sufficient to act as a court, based on the passage in Sefer Vayikra (19:15) be-tzedek tishpot amitekha – “you (in the singular) must judge your fellow with righteousness.” He concludes, however that we cannot do this mi-shum yoshvei keranot – because of people who are not involved in commerce and do not know the law. Since we fear that the single person who steps forward to judge may be inappropriate, we insist on three judges. We can then be certain that at least one of them will be a good judge who will influence the others.
Shmuel rules that when two judges act as a court, their ruling is accepted, although they are considered to be a beit din ḥatzuf – an impudent court. He apparently accepts Rabbi Yonatan’s teaching that the third judge is appointed in order to avoid an even number, but accepts the ruling of a court that did not follow that rabbinic enactment.
Rabbi Yehuda HaNasi disagrees with the basic ruling and requires five judges. Our Gemara concludes that he also accepts Rabbi Yonatan’s teaching, but he differs in how he understands the word elohim. According to Rabbi, since the word elohim is plural and is repeated twice, the basic requirement is to have four judges, and the fifth is added so that there should not be an even number of judges on the court. The Talmud Yerushalmi offers an alternative source for Rabbi. According to the Yerushalmi, Rabbi compares the judges to witnesses – just as there must be two independent witnesses, so there must be two additional judges beyond the basic requirement of three.