Why is the mezuzah affixed diagonally?
(ה) וְאָ֣הַבְתָּ֔ אֵ֖ת יְהֹוָ֣ה אֱלֹהֶ֑יךָ בְּכׇל־לְבָבְךָ֥ וּבְכׇל־נַפְשְׁךָ֖ וּבְכׇל־מְאֹדֶֽךָ׃ (ו) וְהָי֞וּ הַדְּבָרִ֣ים הָאֵ֗לֶּה אֲשֶׁ֨ר אָנֹכִ֧י מְצַוְּךָ֛ הַיּ֖וֹם עַל־לְבָבֶֽךָ׃ (ז) וְשִׁנַּנְתָּ֣ם לְבָנֶ֔יךָ וְדִבַּרְתָּ֖ בָּ֑ם בְּשִׁבְתְּךָ֤ בְּבֵיתֶ֙ךָ֙ וּבְלֶכְתְּךָ֣ בַדֶּ֔רֶךְ וּֽבְשׇׁכְבְּךָ֖ וּבְקוּמֶֽךָ׃ (ח) וּקְשַׁרְתָּ֥ם לְא֖וֹת עַל־יָדֶ֑ךָ וְהָי֥וּ לְטֹטָפֹ֖ת בֵּ֥ין עֵינֶֽיךָ׃ (ט) וּכְתַבְתָּ֛ם עַל־מְזֻז֥וֹת בֵּיתֶ֖ךָ וּבִשְׁעָרֶֽיךָ׃ {ס}
(5) You shall love your God יהוה with all your heart and with all your soul and with all your might. (6) Take to heart these instructions with which I charge you this day. (7) Impress them upon your children. Recite them when you stay at home and when you are away, when you lie down and when you get up. (8) Bind them as a sign on your hand and let them serve as a symbol between your eyes. (9) Inscribe them on the doorposts of your house and on your gates.
ואמר רב יהודה אמר שמואל במזוזה הלך אחר היכר ציר מאי היכר ציר אמר רב אדא אבקתא היכי דמי כגון פיתחא דבין תרי בתי בין בי גברי לבי נשי ריש גלותא בנא ביתא אמר ליה לרב נחמן קבע לי מזוזתא א"ר נחמן תלי דשי ברישא אמר רב יהודה אמר רב עשאה כמין נגר פסולה איני והא כי אתא רב יצחק בר יוסף אמר כולהו מזוזתא דבי רבי כמין נגר הוו עבידן וההיא פיתחא דעייל ביה רבי לבי מדרשא לא הוה לה מזוזה לא קשיא הא דעבידא כסיכתא הא דעבידא כאיסתוירא
And Rav Yehuda says that Shmuel says: The halakha is that a mezuza must be affixed to the doorpost on its right side, and the right side is determined by the direction from which one enters the room. With regard to a mezuza, when deciding which side is the right side, one should follow the indication of the hinge. The Gemara asks: What is the indication of the hinge? Rav Adda said: The socket into which the hinge is inserted. The room with the socket is considered the inside room, and the mezuza is affixed to the side which is on one’s right when entering that room. The Gemara asks: What are the circumstances, i.e., in what kind of case was this guideline to follow the indication of the hinge necessary? The Gemara answers: This indication is necessary in a case where there is an entrance that is between two houses, e.g., between a room for men and a room for women, as in such a situation the direction of the entrance is unclear. The Gemara relates: The Exilarch built a new house. He said to Rav Naḥman: Affix mezuzot for me in the house. Rav Naḥman said: First erect the doors, so that I can affix the mezuzot in the appropriate places, according to the placement of the hinges. Rav Yehuda says that Rav says: If one fashioned a mezuza like a bolt, i.e., he wedged it into a hole in the doorpost of a gate, or affixed it to the doorpost horizontally, it is unfit. The Gemara raises a difficulty: Is that so? But when Rav Yitzḥak bar Yosef came from Eretz Yisrael to Babylonia, he said: All the mezuzot in the house of Rabbi Yehuda HaNasi were fashioned like a bolt, and he also said: That entrance by which Rabbi Yehuda HaNasi entered the study hall did not have a mezuza. The Gemara answers: This is not difficult. This ruling, that it is unfit, is referring to a case where it is prepared like a peg, i.e., he inserted it deep into the doorpost while it was lying horizontally. That ruling, that it is fit, is referring to a case where it is prepared like an ankle [ke’istevira], i.e., it is vertical.
Excerpt from MyJewishLearning article:
Way back in the 11th century, Rashi, a French rabbi and commentator, opined that when you put up your mezuzah, it should be hung vertically (Rashi and Tosafot on Menahot 33a). But then Rashi’s grandson came along. He’s known as Rabbenu Tam, and he wrote that a mezuzah should be affixed horizontally, because the Ten Commandments and the Torah scrolls were kept horizontally in the ark in the Temple.
A hundred and fifty years later Rabbi Jacob Ben Asher, also sometimes called the Tur, was writing his book of Jewish law, the Arbaah Turim. In it, Ben Asher suggests that the way to hold by the precedents of both Rashi and Rabbenu Tam was to split the difference, and affix your mezuzah at a slant (pointing into the room).
Way back in the 11th century, Rashi, a French rabbi and commentator, opined that when you put up your mezuzah, it should be hung vertically (Rashi and Tosafot on Menahot 33a). But then Rashi’s grandson came along. He’s known as Rabbenu Tam, and he wrote that a mezuzah should be affixed horizontally, because the Ten Commandments and the Torah scrolls were kept horizontally in the ark in the Temple.
A hundred and fifty years later Rabbi Jacob Ben Asher, also sometimes called the Tur, was writing his book of Jewish law, the Arbaah Turim. In it, Ben Asher suggests that the way to hold by the precedents of both Rashi and Rabbenu Tam was to split the difference, and affix your mezuzah at a slant (pointing into the room).
צריכה להיות זקופה ארכה לאורך מזוזת הפתח ויכוין שיהא שמע דהיינו סוף הגלילה לצד חוץ: הגה וכן נהגו (ב"י) אבל י"א שפסולה בזקופה אלא צריכה להיות שכובה ארכה לרוחב מזוזת הפתח (טור והפוסקים בשם ר"ת) והמדקדקים יוצאים ידי שניהם ומניחים אותה בשפוע ובאלכסון (טור והגהות מיימוני ומהרי"ל ות"ה סי' נ"ב) וכן ראוי לנהוג וכן נוהגין במדינות אלו ויכוין שיהא ראש המזוזה דהיינו שמע לצד פנים ושיטה אחרונה לצד חוץ:
The mezuzah should be erect lengthwise on the length of the doorpost of the doorway, and one should intend that the [word] shema that is at the end of the scroll should be [facing] the outside. Rema: And that is how they practice, but there are those who say that [the mezuzah] is invalid erect, rather its length needs to be inclined towards the width of the doorpost of the doorway [that is to say, horizontally]. And those who are scrupulous fulfill both [opinions] and place the mezuzah at an incline, at a diagonal. And this is how it is proper to practice, and this is how we practice in these places, and one should intend that the top of the mezuzah, where the [word] shema is, should be towards the inside and the last line should be facing outside.
