"Appoint judges and officers in all your gates"—Deuteronomy 16:18.
We are commanded to appoint judges who will implement the Torah's commandments, and compel those who stray from the true path to follow the mitzvot. They will command regarding the performance of the good, and warn against doing evil, and will implement punishments against those who transgress. This in order that the observance of the commandments and prohibitions of the Torah not be given to the discretion of each individual.
Included in this mitzvah is the establishment of a judicial hierarchy.
- A court of 23 judges is established in every city that meets a minimum population requirement. This court, called a sanhedrei ketanah (a "small court"), convenes at the gate of the city. A city that does not have sufficient population to warrant a 23-member court should, at the very least, have a 3-member court, which presides over minor matters, and forwards larger matters to a court above them.
The local courts appoint inspectors to monitor the markets and ensure that people conduct business with honesty, so that not even slight injustices are perpetrated. - Every tribe has its own "supreme court."
- In Jerusalem sits the beit din hagadol (the "high court") consisting of 70 judges in addition to the chief presiding justice. This individual is also known as the Nasi. This court gathers in the location designated for them [in a chamber in the Holy Temple].