حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَعَلِيُّ بْنُ مُحَمَّدٍ، قَالاَ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ نُمَيْرٍ، عَنْ مُحَمَّدِ بْنِ إِسْحَاقَ، عَنْ يَزِيدَ بْنِ أَبِي حَبِيبٍ، عَنْ مَرْثَدِ بْنِ عَبْدِ اللَّهِ الْيَزَنِيِّ، عَنْ مَالِكِ بْنِ هُبَيْرَةَ الشَّامِيِّ، - وَكَانَتْ لَهُ صُحْبَةٌ - قَالَ كَانَ إِذَا أُتِيَ بِجِنَازَةٍ فَتَقَالَّ مَنْ تَبِعَهَا جَزَّأَهُمْ ثَلاَثَةَ صُفُوفٍ ثُمَّ صَلَّى عَلَيْهَا وَقَالَ إِنَّ رَسُولَ اللَّهِ ـ صلى الله عليه وسلم ـ قَالَ ‏"‏ مَا صَفَّ صُفُوفٌ ثَلاَثَةٌ مِنَ الْمُسْلِمِينَ عَلَى مَيِّتٍ إِلاَّ أَوْجَبَ ‏"‏ ‏.‏

Malikbin Hubairah Ash-Shami, who was a Companion of the Prophet(PBUH),said: “If a funeral procession was brought and the number ofpeoplewho followed it was considered to be small, they would beorganizedinto three rows, then the funeral prayer would be offered.”Hesaid: “The Messenger of Allah (PBUH) said: ‘No three rows ofMuslimsoffer the funeral prayer for one who has died, but he will beguaranteed (Paradise).’” Translation Not Available

Book Ref: Sunan Ibn Majah Book 6 Hadith 1490
Web Ref:  Sunan Ibn Majah Vol 1 Book 6 Hadith 1490