Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:6905[Chain 1] Abū ʿAbdullāh al-Ḥāfiẓ > Abū al-ʿAbbās Muḥammad b. Aḥmad al-Maḥbūbī Bimurw > Saʿīd b. Masʿūd > Yazīd b. Hārūn > Muḥammad b. Isḥāq [Chain 2] Abū Ṭāhir al-Faqīh > Abū Bakr Muḥammad b. al-Ḥusayn al-Qaṭṭān > Abū al-Azhar > Wahbb. Jarīr from my father > Muḥammad b. Isḥāq > Yazīd b. Abū Ḥabīb > Marthad b. ʿAbdullāh > Mālik b. Hubayrah > Qāl Rasūl Allāh Ṣallá

[Machine] The Messenger of Allah, ﷺ , said: "Three rows of Muslims praying for a deceased Muslim, seeking forgiveness for him, is obligatory, so when Malik prayed for a deceased person, his family would say to them: 'Arrange yourselves in three rows and then pray upon him.' This is the wording of the hadith of Jarir ibn Hazim, and in another narration by Yazid ibn Harun: 'So that he may be forgiven.'"  

البيهقي:٦٩٠٥أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ أنبأ أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ أَحْمَدَ الْمَحْبُوبِيُّ بِمُرْوٍ ثنا سَعِيدُ بْنُ مَسْعُودٍ ثنا يَزِيدُ بْنُ هَارُونَ ثنا مُحَمَّدُ بْنُ إِسْحَاقَ ح وَأَخْبَرَنَا أَبُو طَاهِرٍ الْفَقِيهُ أنبأ أَبُو بَكْرٍ مُحَمَّدُ بْنُ الْحُسَيْنِ الْقَطَّانُ ثنا أَبُو الْأَزْهَرِ ثنا وَهْبُ بْنُ جَرِيرٍ ثنا أَبِي قَالَ سَمِعْتُ مُحَمَّدَ بْنَ إِسْحَاقَ عَنْ يَزِيدَ بْنِ أَبِي حَبِيبٍ عَنْ مَرْثَدِ بْنِ عَبْدِ اللهِ عَنْ مَالِكِ بْنِ هُبَيْرَةَ قَالَ

قَالَ رَسُولُ اللهِ ﷺمَا صَلَّى ثَلَاثَةُ صُفُوفٍ مِنَ الْمُسْلِمِينَ عَلَى رَجُلٍ مُسْلِمٍ يَسْتَغْفِرُونَ لَهُ إِلَّا أَوْجَبَ فَكَانَ مَالِكٌ إِذَا صَلَّى عَلَى جِنَازَةٍ يَعْنِي فَتَقَالَ أَهْلَهَا صَفَّهُمْ صُفُوفًا ثَلَاثَةً ثُمَّ يُصَلِّي عَلَيْهَا لَفْظُ حَدِيثِ جَرِيرِ بْنِ حَازِمٍ وَفِي رِوَايَةِ يَزِيدَ بْنِ هَارُونَ إِلَّا غُفِرَ لَهُ