Halacha

הלכה א
בֵּית דִּין שֶׁנֶּחְלְקוּ מִקְצָתָם אוֹמְרִים זַכַּאי וּמִקְצָתָם אוֹמְרִים חַיָּב הוֹלְכִין אַחַר הָרֹב. וְזוֹ מִצְוַת עֲשֵׂה שֶׁל תּוֹרָה שֶׁנֶּאֱמַר (שמות כג ב) "אַחֲרֵי רַבִּים לְהַטֹּת". בַּמֶּה דְּבָרִים אֲמוּרִים בְּדִינֵי מָמוֹנוֹת וּבִשְׁאָר דִּינֵי אָסוּר וּמֻתָּר וְטָמֵא וְטָהוֹר וְכַיּוֹצֵא בָּהֶן. אֲבָל בְּדִינֵי נְפָשׁוֹת אִם נֶחְלְקוּ בָּזֶה הַחוֹטֵא אִם יֵהָרֵג אוֹ לֹא יֵהָרֵג. אִם הָיוּ הָרֹב מְזַכִּים זַכַּאי וְאִם הָיוּ הָרֹב מְחַיְּבִין אֵינוֹ נֶהֱרָג עַד שֶׁיִּהְיוּ הַמְחַיְּבִין יֶתֶר עַל הַמְזַכִּים שְׁנַיִם. מִפִּי הַשְּׁמוּעָה לָמְדוּ שֶׁעַל זֶה הִזְהִירָה תּוֹרָה וְאָמְרָה (שמות כג ב) "לֹא תִהְיֶה אַחֲרֵי רַבִּים לְרָעֹת". כְּלוֹמַר אִם הָרֹב נוֹטִים לְרָעָה לַהֲרֹג לֹא תִּהְיֶה אַחֲרֵיהֶם עַד שֶׁיִּטּוּ הַטָּיָה גְּדוֹלָה וְיוֹסִיפוּ הַמְחַיְּבִין שְׁנַיִם. שֶׁנֶּאֱמַר (שמות כג ב) "לִנְטֹת אַחֲרֵי רַבִּים לְהַטֹּת" הַטָּיָתְךָ לְטוֹבָה עַל פִּי אֶחָד לְרָעָה עַל פִּי שְׁנַיִם. וְכָל אֵלּוּ הַדְּבָרִים קַבָּלָה הֵם:
כסף משנה
1.
When a court reaches a split decision - some say that the defendant is not liable, and others say that he is liable, we follow the majority. This is a positive mitzvah of Scriptural origin, as Exodus 23:2 states: "Follow after the inclination of the majority."
When does the above apply? With regard to financial matters and with regard to laws involving questions of what is forbidden and what is permitted, what is impure and what is pure and the like. With regard to capital cases, different laws apply if there is a difference of opinion whether the transgressor should be executed or not. If the majority rule to exonerate him, he is exonerated. If, however, the majority rules that he is guilty, he should not be executed until there are at least two more judges who hold him guilty than who exonerate him.
According to the Oral Tradition, we learned that the Torah warned against this saying Ibid.: "Do not follow the majority to do harm." That is to say that if the majority are inclined "to do harm," i.e., to execute the defendant, you should not follow them until there is a significant inclination, and there is a majority of two judges who rule that he is guilty.
This is implied by (Ibid.): "to follow the inclination of the majority and influence the judgment." A positive inclination may be made on the basis of a majority of one, a harmful inclination, on the basis of a majority of two. All of these concepts are based on the Oral Tradition.

