The Prophet ﷺ said, "The imam is appointed only to be followed, so do not differ from him. When he bows, bow. When he says, 'Allah hears whoever praises Him,' say, 'Our Lord, to You belongs all praise.' When he prostrates, prostrate. When he prays sitting, then all of you pray sitting. And straighten the rows in prayer, for straightening the rows is part of the excellence of prayer."
حدثنا عبد الله بن محمد قال حدثنا عبد الرزاق قال أخبرنا معمر عن همام بن منبه
عن النبي ﷺ أنه قال إنما جعل الإمام ليؤتم به فلا تختلفوا عليه فإذا ركع فاركعوا وإذا قال سمع الله لمن حمده فقولوا ربنا لك الحمد وإذا سجد فاسجدوا وإذا صلى جالسا فصلوا جلوسا أجمعون وأقيموا الصف في الصلاة فإن إقامة الصف من حسن الصلاة