"You shall not follow a majority to do evil" (Exodus 23:2). From where do we know that a lesser Sanhedrin consists of twenty-three? As it is said, "And the congregation shall judge" (Numbers 35:24), "and the congregation shall deliver" (Numbers 35:25) — a congregation that judges and a congregation that delivers, that makes twenty. And from where that a congregation is ten? As it is said, "How long shall this evil congregation" (Numbers 14:27) — excluding Joshua and Caleb. And from where the additional three? From the implication of "You shall not follow a majority to do evil," I would hear that I should be with them for good; if so, what does Scripture teach by "after a majority"? Your inclining toward conviction is not like your inclining toward acquittal: for acquittal by a single vote, for conviction by two; and since a court must not be evenly balanced, one more is added, making twenty-three. "After the majority to incline" (Exodus 23:2): Rabbi Eliezer the son of Rabbi Yose the Galilean says — what does Scripture teach by "after the majority to incline"? The Torah said: make for yourself a court that inclines. Twelve acquit and eleven convict — acquitted. Thirteen convict and ten acquit — guilty. Or eleven acquit and twelve convict, I would hear he is guilty; Scripture teaches, "You shall not respond in a dispute" — the Torah said: execute by witnesses, execute by those who incline; just as witnesses are two, so those who incline [for conviction must exceed by] two. Eleven acquit and eleven convict and one says "I do not know" — this is a warning to the judge to incline only toward acquittal, as it is said, "You shall not respond in a dispute to incline." In monetary cases, and matters of purity and impurity, they begin with the greatest. In capital cases they begin from the side [the lesser judges first]. From where these things? Rav Aha bar Pappa said: Scripture says, "You shall not respond [al riv]" — read it "upon the great one [al rav]." Rabbah bar bar Hannah said: from here — "And David said to his men, Let every man gird on his sword, and David too girded on his sword" (1 Samuel 25:13). "And you shall not favor a poor man in his dispute" (Exodus 23:3): why is it said? Because it says, "You shall not favor the poor nor honor the great" (Leviticus 19:15), which specified. I would know only these; from where their opposites? Scripture teaches, "And you shall not favor a poor man in his dispute." Abba Hanan says in the name of Rabbi Eliezer: Scripture speaks of gleanings, the forgotten sheaf, and the corner of the field.
Following the Majority and the Courts of Twenty-Three
Yalkut Shimoni on Torah 352:6
(שמות כג ב) לֹא תִהְיֶה אַחֲרֵי רַבִּים לְרָעֹת, מִנַּיִן לְסַנְהֶדְרֵי קְטַנָּה שֶׁהִיא שֶׁל עֶשְׂרִים וּשְׁלֹשָׁה, שֶׁנֶּאֱמַר (במדבר לה, כד) "וְשָׁפְטוּ הָעֵדָה", (שם, כה) "וְהִצִּילוּ הָעֵדָה", עֵדָה שׁוֹפֶטֶת וְעֵדָה מַצֶּלֶת, הֲרֵי עֶשְׂרִים. וּמִנַּיִן לְעֵדָה שֶׁהִיא עֲשָׂרָה, שֶׁנֶּאֱמַר (שם כד, כז) "עַד מָתַי לָעֵדָה הָרָעָה", יָצְאוּ יְהוֹשֻׁעַ וְכָלֵב. וּמִנַּיִן עוֹד שְׁלֹשָׁה, מִמַּשְׁמַע שֶׁנֶּאֱמַר לֹא תִהְיֶה אַחֲרֵי רַבִּים לְרָעֹת שׁוֹמֵעַ אֲנִי שֶׁאֶהְיֶה עִמָּהֶן לְטוֹבָה, אִם כֵּן מַה תַּלְמוּד לוֹמַר אַחֲרֵי רַבִּים, לֹא כְּהַטָּיָתְךָ לְטוֹבָה הַטָּיָתְךָ לְרָעָה, לְטוֹבָה עַל פִּי עֵד אֶחָד, לְרָעָה עַל פִּי שְׁנַיִם, וְאֵין בֵּית דִּין שָׁקוּל, מוֹסִיפִין עֲלֵיהֶן עוֹד אֶחָד, הֲרֵי עֶשְׂרִים וּשְׁלֹשָׁה. אַחֲרֵי רַבִּים לְהַטֹּת, רַבִּי אֱלִיעֶזֶר בְּנוֹ שֶׁל רַבִּי יוֹסֵי הַגְּלִילִי אוֹמֵר, מַה תַּלְמוּד לוֹמַר אַחֲרֵי רַבִּים לְהַטֹּת, הַתּוֹרָה אָמְרָה עֲשֵׂה לְךָ בֵּית דִּין נוֹטֶה. שְׁנֵים עָשָׂר מְזַכִּין וַאֲחַד עָשָׂר מְחַיְּבִין, זַכַּאי. (שׁוֹמֵעַ אֲנִי עֲשָׂרָה) [שְׁלֹשָׁה עָשָׂר] מְחַיְּבִין וַעֲשָׂרָה מְזַכִּין, חַיָּב. אוֹ אֲחַד עָשָׂר מְזַכִּין וּשְׁנֵים עָשָׂר מְחַיְּבִין, שׁוֹמֵעַ אֲנִי יְהֵא חַיָּב, תַּלְמוּד לוֹמַר וְלֹא תַעֲנֶה עַל רִב, אָמְרָה תּוֹרָה, הֲרֹג עַל פִּי עֵדִים, הֲרֹג עַל פִּי מַטִּין, מָה עֵדִים בִּשְׁנַיִם אַף מַטִּין בִּשְׁנָיִם. אַחַד עָשָׂר מְזַכִּין וְאַחַד עָשָׂר מְחַיְּבִין וְאֶחָד אוֹמֵר אֵינִי יוֹדֵעַ, הֲרֵי זֶה אַזְהָרָה לַדַּיָּן שֶׁלֹּא יַטֶּה אֶלָּא לְכַף זְכוּת (תַּלְמוּד לוֹמַר), [שֶׁנֶּאֱמַר] וְלֹא תַעֲנֶה עַל רִב לִנְטֹת אַחֲרֵי רַבִּים לְהַטֹּת. דִּינֵי מָמוֹנוֹת, הַטְּהָרוֹת וְהַטֻּמְאוֹת, מַתְחִילִין מִן הַגָּדוֹל. דִּינֵי נְפָשׁוֹת מַתְחִילִין מִן הַצַּד. מִנָּא הָנֵי מִלֵּי, אֲמַר רַב אָחָא בַּר פַּפָּא, אֲמַר קְרָא, לֹא תַעֲנֶה עַל רִב, לֹא תַעֲנֶה עַל רָב. רַבָּה בַּר בַּר חַנָּה אֲמַר, מֵהָכָא, (שמואל א כה, יג) "וַיֹּאמֶר דָּוִד לַאֲנָשָׁיו חִגְרוּ אִישׁ [אֶת] חַרְבּוֹ וַיַּחְגֹּר גַּם דָּוִד אֶת חַרְבּוֹ". (שמות כג ג) וְדָל לֹא תֶהְדַּר בְּרִיבוֹ, לָמָּה נֶאֱמַר, לְפִי שֶׁהוּא אוֹמֵר "לֹא תִשָּׂא פְנֵי [דָּל וְלֹא תֶהְדַּר פְּנֵי] גָדוֹל", פִּרֵט. אֵין לִי אֶלָּא אֵלּוּ. חִלּוּפֵיהֶן מִנָּיִן. תַּלְמוּד לוֹמַר וְדָל לֹא תֶהְדַּר בְּרִיבוֹ. אַבָּא חָנָן אוֹמֵר מִשּׁוּם רַבִּי אֱלִיעֶזֶר, בְּלֶקֶט שִׁכְחָה וּפֵאָה הַכָּתוּב מְדַבֵּר.