كتاب الصلاة
4  
The Book of Prayers
(20)
Chapter: The Prohibition Of Preceding The Imam In Saying The Takbir Or Anything Else
(20)
باب النَّهْىِ عَنْ مُبَادَرَةِ الإِمَامِ، بِالتَّكْبِيرِ وَغَيْرِهِ ‏
Sahih Muslim 417

Abu Huraira reported Allah's Messenger (ﷺ) saying:

The Imam is appointed to be followed. So recite takbir when he recites it, and bow down when he bows down and when he utters:" Allah listens to him who praises Him," say" O Allah, our Lord, for Thee be the praise." And when he prays, standing, you should pray standing. And when he prays sitting, all of you should pray sitting.
حَدَّثَنِي أَبُو الطَّاهِرِ، حَدَّثَنَا ابْنُ وَهْبٍ، عَنْ حَيْوَةَ، أَنَّ أَبَا يُونُسَ، مَوْلَى أَبِي هُرَيْرَةَ حَدَّثَهُ قَالَ سَمِعْتُ أَبَا هُرَيْرَةَ، يَقُولُ عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم أَنَّهُ قَالَ ‏ "‏ إِنَّمَا جُعِلَ الإِمَامُ لِيُؤْتَمَّ بِهِ فَإِذَا كَبَّرَ فَكَبِّرُوا وَإِذَا رَكَعَ فَارْكَعُوا وَإِذَا قَالَ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ ‏.‏ فَقُولُوا اللَّهُمَّ رَبَّنَا لَكَ الْحَمْدُ ‏.‏ وَإِذَا صَلَّى قَائِمًا فَصَلُّوا قِيَامًا وَإِذَا صَلَّى قَاعِدًا فَصَلُّوا قُعُودًا أَجْمَعُونَ ‏"‏ ‏.‏
Reference : Sahih Muslim 417
In-book reference : Book 4, Hadith 97
USC-MSA web (English) reference : Book 4, Hadith 831
  (deprecated numbering scheme)