[David] said: 'He has certainly wronged you by asking for your ewe to be added to his ewes.'
Muhammad said: The meaning is 'added to his ewes,' but he omitted 'added.' It is called a 'na'jah' (ewe) because it is soft; 'al-na'j' in the language refers to softness, and 'al-na'j' also refers to whiteness in the eye.
'And David realized,' meaning: he knew.
Muhammad said: The meaning of 'realized' is 'became certain,' though it is not a certainty born of direct observation; for direct observation, one only says 'he knew.'
'That We had only tried him' means: We tested him. 'So he sought the forgiveness of his Lord, and fell down bowing,' meaning: prostrating, for forty days, not raising his head except for an obligatory prayer he was performing, or for a necessity he could not avoid, or for food to sustain himself.