The Letter מ
מ ‘Mem’ — the thirteenth letter of the Hebrew alphabet. The origin of its name is supposed to be מַיִם (= water); so called in allusion to the ancient form of this letter resembling waves of water. מ alternates with the other labials, esp. בּ, פּ and נ. It has a final form: ם. In PBH it has the numerical value of forty (מ) and six hundred (ם).
WATER

המליך אות מ"ם במים וקשר לו כתר וצרפן זה עם זה וחתם בהן ארץ בעולם וקור בשנה ובטן בנפש זכר ונקבה זכר במא"ש ונקבה במש"א:

He caused Mem to predominate in Water, and crowned it, and combined it with others, and formed Earth in the world, cold in the year, and the belly in the soul, male and female, male with Mem-Aleph-Shin and female with Mem-Shin-Aleph.

Mem (מ), the 13th letter of the Hebrew alphabet, is associated with water (מים), wellsprings (מעין), immersion (מִקְוֶה), mystical devotion (מרכבה) and Moses (משה), whose name means "drawn out [of water]." Its gematria, numerical value, is 40, so Mem is connected to many foundational stories from the Torah, including the Flood (it lasted 40 days), the giving of the Torah (Moses ascended Mt. Sinai three separate times for 40 days) and the 40 years of wandering in the desert. A mikveh, ritual pool, must contain it least 40 se'ah (an ancient measurement) of water to bestow its powers of purification. For these reasons and more, Mem is the letter of transformation. [Learn more: https://www.chabad.org/library/article_cdo/aid/137085/jewish/Mem-Metamorphosis.htm]

CREATION
עָאלַת אָת מ אָמְרָה קַמֵּיהּ רִבּוֹן עָלְמָא, נִיחָא קַמָּךְ לְמִבְרֵי בִּי עָלְמָא, דְּבִי אִתְקְרִיאַת מֶלֶךְ. אָמַר לָהּ הָכִי הוּא וַדַּאי, אֲבָל לָא אִבְרֵי בָּךְ עָלְמָא בְּגִין דְּעָלְמָא אִצְטְרִיךְ לְמֶלֶךְ תּוּב לְאַתְרָךְ, אַנְתְּ וְ-ל וְ-ך דְּהָא לָא יָאוֹת לְעָלְמָא לְמֵיקַם בְּלָא מֶלֶךְ.
The letter Mem entered and said: “Master of the world, it would be good for You to create the world by me, for Melech is called by me.” The Creator replied: “That is so, but I shall not create the world by you, for the world needs a King. Return to your place. Also, I shall not create the world with the letters Lamed and Chaf that form the word MeLeCH, as the world cannot exist without a King.”
BIRTH
וְעַל־יְדֵי־זֶה נִפְתָּח רַחְמָהּ שֶׁל הַמְקַשָּׁה לֵילֵד, כַּמּוּבָא בְּעֵץ־חַיִּים (שער ל"ה פ"ג): כְּשֵׁם שֶׁיֵּשׁ צִירִים וּדְלָתוֹת לַבַּיִת, כָּךְ יֵשׁ צִירִים וּדְלָתוֹת לָאִשָּׁה (בכורות מה), וּמֵהַשְּׁתֵּי דַּלְתִין נַעֲשֶׂה צוּרַת ם סְתוּמָה, שֶׁשָּׁם נוֹצָר הַוָּלָד וְכוּ'. עַיֵּן שָׁם.
5. Through this, the womb of a woman in labor is opened. As is brought in the Etz Chaim (Shaar 35:3): Just as there are tzirim (hinges) and d’latot (doors) to a house, so a woman has tzirim and D’LaTot (Bekhorot 45a). From the two DaLeTs, the shape of a closed- mem is made. This is where the fetus is formed. Study there.
BREATH
וְאַנְחֵהּ בְּרֵישֵׁהּ דְּרֻמְחָא – רֹמַח דָּא רוּחַ מֵ"ם, שֶׁהוּא מֵאַרְבַּע רוּחוֹת בֹּאִי הָרוּחַ, כִּי הַמֵּ"ם הִיא אַרְבַּע רוּחוֹת, שֶׁהִיא בְּחִינַת רוּחַ הַצַּדִּיק דְּנָשֵׁב בְּיָדַיִן וְרַגְלַיִן כַּנַּ"ל, וְרֹאשׁ הָרֹמַח הוּא הַצַּדִּיק, כִּי מִמֶּנּוּ תּוֹצְאוֹת הָרוּחַ, כְּמוֹ שֶׁכָּתוּב: אִישׁ אֲשֶׁר רוּחַ בּוֹ כַּנַּ"ל.
Then he put it on the head of his romach (spear) — RoMaCh is RuaCh Mem (cf. Zohar III, 237a), as in, “Come from the four RuChot (winds), O spirit.” This is because the mem refers to the four winds, which corresponds to the ruach of the tzaddik that “blows in the arms and the legs.” And the head of the romach is the tzaddik from whom the ruach comes, as in, “a man in whom there is <the Lord’s> ruach .”
LIGHT
ויאמר אלהים יהי אור. כתיב בפרשה זו ה' פעמים לשון אור וביום הרביעי כתיב ה' פעמים לשון מאור בתוספת מ״ם ויש בזה כוונה נפלאה וזה כי מצינו לרז״ל שאמרו (חגיגה יב) אור שנברא ביום ראשון נגנז ואיתא למ״ד הן הן המאורות שנבראו ביום ראשון ולא נתלו עד יום רביעי ונראין שני מדרשים אלו כסותרים זה את זה. והאמת אינו כן כי הכל מודים שאור של יום ראשון היה אור גדול ונגנז ואלו המאורות שנתלו ביום ד' אינן עצם האור אלא קבלו אורם מן ניצוץ אור העליון שנברא ביום ראשון לכך הזכיר בו לשון אור כי הוא היה עצם האור, אבל במאורות של יום רביעי הזכיר בכל א' מאור בתוספת מ״ם להורות שקבלו אורם מן אור אחר גדול מהם כהוראת המ״ם, ולפי זה אין המדרשים סותרים זה את זה כי אור הראשון נגנז לד״ה לצדיקים, והמאורות של יום ד' קבלו ניצוץ האור הראשון וא״כ ודאי הן הן המאורות כי החלק כלול בהכל, ובזה מיושב גם כן מה שנברא ונגנז, וזה פירוש יקר.
And the Lord said, "let there be light:" The word, ohr [light], is written five times in this section; and on the fourth day the word, meohr [luminaries] is written five times, with the addition of [the letter] mem [to the word ohr], and there is in this an amazing intention. And that is that since we have found that the Sages, of blessed memory, said (Chagigah 12a), "The light that was created on the first day was hidden" and there is [also] an opinion that says, "these are the very luminaries that were created on the first day and were not 'hung' until the fourth day;" and these two midrashic statements appear to contradict one another. But the truth is not thus, since everyone admits that the light of the first day was a great light and was [then] hidden and that those luminaries that were 'hung' on the fourth day are not the actual light [of the first day], but rather they received their light from a spark of the upper light that was created on the first day; therefore, the word, ohr, is mentioned [on the first day], since it was the actual light; but with luminaries on the fourth day, each one is mentioned as meohr, with the addition of [the letter] mem, to show that they received their light from another light - greater than them - which is what is shown by the [letter] mem [which, when in front of a word, is a prefix that means, 'from']. And according to this, the midrashic statements do not contradict one another; since the first light was hidden - according to everyone - for the righteous, and the luminaries of the fourth day received a spark of the first light; and if so, certainly, 'they are the very luminaries,' since a part [i.e., the luminaries] is included in the whole [i.e., the light created on the first day]. And with this is also resolved [why] they were created [only to be] hidden; and this is a precious explanation.

