Muwatta Malik, Book 8, Hadith 12 (USC-MSA)

Yahya related to me from Malik from Afif as-Sahmi that a man from the tribe of Bani Asad asked Abu Ayyub al-Ansari. "Sometimes I pray in my house, and then come to the mosque and find the imam praying. Should I pray with him?" Abu Ayyub said, "Yes, pray with him, for some one who does so has the reward of the group, or the equivalent of the reward of the group."

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ عَفِيفٍ السَّهْمِيِّ، عَنْ رَجُلٍ، مِنْ بَنِي أَسَدٍ أَنَّهُ سَأَلَ أَبَا أَيُّوبَ الأَنْصَارِيَّ فَقَالَ إِنِّي أُصَلِّي فِي بَيْتِي ثُمَّ آتِي الْمَسْجِدَ فَأَجِدُ الإِمَامَ يُصَلِّي أَفَأُصَلِّي مَعَهُ فَقَالَ أَبُو أَيُّوبَ نَعَمْ فَصَلِّ مَعَهُ فَإِنَّ مَنْ صَنَعَ ذَلِكَ فَإِنَّ لَهُ سَهْمَ جَمْعٍ أَوْ مِثْلَ سَهْمِ جَمْعٍ ‏.‏

sunnah.com

also referenced under: Book 8, Hadith 301 (In-Book)