Exegesis
Gesenius1 and Adam Clarke2 interpreted the phrase שִׁיר יְדִידֹת (shir yediot) in Psa. 45:1 as signifying an epithalamium.3 In this epithalamium, the psalmist writes about a bride and a bridegroom; therefore, the object of the psalmist's epithalamium changes a few times throughout the chapter.
First, the psalmist writes concerning the king, i.e. the bridegroom.
רָחַשׁ לִבִּי דָּבָר טֹוב
אֹמֵר אָנִי מַעֲשַׂי לְמֶלֶךְ
לְשֹׁונִי עֵט סֹופֵר מָהִיר
My heart overflowed [with] a good word.
I recite my works for the king.
My tongue is a pen of a ready scribe.
The psalmist ceases his laudation of the king after Psa. 45:9, while noting,
בְּנוֹת מְלָכִים בְּיִקְּרוֹתֶיךָ
נִצְּבָה שֵׁגַל לִימִינְךָ בְּכֶתֶם אוֹפִיר
Kings' daughters were among your dignitaries.
The queen stood at your right hand, with the fine gold of Ofir.
These "kings' daughters" are the daughters of royalty invited to the royal marriage described in this epithalamium. The queen is the bride herself.
From Psa. 45:10-12, the psalmist begins his laudation of the queen (bride).4
In Psa. 45:13, the psalmist is still describing the bride, but he is no longer talking to her in the 2nd person, but the 3rd person. She is referred to as the "king's daughter" (בַת־מֶלֶךְ), yet not the daughter of the king mentioned in vv. 1, 5, or 11. Rather, she, like the king whom she is marrying, is also of royalty.
In Psa. 45:14, the psalmist writes,
לִרְקָמוֹת תּוּבַל לַמֶּלֶךְ
בְּתוּלוֹת אַחֲרֶיהָ רֵעוֹתֶיהָ מוּבָאוֹת לָךְ
She shall be brought to the king in embroidered garments.
The virgins following her, her companions, are introduced to you.
The pronoun "she" in the first clause refers to the bride; she is brought to the king accompanied by her virgins, i.e. her companions. The psalmist then states that the virgins "are introduced to you."
The phrase "to you" is translated from the Hebrew preposition לָךְ (lakh). This is the normal declension referring to a feminine object of the preposition; meaning, the "you" in "to you" should be a female. This would seem to indicate that the virgins are being introduced to the queen/ bride, although they are her companions. Evidently, this interpretation is nonsensical.
Since לָךְ occurs with a sof pasuk underneath it, it can be understood to be the pausal spelling5 of the preposition לְךָ (lekha), which refers to a masculine object of the preposition, i.e. the king/ bridegroom. Thus, the virgins, the companions of the bride, are introduced to the king. This introduction is not for the purpose of marriage, but simply acquaintance, as there is no reason to assume that the king would have been acquainted with the bride's companions at any time prior to the wedding. Likewise, we may assume that the king would have introduced his female dignitaries (Psa. 45:9) to his bride at some point.
Footnotes
1 Wilhelm Gesenius: A Hebrew and English Lexicon of the Old Testament, including the Biblical Chaldee, p. 379, entry on יָדִיד | pdf |
2 Adam Clarke: Commentary on the Bible, Psa. 45 | html |
3 from the Greek word ἐπιθαλάμιον
4 The change of the object of the psalmist's laudation from bridegroom to bride is indicated by 1) the conjugation of verbs in the feminine-gender, 2) the presence of feminine-gendered pronominal suffixes, and 3) context: e.g., v. 10: "O' daughter, listen, and consider, and incline your ear!" v. 11: "And the king shall desire your beauty."
5 Wilhelm Gesenius: A Hebrew and English Lexicon of the Old Testament, including the Biblical Chaldee, p. 499, entry on ל | pdf |. Also, Basics of Biblical Hebrew, 2nd edition, Chapter 36.3, pp. 406-407.