Rabeinu Bachayei Explains the Significance of the Name "ירושלים"
Apropos the passuk: "ומלכי צדק מלך שלם"—Chazal deduced a fascinating fact concerning the name "ירושלים". Here is a pertinent passage from the Midrash (ibid. 56, 10):
Avraham called this place “Yireh,” as it is stated (Bereishis 22, 14): “And Avraham called the name of that site ‘Hashem Yireh.’” But Shem called it “Shaleim,” as it is stated, “And Malkitzedek, King of Shaleim.” HKB”H said, “If I call the place “Yireh,” as Avraham called it, Shem, a righteous man, will have grounds to complain. And if I call it “Shaleim,” Avraham, a righteous man, will have grounds to complain. Instead, I will call it “Yerushalayim,” in accordance with what both of them called it— “Yireh” and “Shalem”—“Yerushalayim.” Rashi points out that the gematria of "ירו" is "יראה".
This Midrash is cited by Tosafos (Ta’anis 15a), and they add the following: "לכך אין אנו נותנין יו"ד בירושלם בין למ"ד למ"ם על שם שלם". In other words, throughout Tanach, we do not find the name "ירושלים" spelled fully with a “yud” (except in five places); instead, it is spelled "ירושלם", without a “yud.” So, why throughout Torah she’b’al peh—in the Gemara and in the Midrashim—and in all of the tefilos, does the name "ירושלים" always appear in its full form with a “yud”?
We find a marvelous explanation in the commentary of Rabeinu Bachayei on parshas Chukas (Bamidbar 19, 13). In reality, the name of the city is "ירושלם"—in the singular. In five places in Tanach, however, it is spelled "ירושלים"—with a “yud”—in the plural. This is similar to the terms for eyes and ears—"עינים" "אזנים"—and the like. This plural form of its name alludes to the fact that Yerushalayim down below on earth is aligned with Yerushalayim above in the heavens. This coincides with the teaching in the Gemara (Ta’anis 5a): "אמר הקב"ה לא אבוא בירושלים של מעלה עד שאבוא לירושלים של מטה. ומי איכא ירושלים למעלה, אין דכתיב ירושלים הבנויה כעיר שחוברה לה יחדיו". HKB”H said, “I will not enter the heavenly Yerushalayim above until I enter the earthly Yerushalayim. Is there a heavenly Yerushalayim? Yes, as it is written (Tehillim 122, 3): “The built-up Yerushalayim will be like the city which is united together (its heavenly and earthly components).”
This teaches us that there are two parts of Yerushalayim which are aligned and connected with each other. The name "ירושלים" spelled fully with a “yud”—in the plural—attests to this fact. After all, the source of the kedushah of the earthly Yerushalayim is the heavenly Yerushalayim. Nevertheless, since the connection between the heavenly Yerushalayim and the earthly Yerushalayim is absent in galus, the letter “yud” of "ירושלים" is omitted throughout Tanach, i.e., it is written in the singular.
We can now combine the explanation of the Midrash with the explanation of Rabeinu Bachayei. The name of the holy city that is the King’s residence is "ירושלם"—Yerushaleim—in the singular, which is a combination of the two names given by Avraham Avinu and Shem—“Yireh” and “Shaleim.” However, since the earthly Yerushalayim is aligned with the heavenly Yerushalayim, the letter “yud” was added to its name making it "ירושלים", in the plural.
This explains beautifully the formula we recite in Shemoneh Esrei: "ולירושלים עירך ברחמים תשוב, ותשכון בתוכה כאשר דברת"—and to Yerushalayim, Your city, may You return with compassion and dwell in her as You have promised. We are urging HKB”H to return to the earthly Yerushalayim first, so that He may subsequently enter the heavenly Yerushalayim as promised. Thus, the city will be named appropriately "ירושלים", in the plural, with the “yud.”