The commission
The Virgin of the Rocks was commissioned in 1483 by the Confraternity of the Immaculate Conception as part of a large altarpiece for their church, San Francesco in Milan. It wasn't delivered until 1508, and even then it wasn't finished - the angel's hand resting on Christ's back is only sketched in.
The delay in this case was due to an argument over money. Leonardo was promised a set fee, plus a bonus when the painting was finished.
However, the bonus he was offered was so paltry that he angrily sold the work to a private client. (That version is now in the Louvre, Paris.) The confraternity finally managed to patch things up with the artist, and he began work on a second version of the painting, which is now in the National Gallery.
These two angels, which also belong to the Gallery, were made by associates of Leonardo. They were hung on either side of the painting.
Next: Light and shade