Abu Hurayrah, rahimahullah, reported that Allah's Messenger, sallallahu 'alayhi wa sallam, said:
"When a human being dies, all of his deeds are terminated except for three types: an ongoing sadaqah, a knowledge (of Islam) from which others benefit, and a righteous child who makes du'a for him."
Muslim and others
Abu Qatadah, rahimahullah, reported that Allah's Messenger, sallallahu 'alayhi wa sallam, said:
"The best that a man can leave behind after his death are three things: a righteous child who makes du'a for him, an ongoing sadaqah whose rewards continue to reach him, and a knowledge that continues to be implemented after him."
Ibn Majah, and others. Verified to be sahih by Al-Mundhiri and Al-Albani
Abu Qatadah, rahimahullah, reported that Allah's Messenger, sallallahu 'alayhi wa sallam, said:
"Among the good deeds that continue to benefit a believer after death are: a knowledge that he taught and disseminated, a righteous child who lived after him, a Qur'an book that he left as inheritance a masjid that he built, a house that he built for the two wayfarers, a stream that he ran, or a charity that he gave from his wealth during his healthy lifetime so that it would reach him (in rewards) after death."
Ibn Majah and others. Verified hasan by Al-Mundhiri and Al-Albani
Commenting on this, Al-Mundhiri, rahimahullah, said:
"Some scholars say that the deeds of a human being end with his death. However, since he had caused these things (which are mentioned in the above ahadith), such as the earning of a child, disseminating the knowledge among those who take it from him, compiling a book that remains after him, or establishing a sadaqah, the rewards of these things continue to reach him as long as they continue to exist."
'Awn al-Ma'bud, 8:86
The reason that one continues to receive rewards for these deeds even though they are done by other people, is that he had initiated them during his life or contributed to them to a certain degree, whether little or large. Since Allah does not neglect an atom's weight of deeds, He records these contribution for a person even after his death. Abu al-Wafa' ibn 'Aqil said:
"The best explanation for this in my view is that a human being, by his efforts and good conduct, had earned friends, produced children, married spouses, done good, and was amiable to the people. Because of this, they invoke mercy for him and do good on his behalf. All of this is then a result of his own earning."
Ar-Ruh, Ibn Al-Qayyim, p.171
80 Pages
A5
P/B