Yaakov Avinu established the Ma’ariv prayer, and based on this, Anshei Knesset HaGedolah instituted praying Shemoneh Esrei at night. They set the time of Ma’ariv to correspond to the offering of the organs and fats of the sacrifices, for whatever they did not succeed in burning during the day would be burned throughout the night (Berachot 26b). However, Ma’ariv is optional (reshut). It is a mitzvah to recite Ma’ariv, but not an obligation. Whoever wanted to engage himself in a different mitzvah, or had already gone to sleep, or found it difficult to pray Ma’ariv for another reason, was not required to do so. The reason that Shacharit and Minchah are different from Ma’ariv is that Shacharit and Minchah were instituted to correspond to the Tamid offering of the morning and afternoon, specifically, to correspond to the sprinkling of their blood. Just as a person who does not sprinkle the blood does not fulfill his obligation of bringing the offering, so too, one is obligated to pray Shacharit and Minchah. However, Ma’ariv was instituted to correspond to the offering of the organs and fats upon the altar. Although it is a mitzvah to bring them, if they were not brought, the offering still remained valid. Therefore, the Ma’ariv prayer is optional.
Nonetheless, throughout the generations, all of Israel became accustomed to praying Ma’ariv. Therefore, at the time of the Rishonim it was established as obligatory. Even so, Chazarat HaShatz is not recited in it, since, in essence, the prayer is optional. Thus, Chazal did not institute an Amidah repetition for it, to fulfill the obligation of the uneducated (Shulchan Aruch 237:1).
Women are exempt from praying Ma’ariv, even according to those who maintain that women are obligated to pray all the prayers instituted by the Chachamim. A woman’s obligation pertains to Shacharit and Minchah, which were established as obligatory, however, she is exempt from Ma’ariv which is optional. The men’s minhag of accepting upon themselves the recitation of Ma’ariv as an obligation does not apply to women.
. In Berachot 27b, according to Rabban Gamliel the Ma’ariv prayer is obligatory, whereas according to Rabbi Yehoshua it is optional. According to Abayei it is obligatory, whereas according to Rava it is optional, and the halachah follows Rava. The majority of Rishonim, among them Tosafot, Talmidei Rabbeinu Yonah, and the Rosh (chapter 4, 2:7), maintain that “optional” (reshut) here means that, indeed, there is a mitzvah to recite Ma’ariv, and it may not be cancelled without justification, though it may be cancelled for a minor reason, as I have written above. By contrast, according to Ba’al Halachot Gedolot, the word “optional” means that a person is permitted to abstain from praying Ma’ariv for no specific reason, although he maintains that if one customarily prays Ma’ariv, his minhag obligates him to pray daily.The Rif writes that today, there is an obligation to pray Ma’ariv. The Rosh and Tur section 235 write this as well. In Seder Rav Amram Gaon, he writes that Half-Kaddish is recited between Birkot Keriat Shema and the Amidah, so as to separate between the obligatory and the optional sections. Even though, today, the prayer is obligatory, the minhag to recite Kaddish remains, in keeping with the essence of the original enactment. The opinions are summarized in Beirur Halachah Berachot 4b.
Most poskim say that someone who begins praying Ma’ariv and remembers in the middle of the Amidah that he already prayed must stop praying immediately, like the law regarding Shacharit and Minchah, for indeed, everything that he prayed was to fulfill his obligation, but when it is clear that he already fulfilled it, he must stop (Bei’ur Halachah 107:1, s.v. “Posek,” and according to many, that is also what is implied from the Shulchan Aruch there). However, according to the Rambam (10:6), he should continue his Amidah as a voluntary prayer (tefillat nedavah). The reason for this is that even nowadays Ma’ariv is, in essence, optional, therefore the basic element of nedavah within it remains (that is also how Yalkut Yosef, part 3, 236:11 rules). One who is uncertain as to whether or not he prayed Shacharit or Minchah must repeat his prayer, but regarding Ma’ariv, the Acharonim disagree. The Mishnah Berurah 107:2 writes that one should pray and add something new in the Amidah (see earlier in this book 18:3). According to all opinions, one who forgot to pray Ma’ariv must make it up after Shacharit (tashlumim), and similarly, one who mistakenly forgot to recite Ya’aleh V’Yavo in Ma’ariv of Chol HaMo’ed must repeat the Amidah (see Beirur Halachah 27b).