Rabbi Yehudah ben Simon says: from the very beginning of the world's creation the Holy One, blessed be He, is the One who 'reveals the deep and hidden things.' Scripture says, 'In the beginning God created the heavens' (Genesis 1:1), but it did not explain how. And where did it explain? Further on, as it is said, 'He who stretches out the heavens like a thin curtain' (Isaiah 40:22). 'And the earth' it did not explain; and where did it explain? Further on, as it is said, 'For to the snow He says, Become earth' (Job 37:6). 'And God said, Let there be light' (Genesis 1:3) it did not explain; and where did it explain? Further on, as it is said, 'He wraps Himself in light as in a garment' (Psalms 104:2). The Rabbis say: a creature of flesh and blood builds a structure; when the building succeeds in his hand he widens it as it rises, and if not, he widens it below and narrows it above. But the Holy One, blessed be He, is not so. Rather, 'the heavens' means the heavens that arose in His thought, and 'the earth' means the earth that arose in His thought. Rabbi Huna in the name of Rabbi Eliezer in the name of Rabbi Yose the Galilean says: even those of which it is written, 'For behold, I create new heavens and a new earth' (Isaiah 65:17), are already created since the six days of creation. This is what is written, 'For just as the new heavens' (Isaiah 66:22); it does not write here 'just as new heavens,' but 'the new heavens' [the definite article showing they already exist]. Heavens (shamayim): fire (esh) and water (mayim) the Holy One, blessed be He, took and mingled them one with the other, and from them the heavens were made.
How the Creator Spoke the Heavens and the Earth Into Being
Yalkut Shimoni on Torah 3:4
רַבִּי יְהוּדָה בֶּן סִימוֹן אוֹמֵר, מִתְּחִלַּת בְּרִיָּתוֹ שֶׁל עוֹלָם הוּא "גָּלֵא עֲמִיקָתָא וּמְסַתְּרָתָא" "בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם", וְלֹא פֵּרַשׁ וְהֵיכָן פֵּרַשׁ, לְהַלָּן שֶׁנֶּאֱמַר (ישעיה מ, כב) "הַנּוֹטֶה כַדֹּק שָׁמַיִם" "וְאֵת הָאָרֶץ", וְלֹא פֵּרַשׁ וְהֵיכָן פֵּרַשׁ, לְהַלָּן, שֶׁנֶּאֱמַר (איוב לז, ו) "כִּי לַשֶּׁלֶג יֹאמַר הֱוֵא אָרֶץ" (להלן פסוק ג) "וַיֹּאמֶר אֱלֹהִים יְהִי אוֹר", וְלֹא פֵּרַשׁ וְהֵיכָן פֵּרַשׁ, לְהַלָּן, שֶׁנֶּאֱמַר "עֹטֶה אוֹר כַּשַׂלְמָה". רַבָּנָן אָמְרִין, בָּשָׂר וָדָם בּוֹנֶה בִּנְיָן, בְּשָׁעָה שֶׁהַבִּנְיָן עוֹלֶה בְּיָדוֹ הוּא מַרְחִיב וְעוֹלֶה וְאִם לָאו הוּא מַרְחִיב מִלְּמַטָּה וּמֵצֵר מִלְּמַעְלָה. אֲבָל הַקָּדוֹשׁ בָּרוּךְ הוּא אֵינוֹ כֵן, אֶלָּא "אֵת הַשָּׁמַיִם", הַשָּׁמַיִם שֶׁעָלָה בַּמַּחֲשָׁבָה "וְאֵת הָאָרֶץ", הָאָרֶץ שֶׁעָלְתָה בַּמַּחֲשָׁבָה. רַבִּי הוּנָא בְּשֵׁם רַבִּי אֱלִיעֶזֶר בְּשֵׁם שֶׁל רַבִּי יוֹסֵי הַגְּלִילִי אוֹמֵר, אֲפִלּוּ אוֹתָן שֶׁכָּתוּב בָּהֶן (ישעיה סה, יז) "כִּי הִנְנִי בוֹרֵא שָׁמַיִם חֲדָשִׁים וָאָרֶץ חֲדָשָׁה", כְּבָר הֵם בְּרוּאִים מִשֵּׁשֶׁת יְמֵי בְּרֵאשִׁית, הֲדָא הוּא דִּכְתִיב "כִּי כַאֲשֶׁר הַשָּׁמַיִם הַחֲדָשִׁים" "כִּי כַאֲשֶׁר שָׁמַיִם חֲדָשִׁים" אֵין כְּתִיב כָּאן, אֶלָּא "הַחֲדָשִׁים". שָׁמַיִם, אֵשׁ וּמַיִם נְטָלָן הַקָּדוֹשׁ בָּרוּךְ הוּא וּפְתָכָן זֶה בָּזֶה, וּמֵהֶן נַעֲשׂוּ שָׁמַיִם.