A king's simple inquiry about an unknown woman uncovers a complex web of family connections, legal standing, and spiritual destiny. Seeking to learn her identity, David sends messengers to the woman's household to gather information [מצודת דוד, רד״ק, ביאור שטיינזלץ]. The primary approach among commentators is that a messenger returns to inform the king that she is both the daughter and the wife of elite warriors in his own army [ביאור שטיינזלץ]. However, another perspective suggests that David himself speaks in a state of wonder. Guided by the Holy Spirit, he recognized that Bathsheba was his destined soulmate, and he was deeply astonished to find her married to another man [אלשיך]. Her husband, Uriah the Hittite, was either a righteous convert or a Jewish man who earned this title after living among the Hittite people [רד״ק].
The revelation of Bathsheba's identity raises a monumental question regarding David's actions. How could he commit the severe sin of taking a married woman, and how could God later accept his prayers, allow their marriage, and choose their descendants for the royal line? To resolve this, commentators agree that Bathsheba was not fully married at that specific time. It was a widespread practice that every soldier going out to David's wars would write a conditional bill of divorce for his wife [אלשיך, מלבי״ם]. This regulation was designed to prevent women from being left in permanent legal limbo if their husbands were killed in battle and buried hastily without formal identification.
With this background, David's inquiry was actually an attempt to determine if she was legally available. When he heard she was the daughter of Eliam, he immediately understood her status. Eliam was the son of Ahithophel, David's top advisor, who was likely the architect of this very divorce regulation for the army. David safely assumed that Ahithophel would have made absolutely certain that his own granddaughter held a divorce document. Knowing she possessed this conditional divorce, David planned to keep Uriah at the battlefront. By ensuring Uriah did not return home, the condition of the document would be fulfilled retroactively, rendering Bathsheba a completely unmarried woman all along [מלבי״ם].