הלכה ב
בֵּית דִּין שֶׁל שְׁלֹשָׁה שֶׁנֶּחְלְקוּ שְׁנַיִם אוֹמְרִים זַכַּאי וְאֶחָד אוֹמֵר חַיָּב הֲרֵי זֶה זַכַּאי. שְׁנַיִם אוֹמְרִים חַיָּב וְאֶחָד אוֹמֵר זַכַּאי הֲרֵי זֶה חַיָּב. אֶחָד אוֹמֵר זַכַּאי וְאֶחָד אוֹמֵר חַיָּב וְאֶחָד אוֹמֵר אֵינִי יוֹדֵעַ. אוֹ שֶׁאָמְרוּ שְׁנַיִם זַכַּאי אוֹ חַיָּב וְהַשְּׁלִישִׁי אוֹמֵר אֵינִי יוֹדֵעַ יוֹסִיפוּ הַדַּיָּנִים שְׁנַיִם. נִמְצְאוּ חֲמִשָּׁה נוֹשְׂאִים וְנוֹתְנִים בַּדָּבָר. אָמְרוּ שְׁלֹשָׁה מֵהֶם זַכַּאי וּשְׁנַיִם אוֹמְרִים חַיָּב הֲרֵי זֶה זַכַּאי. אָמְרוּ שְׁלֹשָׁה חַיָּב וּשְׁנַיִם זַכַּאי הֲרֵי זֶה חַיָּב. אָמְרוּ שְׁנַיִם מֵהֶם זַכַּאי וּשְׁנַיִם מֵהֶם חַיָּב וְאֶחָד אוֹמֵר אֵינִי יוֹדֵעַ מוֹסִיפִין שְׁנַיִם. אֲבָל אִם אָמְרוּ אַרְבָּעָה זַכַּאי אוֹ חַיָּב וְאֶחָד אוֹמֵר אֵינִי יוֹדֵעַ. אוֹ שֶׁאָמְרוּ שְׁלֹשָׁה זַכַּאי וְאֶחָד חַיָּב וְאָמַר אֶחָד אֵינִי יוֹדֵעַ בֵּין שֶׁהָיָה זֶה שֶׁאָמַר אֵינִי יוֹדֵעַ הוּא שֶׁאָמַר אֵינִי יוֹדֵעַ בַּתְּחִלָּה בֵּין שֶׁאָמַר אַחֵר הוֹלְכִים אַחַר הָרֹב. הָיוּ מֶחֱצָה לְמֶחֱצָה וְאֶחָד אוֹמֵר אֵינִי יוֹדֵעַ הֲרֵי אֵלּוּ מוֹסִיפִין שְׁנַיִם אֲחֵרִים. וְכֵן אִם נִסְתַּפֵּק הַדָּבָר מוֹסִיפִין וְהוֹלְכִין עַד שִׁבְעִים וְאֶחָד. הִגִּיעוּ לְשִׁבְעִים וְאֶחָד וְאָמְרוּ שְׁלֹשִׁים וַחֲמִשָּׁה חַיָּב וּשְׁלֹשִׁים וַחֲמִשָּׁה זַכַּאי וְאֶחָד אוֹמֵר אֵינִי יוֹדֵעַ נוֹשְׂאִים וְנוֹתְנִים עִמּוֹ עַד שֶׁיַּחֲזֹר לְדִבְרֵי הַצַּד הָאֶחָד וְנִמְצְאוּ שְׁלֹשִׁים וְשִׁשָּׁה מְזַכִּים אוֹ מְחַיְּבִין. וְאִם לֹא חָזַר לֹא הוּא וְלֹא אֶחָד מֵהֶן הֲרֵי הַדָּבָר סָפֵק וּמַעֲמִידִין אֶת הַמָּמוֹן בְּחֶזְקַת בְּעָלָיו:
כסף משנה
2.
The following laws apply when there is a difference of opinion within a court of three judges with regard to a monetary issue: If two say the defendant's claim should be vindicated and one says that he is liable, his claim is vindicated. If two say that he is liable and one says his claim should be vindicated, he is held liable. If one says that his claim should be vindicated and one says he is liable, or two say that his claim should be vindicated or that he is liable and the third judge says: "I do not know," we add another two judges. Thus five judges debate the matter.
If three say the defendant's claim should be vindicated and two say that he is liable, his claim is vindicated. If three say that he is liable and two say his claim should be vindicated, he is held liable. If two say that his claim should be vindicated and two say he is liable, and the fifth judge says: "I do not know," we add another two judges. If, however, four say his claim should be vindicated or that he is liable and one says: "I don't know," or three say his claim should be vindicated and one says that he is liable, and the fifth says: "I don't know," we follow the majority. This applies whether the judge who says: "I don't know" is the same who said "I don't know" at the outset or another individual.
If, in this situation as well, the opinions are evenly balanced and one says: "I don't know," or in any situation that there is a doubt, we continue to add two more judges until we reach 71 judges. If, after reaching 71, the issue is still unresolved, i.e., 35 hold him liable, and 35 wish to vindicate his claim and one says: "I don't know," they debate the matter until the judge who has not made up his mind sides with one of the opinions and thus there will be 36 who vindicate him or 36 who hold him liable. If neither that judge or another changes his opinion, the matter remains unresolved and the money is allowed to remain in the possession of its owner.

הלכה ג
כָּל מִי שֶׁאָמַר אֵינִי יוֹדֵעַ אֵינוֹ צָרִיךְ לָתֵת טַעַם לִדְבָרָיו וּלְהוֹדִיעַ מֵאֵי זֶה טַעַם בָּא לוֹ הַסָּפֵק. כְּדֶרֶךְ שֶׁמַּרְאֶה הַמְזַכֶּה מֵאֵי זֶה טַעַם מְזַכֶּה וְהַמְחַיֵּב מֵאֵי זֶה טַעַם מְחַיֵּב:
כסף משנה
3.
Whenever a judge says: "I don't know," he is not required to explain the rationale for his statements and explain the reason why he is in doubt. In contrast, a judge who rules that a litigant's claim is vindicated must state why he vindicates the claim, or if he holds him liable, he must state why he holds him liable.

שופטים הלכות סנהדרין והעונשין המסורין להם פרק ח
Shoftim Sanhedrin Chapter 8