Rashi on Genesis 1:27
וַיִּבְרָ֨א אֱלֹקִ֤ים ׀ אֶת־הָֽאָדָם֙ בְּצַלְמ֔וֹ בְּצֶ֥לֶם אֱלֹקִ֖ים בָּרָ֣א אֹת֑וֹ זָכָ֥ר וּנְקֵבָ֖ה בָּרָ֥א אֹתָֽם׃

And God created man in His image, in the image of God He created him; male and female He created them.

(א) ויברא אלקים את האדם בצלמו. בִּדְפוּס הֶעָשׂוּי לוֹ, שֶׁהַכֹּל נִבְרָא בְּמַאֲמָר וְהוּא נִבְרָא בַּיָּדַיִם, שֶׁנֶּאֱמַר וַתָּשֶׁת עָלַי כַּפֶּכָה (תהילים קל"ט); נַעֲשָׂה בְחוֹתָם כְּמַטְבֵּעַ הָעֲשׂוּיָה עַל יְדֵי רֹשֶׁם שֶׁקּוֹרִין קוי"ן בלע"ז וְכֵן הוּא אוֹמֵר תִּתְהַפֵּךְ כְּחֹמֶר חוֹתָם (איוב ל"ח):

(1) ויברא אלהים את האדם בצלמו SO GOD CREATED THE MAN IN HIS IMAGE —in the type that was specially made for him, for everything else was created by a creative fiat, whilst he was brought into existence by a creative act (literally, by hand), as it is said (Psalms 139:5) “And Thou hast laid thy hand upon me.” He was made by a seal as a coin that is made by a die that is called in old French coin. It is similarly said, (Job 28:14) “it is changed as clay under the seal” (Sanhedrin 38a).
(ב) בצלם אלקים ברא אותו. פֵּרֵשׁ לְךָ שֶׁאוֹתוֹ צֶלֶם הַמְתֻקָּן לוֹ, צֶלֶם דְּיוֹקַן יוֹצְרוֹ הוּא:

(2) בצלם אלהים ברא אותו IN THE IMAGE OF GOD CREATED HE HIM — It explains to you that the form prepared for him was the form of the image of his Creator.

(ג) זכר ונקבה ברא אותם. וּלְהַלָּן הוּא אוֹמֵר וַיִּקַּח אַחַת מִצַּלְעֹתָיו וגו' (בראשית ב')? מִדְרַשׁ אַגָּדָה שֶׁבְּרָאוֹ שְׁנֵי פַרְצוּפִים בִּבְרִיאָה רִאשׁוֹנָה, וְאַחַר כָּךְ חֲלָקוֹ. וּפְשׁוּטוֹ שֶׁל מִקְרָא, כָּאן הוֹדִיעֲךָ שֶׁנִּבְרְאוּ שְׁנֵיהֶם בַּשִּׁשִּׁי וְלֹא פֵי' לְךָ כֵּיצַד בְּרִיָּתָן, וּפֵרֵשׁ לְךָ בְּמָקוֹם אַחֵר:

(3) זכר ונקבה ברא אותם MALE AND FEMALE CREATED HE THEM — And further on (Genesis 2:21) it is said: “and He took one of his ribs etc.” (The two passages appear to be contradictory.) But according to a Midrashic explanation, He created him at first with two faces, and afterwards He divided him. But the real sense of the verse is: here it tells you that both of them were created on the sixth day, but it does not explain to you how their creation took place; this it explains to you in another place (Genesis Rabbah 8:1 and see Eruvin 18a) .