WRITE

Halachot of writing the letter Mem, according to Mordechai Pinchas haSofer​​​​​​​
1. Its shape is a bit like a chaf and a vav [joined side by side] therefore the top on the right side should be rounded. 2. But at the bottom it should have a corner without a heel 3. and its roof should be equal and not rounded (only rounded on the right side) 4. and also its roof should be as long as the base of the letter below... 5. and one should take care to join the nose on the left side to its roof. 6. Initially it should extend almost evenly with the roof except that there be between them on the upper side [a break] like a small notch. 7. and the shape of the nose should be like a vav standing slightly leaning at an angle but not too much. 8. and it should reach until it is opposite the base below and until . and one should be very careful that it [the nose] does not touch it [the base]. 9. but in all cases there shouldn't be between a huge gap initially such that the vav slopes a great deal because of it. [source: http://www.sofer.co.uk/alefbet]

אם רוצה לעשות מ"ם פתוחה ונמשכה ידו ונסתמה אינו יכול לגרור הדבקות דהוה ליה חק תוכות ועיין בא"ח סי' ל"ב):
If he wanted to form an open Mem [i.e., in a medial position], but his hand continued and he closed it [and it became a final Mem], he may not scratch away that which is stuck together, as that is considered engraving. (See Orach Chaim 32.)

Halachot of writing Mem Sofit, according to Mordechai Pinchas haSofer

1. It should initially be rounded at the top on the right side 2. and below it should have a corner on the right and left so that it shouldn't look like a samech... The Pri Megidim wrote that it is better that it be square on all sides because it easier to err (by making it a) samech. And in all cases it should be closed on all sides. 3. And its roof should pass initially outside of the closed part a little like the head of a vav. One should not lengthen the roof to the left too much... [source: http://www.sofer.co.uk/alefbet]

מם פתוחה מם סתומה מאמר פתוח מאמר סתום

