1) THE DIFFERENCE BETWEEN "MALKUS D'ORAISA" AND "MAKAS MARDUS"
OPINIONS: The Mishnah states that when a woman drinks wine under the impression that she is a Nazir, unaware that her husband already annulled her Nezirus, she does not receive the Torah-prescribed Malkus which one normally would receive for transgressing a Neder. Rebbi Yehudah adds that she does receive Makas Mardus (Malkus d'Rabanan).
In what ways does Makas Mardus differ from Malkus d'Oraisa?
(a) TOSFOS (20b, DH Rebbi Yehudah) and the ROSH cite a Tosefta in Makos (3:10) which teaches that Malkus d'Oraisa of the Torah is comprised of 39 lashes, but Beis Din must evaluate the strength of the person liable for Malkus and determine how many lashes he can tolerate (without endangering his life). Makas Mardus is different; the person is beaten until he either accepts to do what Beis Din tells him to do or "until his soul leaves him" (Kesuvos 86a).
The ARUCH (Erech "Mered") differentiates similarly between the two types of Malkus. He writes that one who transgresses a Mitzvas Aseh (by refusing to fulfill it) is lashed until his soul leaves him, and, similarly, one who transgresses the words of the Chachamim is lashed with no assessment of his strength and no set number of lashes. (The Aruch writes that they are called "Makas Mardus" because the person "rebelled" (Marad) against the Chachamim and the Torah.) This is also the opinion of the GE'ONIM (cited by the NIMUKEI YOSEF, end of Makos). The RAMBAM (Hilchos Chametz u'Matzah 6:12) also writes that Makas Mardus for one who eats Matzah on Erev Pesach (an Isur d'Rabanan) is administered until he does what he is supposed to do or until his soul leaves him. RASHI in Chulin (141b, DH Makas) also writes that Makas Mardus involves lashes without limit (until the person accepts to do what he is supposed to do).
Why, though, are the laws of Malkus d'Rabanan more strict than the laws of Malkus d'Oraisa? This question is especially applicable in the case of the Gemara here in which the sin of the woman cannot even be called a transgression of an Isur d'Rabanan; she is punished merely for intent to transgress an Isur d'Oraisa.
The RIVASH (#90) addresses this question and concludes that Makas Mardus which is administered "until his soul leaves him" is merely a form of preventative Malkus, given as rebuke to convince a person to fulfill a Mitzvah actively (Kum v'Aseh). However, if a person transgressed a Mitzvah d'Rabanan and Beis Din simply wants to punish him for his wrongdoing, Makas Mardus certainly has a limit, and it is treated like Malkus d'Oraisa. TOSFOS and the ROSH make a similar distinction. (According to the Rivash, it seems that the word "Mardus" does not mean "rebelling," but "rebuke," as in Berachos 7a; see also Rashi in Chulin, loc. cit.)
According to this explanation, however, in the case of the Mishnah here what difference does it make if the woman receives Malkus d'Oraisa or Makas Mardus?
(b) RABEINU TAM (cited by the SHILTEI GIBORIM on the MORDECHAI, Bava Basra 8:1, and by the TESHUVOS RASHBASH #96) explains that Makas Mardus for an Aveirah which one already committed is comprised of only 13 lashes and not 39. The Torah prescribes 39 lashes for Malkus d'Oraisa because of the need to give a triple set of lashes -- one on each of the two shoulders, and one on the stomach. Makas Mardus does not need to be tripled and is administered only on the back, and therefore only 13 lashes are given. (See Insights to Yoma 77:1. This may be the intention of the Aruch when he mentions that Malkus d'Oraisa must be "Meshulashos," but not Makas Mardus.)
(c) The RIVASH cites TOSFOS (see Tosfos to Bechoros 54a, DH u'Shnei) who explains that Makas Mardus is comprised of 39 lashes like Malkus d'Oraisa, but they are not as powerful. They are given while the person is dressed, and without the full strength of the one who administers them. This explains why Beis Din is not required to assess whether the person can tolerate the Malkus.
Some add that Makas Mardus is administered with a stick instead of a whip (see Rashi to Sanhedrin 7b, DH Makel). According to this view, the word "Mardus" may be based on the expression, "Rodeh b'Makel" (see Sotah 40a, Shabbos 52b). (See Insights to Kidushin 28:2.)
2) AGADAH: THE SEAL OF REBBI AKIVA'S FATE
The Gemara cites a Beraisa which states that Rebbi Akiva cried when he read the verse, "Her husband annulled [her Nedarim], and Hash-m will pardon her" (Bamidbar 30:13). The verse teaches that when a woman attempts to do an Aveirah by transgressing her Neder but fails to do the Aveirah because her husband has already annulled her Neder without her knowledge, she still needs pardon and atonement (Selichah v'Kaparah).
RAV YOSEF ENGEL in GILYONEI HA'SHAS cites an early source which explains why it was specifically Rebbi Akiva who reacted in such a dramatic way to the lesson of this verse. The ARIZAL explains that the deaths of the Asarah Harugei Malchus, the ten great Tana'im who were tortured and executed near the time of the Churban of the second Beis ha'Mikdash, served as an atonement for the sin of the sons of Yakov who sold their brother, Yosef, to Mitzrayim as a slave. (This is alluded to in the Piyutim composed to memorialize the Asarah Harugei Malchus.) He adds that the death of Rebbi Akiva, who was the greatest among the Asarah Harugei Malchus, was intended to atone for the sin of Shimon, who was the most influential brother involved in the plot to sell Yosef. (His name, "Akiva ben Yosef," alludes to his association with Yosef.)
When the brothers asked Yosef for forgiveness after their father died (Bereishis 50:16-17), Yosef told them that there is nothing to forgive. He explained to them that although they had malicious intent when they sold him, it was Hash-m's will that he be brought to Mitzrayim in order to keep the family of Yakov alive during the famine (Bereishis 50:20). (The OR HA'CHAIM there points out that Yosef never actually said that he forgave them, and that is why the Asarah Harugei Malchus were killed as an atonement for their sin.)
Yosef's response to his brothers implies that the sin for which Rebbi Akiva suffered so greatly was that the brothers sought to do something which was sinful, but the act which they did was actually the will of Hash-m. Rebbi Akiva reacted so emotionally when he read the verse, "and Hash-m will pardon her," because he understood that atonement is necessary even for one who merely intends to do evil. He realized that the lesson of this verse would be the source for his own suffering.

23b----------------------------------------23b

3) THE MERIT OF PERFORMING A MITZVAH "SHE'LO LISHMAH"
QUESTION: Rav Yehudah in the name of Rav teaches that a person should always engage in the study of Torah and the fulfillment of Mitzvos, even when his motives are insincere ("she'Lo Lishmah"), because through the act of performing the Mitzvos with insincere motives, he eventually will perform them with sincere motives ("Lishmah"). This concept is derived from the conduct of Balak, who offered 42 sacrifices to Hash-m with intent to endear Hash-m to help him destroy the Jewish people. In return for his Mitzvah "she'Lo Lishmah," Balak merited to have Ruth among his descendants (see following Insight). (The MEFARESH refers to the Gemara in Berachos (7b) which says that her name was "Ruth" because her great-grandson, David ha'Melech, "satisfied (she'Rivahu) Hash-m with songs and praises," the ultimate fulfillment of serving Hash-m "Lishmah.")
TOSFOS (DH she'Mitoch) questions the teaching of Rav from the Gemara in Berachos (17a) which says that "it would have been better had a person not been created than to be involved in a Mitzvah for insincere motives." Tosfos answers that the Gemara in Berachos refers to one who does a Mitzvah with intention to undermine or persecute others, while the Gemara here refers to one who does a Mitzvah merely to gain honor or a good reputation.
The SEFAS EMES asks that according to Tosfos' distinction, what is the Gemara's proof from Balak that one who engages in Torah and Mitzvos "she'Lo Lishmah" will eventually do them "Lishmah"? Balak's offering of sacrifices to Hash-m was clearly done with intent to destroy the Jewish people and not merely for the insincere motive of personal honor. How can the Gemara prove that "she'Lo Lishmah" leads to "Lishmah" from Balak if Balak's Mitzvah of "she'Lo Lishmah" was the type for which the Gemara in Berachos says that it would have been better had the person not been created?
ANSWER: When Tosfos writes that learning Torah or doing Mitzvos in order to persecute others is bad, he refers to a person who does a Mitzvah with the sole intention of persecuting others through his action. The person has no intention to fulfill the will of Hash-m at all. Balak, on the other hand, had genuine intent to do the Mitzvah in order to gain favor in the eyes of Hash-m. Although his goal was to gain favor in the eyes of Hash-m in order to bring about the destruction of the Jewish people, his immediate goal was to gain favor, an acceptable form of "she'Lo Lishmah."
Perhaps this explains why the result of Balak's Mitzvah "she'Lo Lishmah" was a "Lishmah" which occurred only after many generations, when Ruth was born. Since his Mitzvah "she'Lo Lishmah" was not done merely to gain honor but also included the ultimate goal of causing someone's downfall, he did not personally experience the merit of that Mitzvah "she'Lo Lishmah." In contrast, when a person is involved in a Mitzvah "she'Lo Lishmah" only for his own personal benefit, he personally merits to be involved in a Mitzvah "Lishmah." (See Insights to Sotah 22:3.)
4) AGADAH: THE MERIT OF BALAK
QUESTION: Rav Yehudah in the name of Rav teaches that a person should always engage in the study of Torah and the fulfillment of Mitzvos, even when his motives are insincere ("she'Lo Lishmah"), because through the act of performing the Mitzvos with insincere motives, he eventually will perform them with sincere motives ("Lishmah"). This concept is derived from the conduct of Balak, who offered 42 sacrifices to Hash-m with intent to endear Hash-m to help him destroy the Jewish people. In return for his Mitzvah "she'Lo Lishmah," Balak merited to have Ruth among his descendants (see following Insight). (The MEFARESH refers to the Gemara in Berachos (7b) which says that her name was "Ruth" because her great-grandson, David ha'Melech, "satisfied (she'Rivahu) Hash-m with songs and praises," the ultimate fulfillment of serving Hash-m "Lishmah.") (See previous Insight.)
What is the connection between Balak's 42 sacrifices and the reward he received, the privilege of being the forebear of David ha'Melech, the greatest king of Yisrael? Hash-m interacts with man through the system of "Midah k'Neged Midah," measure for measure; the reward or punishment Hash-m gives for one's deed always corresponds to the deed itself. In what way was Balak's reward related to his deed?
ANSWERS:
(a) RASHI in Sotah (47a, DH Zachah) offers a simple explanation. David ha'Melech planned (and his son Shlomo executed) the building of the Beis ha'Mikdash in Yerushalayim -- the place where Hash-m chose to have sacrifices brought before Him. Hence, the sacrifices of Balak led to the institution of the place where sacrifices would be offered regularly to Hash-m.
(b) Even the number of Balak's sacrifices (42), of which the Gemara makes special mention, is accounted for in Balak's reward. Balak's 42 sacrifices were offered at three different locations and times, and each occasion involved fourteen sacrifices (see Bamidbar 23:1, 23:14, 23:29). Fourteen is the Gematriya of the name "David"!
The years of David's life may be divided into three periods: before he was anointed as king, the seven years he ruled in Chevron only over the tribe of Yehudah, and the 33 years he ruled in Yerushalayim over the united kingdom of Yisrael. Perhaps the three sets of sacrifices (fourteen in each set) offered by Balak corresponded to the three stages in the development of David ha'Melech's kingship.
There is yet another dimension to this analysis. The prophet relates (Shmuel I 13:1) that Shaul ha'Melech, who ruled over Yisrael for two years before David ha'Melech was anointed, sinned against Hash-m in the first year of his reign (according to Rashi's interpretation of the verse). According to Seder Olam (ch. 13), it was at that point that the prophet Shmuel went to anoint David as king of Yisrael (see Shmuel I, ch. 16). Accordingly, David was anointed as king for two years before he "officially" ascended to the throne at Chevron. When those two years are added to the total length of David ha'Melechs reign, it emerges that David ha'Melech was king of Yisrael for a total of exactly 42 years! This is the connection between Balak's acts (his sacrifice of 42 animals) and his reward (his descendant was anointed as king of Yisrael for 42 years).