“a woman came to him.” John 12:3 identifies this woman as Mary, the sister of Lazarus and Martha (see commentary on John 12:3). This record of Mary pouring the oil on Jesus occurs in Matthew 26:6-13; Mark 14:3-9; and John 12:1-8, it is not included in Luke.
[For more information on this anointing and the controversy it stirred up, see commentary on John 12:3.]
“perfume.” The Greek word is muron (#3464 μύρον), and it is a general term for perfume, ointment, perfumed oil, or even a sweet-smelling substance. In the New Testament, the emphasis is on the way it smells, and thus “perfume” seems to be the best translation. It is not an “ointment,” per se, because that implies it would be being used for healing. Also, what Mary put on Jesus was likely not oily, so “perfumed oil” is perhaps not the best translation.
“poured it on his head.” The anointing of Jesus occurred in the house of Simon the Leper (Matt. 26:6; Mark 14:3), which is why John specifically says Martha was serving. If the supper occurred at the house of Mary and Martha that would never be stated because it would be obvious and expected.
At first glance, there seems to be a contradiction between Matthew, Mark, and John, because Matthew and Mark say the ointment was poured on Jesus’ head, while John says the feet. The key is to realize that a flask of oil worth a year’s salary would be quite large, and covered both his head and feet. That is why Jesus said that the woman “poured this perfume on my body” (Matt. 26:12).