The open mem and closed mem indicate that the Torah contains an open statement, understood by all, and an esoteric statement.

הרב אברהם יצחק הכהן קוק, ראש מילין, מי"ם

מזיגת הענינים המצוירים זה בזה, שטפם הכללי אחר שהוכללו צורותיהם הפרטיות בשטף הכלל הגדול, העתיד לעשות מאמר שלם מהמון נקודות מחשביות, ומפעל ויצירה עולמית מהמון כחות כבירים בודדים אין חקר, כל אלה יגלה לנו המי"ם בביטויו המי"מי. הלימודים מתגלמים התגלמות מחשבתית, חונים איש על דגלו בציוריהם, מתגברים כל אחד בחוגו, בשיטתו ובמהלכי אידיאליו ורזיהם, וכולם הולכים ומתמזגים מזיגה רוחנית לנהר פלגים של שטיפה שכלית רצונית מתאדרת, מקולות מים רבים אדירים משברי ים אדיר במרום ד'. המי"ם בצורתו המכתבית, בציור של הרכבת בי"ת וכ"ף שבחלקו הגדול הראשון הימיני, מורה פעולה חפצית ומחשבתית פועלת ועשירה בכח הכפי שבו, קיבול לרשימות עליונות, המתגלות ע"י המפעלים, מצד הביתיות התחתיתיות שלו, התאחדות המפעל והרישום האצילי של קבלת ההארה השכלית מראש צורים, ע"י שטף החיים ממקור תעצומתם שהוא מתלוה אליהם בצורתו של הוי"ו הסוגר, המתחבר אל החלק היסודי של הכפביתי שלו, אשר באומץ הוייתו הימינית, כולם יחדו יעשו את עז המאמר שימצא פתח לשטף האורה המוסגרה בתוך המפעליות והרישום האצילי לחדור מחוץ לחוג המגביל את הויית המאמר וערכו. ומלמעלה מגע דק וקלוש מחבר את שטף החיים העצמיים אשר יתגלו בתור תוארים צדדיים, הצד השמאלי שבההויה, ויחוברו לעצמיות יסוד המאמר בכבוד גבורתו. ופתיחה עליונה תשאר, שבה תתפרץ אורה עליונה, מהאור הבלתי נמצר החופף על כל הרשום, על כל הנכתב, על כל המתגלם ונכנס בכלל ספר וסיפור. עז גבורת המאמר בהמון ערכיו וצורותיהם, והחיים והמפעל והקיבול הרוחני, יחד בהשלבם עושים הם את המזיגה הרוחנית, הנותנת מקום לשטף, לנהר הולך והומה, לחיים רוחניים, שכליים, רצוניים, בהמון עולמים, שמרוב עזם יוכרו אך בשטף הכללתם, בריבויים ותעצומתם, כחק המים ושיאם.עברית

Rav Kook, Reish Milin, Mem

(translation by R. Joseph Rosenfeld, explained above)

The mixing of the formations together, the general flow after their particular forms have coalesced in the great flow of collectivity, which in the future stands to form al full sentence from amongst many points of thought, as well as the activation and creation of worlds from amongst countless isolated strengths. All of this is revealed to us in the mem and its unique expression. The teachings form in the formation of thought, each positioned according to the flag of their formation. Each one strengthens itself according to its group and its approach, according to the ideality of its process as well as its secrets, with all of them moving and coalescing in a spiritual mixture toward a river of streams, in a flow of magnificent and conceptualized will, mightier than the thunder of the great waters, mightier than the breakers of the sea God on high is mighty. The mem in its written form, the image of the combination of kaf and beit on the larger and more primary right side, shows the willful and thoughtful acitivity that acts in the rich strength of the kaf, and the reception of lofty traces that are disclosed through the activities expressed in the lower beitiyut. The unification between the activity and the noble trace of receiving the light of enlightenment from upon the heights, from the flowing of life from within the source of their strength that accompanies them in the form of the vav that closes, which attaches itself to the essential kaf-beiti part of the letter. In the courageous strength of its right side, they all generate the courage of the sentence, that it may find an opening for the enclosed light to flow within the activities; and for the noble trace to penetrate beyond the circle that limits the creation of the sentence and its value. Above, a weak and delicate touch connects the flow of essential life as it is revealed in the incidental descriptions, the left side of existence, connecting it to the essential foundation of the sentence in the honor of its strength. An elevated opening remains through which the transcendent light breaks though, from the unlimited light that hovers above all inscription, on all that is written, on all that enters and is revealed in the book and the story, the courageous strength of the sentence in its myriad value and form. Life, activity and spiritual receptivity together in their integration generate the spiritual balance that gives space to the flow, to the river that moves and rumbles toward spiritual, enlightened and willful life throughout the worlds, which due to their extreme courage may only be recognized in the general flow of their multiplicity and intensification, like the law of the waters in their strength.