Concept:"To commit something to memory" is a fixed expression.Solution:It means to learn something so well that you remember it. The preposition is always "to": "commit the formula to memory"."In", "for" and "by" do not form this expression ("by heart" is different: learn it by heart).Answer:Option A (to)