Rabbi Simlai expounded: Six hundred thirteen commandments were given to Moses: 365 negative commandments corresponding to the number of days in the [solar] year and 248 positive commandments corresponding to the number of organs in the human body.
David came and reduced them to eleven, as it is written:
“Adonai, who may live in Your tent?
Who may dwell on Your holy mountain?
One who lives without blame,
who does what is right,
and in one’s heart acknowledges the truth;
whose tongue is not given to evil;
who has never done harm to another,
or borne reproach for acts toward a neighbor;
for whom a contemptible person is abhorrent,
and who honors those who fear God;
who stands by one’s oath even to hurt;
who has never lent money at interest,
or accepted a bribe against the innocent.
One who acts thusly shall never be shaken.” (Psalm 15)
Isaiah came and reduced them to six, as it is written:
“One who walks in righteousness, speaks uprightly,
spurns profit from fraudulent dealings,
waves away a bribe instead of grasping it,
stops one’s ears against listening to infamy,
and shuts one’s eyes against looking at evil,
such a one will dwell in lofty security….” (Isaiah 33:15-16)
Micah came and reduced them to three, as it is written:
“It has been told to you what is good,
and what God seeks from you:
Only acting justly, loving goodness,
and walking humbly with your God.” (Micah 6:8)
Isaiah then reduced them to two, as it is written:
“Thus said God:
observe what is right and do what is right.” (Isaiah 56:1)
Amos came and reduced them to one, as it is said:
“For thus said God to the house of Israel:
‘Seek Me and live.’” (Amos 5:4)
Rav Nachman bar Isaac objected…
Habakkuk came and reduced them to one, as it is said:
“The righteous shall live by faith.” (Habakkuk 2:4)
This teaching begins by affirming that the Torah contains 613 mitzvot/commandments. Of these mitzvot, 248 are positive and 365 are negative. The rabbis then cite a number of passages from later in scripture which can be interpreted as a summary of these mitzvot. Each statement in term reduces them to a smaller number ending up with two different statements from the prophets Amos and Habakkuk which are said to summarize all of the mitzvot.
In examining this passage, it becomes clear that what the rabbis are doing is trying to find a succinct way of defining Judaism and what we as Jews are expected to do. Each of the passages cited expresses basic principles that are core teachings. In citing these passages from the Prophets, the rabbis seem to be saying that when each of the individuals (David, Isaiah, Micah…) offered his words he was expressing an idea which encapsulated all of the mitzvot. Their words should thus be understood as exhortations to observe Judaism through following the mitzvot.