The Messenger of Allah ﷺ said, "The imam is appointed only to be followed, so do not differ with him. When he says the takbir, say the takbir. When he bows, bow. When he says, 'Allah hears the one who praises Him,' say, 'O Allah, our Lord, to You belongs all praise.' When he prostrates, prostrate. And when he prays sitting, all of you pray sitting."
حدثنا قتيبة بن سعيد حدثنا المغيرة يعني الحزامي عن أبي الزناد عن الأعرج
أن رسول الله ﷺ قال إنما الإمام ليؤتم به فلا تختلفوا عليه فإذا كبر فكبروا وإذا ركع فاركعوا وإذا قال سمع الله لمن حمده فقولوا اللهم ربنا لك الحمد وإذا سجد فاسجدوا وإذا صلى جالسا فصلوا جلوسا أجمعون