Sahih Muslim Book 6, Hadith Number 2557.

Chapter : Completing of the fast on behalf of the dead.

Ibn Abbas (Allah be pleased with them) reported: A woman came to the Messenger of Allah (may peace be upon him) and said: Messenger of Allah, my mother has died and there is due from her a fast of vow; should I fast on her behalf? Thereupon he said: You see that if your mother had died in debt, would it not have been paid on her behalf? She said: Yes. He (the Holy Prophet) said: Then observe fast on behalf of your mother.