Abu Hurairah reported,

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."

Muslim 930

Sahih

حدثنا قتيبة بن سعيد حدثنا المغيرة يعني الحزامي عن أبي الزناد عن الأعرج

عن أبي هريرة

أن رسول الله ﷺ قال إنما الإمام ليؤتم به فلا تختلفوا عليه فإذا كبر فكبروا وإذا ركع فاركعوا وإذا قال سمع الله لمن حمده فقولوا اللهم ربنا لك الحمد وإذا سجد فاسجدوا وإذا صلى جالسا فصلوا جلوسا أجمعون

مسلم 930صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Prayer
Chapter
Following the imam by the one praying behind him
Numbering
Darussalam 930
Muslim 930