Vayikra19:18

לֹא־תִקֹּם וְלֹא־תִטֹּר אֶת־בְּנֵי עַמֶּךָ וְאָהַבְתָּ לְרֵעֲךָ כָּמוֹךָ אֲנִי יְהוָה׃

You shall not take vengeance and you shall not bear a grudge against the children of your people, and you shall love your neighbour as yourself. I am the Eternal.

Vayikra 19:18

לֹא־תִקֹּם וְלֹא־תִטֹּר אֶת־בְּנֵי

Vayikra / Leviticus 19:18 · Drash

Vayikra 19:18

לֹא־תִקֹּם וְלֹא־תִטֹּר אֶת־בְּנֵי עַמֶּךָ וְאָהַבְתָּ לְרֵעֲךָ כָּמוֹךָ אֲנִי יְהוָה׃

You shall not take vengeance and you shall not bear a grudge against the children of your people, and you shall love your neighbour as yourself. I am the Eternal.

Drash דְּרָשׁ

The whole Torah on one foot

How do you say the main thing in a few words when the other person has no time for a long talk?

The Talmud: a gentile asked to be taught the whole Torah while he stood on one foot. Shammai pushed him away, and Hillel said: "What is hateful to you, do not do to your fellow, that is the whole Torah." Netziv: taking vengeance on a neighbour is like a hand cut by a knife taking vengeance on the other hand, for the whole people is one soul.

How Talmud, Shabbat and Haamek Davar explain it

Talmud, Shabbat And you shall love your neighbour as yourself

Again, there was a story of a gentile who came before Shammai. He said to him: "Convert me on condition that you teach me the whole Torah while I stand on one foot." He pushed him away with the builder's measure in his hand. He came before Hillel, and he converted him. He said to him: "What is hateful to you, do not do to your fellow. That is the whole Torah, and the rest is its explanation. Go and learn."

Haamek Davar And you shall love your neighbour as yourself

This cannot be taken literally, for it is known that your life comes before the life of your fellow. But Rambam explained in the Laws of Mourning, chapter 14: as you want from your fellow. And this is clear: a person is not so foolish as to expect his fellow to love him as his own self, but only in due measure, by degree of closeness and the like. In the same way you must love people. By this explanation the words stand beside the warning before them: as you want, if you did someone harm, that he not take vengeance on you but pass over your wrong, so act with your neighbour. So the closeness of the words can be explained by Rambam. And from the words of the Jerusalem Talmud I learned another explanation of this closeness. These are its words (Jerusalem Talmud, Nedarim 9:4): "It is written: 'you shall not take vengeance and you shall not bear a grudge against the children of your people'. How is that? A man was cutting meat, and the knife struck his hand. Would he strike his hand back? 'And you shall love your neighbour as yourself.' Rabbi Akiva says: this is a great principle of the Torah." Explanation: vengeance on one's fellow is like a man who was cutting meat, did not watch the hand holding the knife, and struck his other hand with the knife. Would it enter his mind to strike back the hand that cut and take vengeance on it? So "love your neighbour as yourself" is said after "you shall not take vengeance". Although a person's own life and good come before his fellow's, it is still like the person himself: one limb ought not to strike another, but if it already struck, one does not take vengeance on the limb that struck. So one does not take vengeance on a fellow after he has already harmed you. And this is "as yourself": all Israel is one soul.

Takeaway

The rule "your life comes before the life of your fellow" was taught by Rabbi Akiva about two people in the desert with a single jug of water (Bava Metzia 62a).
Rambam writes: everything you want others to do for you, do for your brother (Rambam, Laws of Mourning 14:1).
The builder's measure is a cubit-long rod with which builders measured stones (Rashi on Shabbat 31a).