The Messenger of Allah ﷺ said, "The imam is appointed only to be followed. So when he says the takbir, say the takbir. When he bows, bow. When he says, 'Allah hears whoever praises Him,' say, 'O Allah, our Lord, to You belongs all praise.' When he prays standing, pray standing, and when he prays sitting, all of you pray sitting."
حدثني أبو الطاهر حدثنا ابن وهب عن حيوة أن أبا يونس مولى أبي هريرة حدثه قال سمعت
ا عن رسول الله ﷺ أنه قال إنما جعل الإمام ليؤتم به فإذا كبر فكبروا وإذا ركع فاركعوا وإذا قال سمع الله لمن حمده فقولوا اللهم ربنا لك الحمد وإذا صلى قائما فصلوا قياما وإذا صلى قاعدا فصلوا قعودا أجمعون