Al-Ilmam bi-Ahadith al-Ahkam 193
وَعَن أبي هُرَيْرَة رَضِيَ اللَّهُ عَنْه، قَالَ: رَسُول الله ﷺ : " إِنَّمَا جُعل الإِمَام ليؤتم بِهِ، فَإِذا كبر فكبروا، وَإِذا ركع فاركعوا، وَإِذا قَالَ: سمع الله لمن حَمده؛ فَقولُوا: رَبنَا وَلَك الْحَمد، وَإِذا سجد فاسجدوا، وَإِذا صَلَّى جَالِسا، فصلوا جُلُوسًا أَجْمَعُونَ ". أخرجه البُخَارِيّ.
From Abu Hurayrah, may Allah be pleased with him, who said: The Messenger of Allah ﷺ [said]: "The imam has been appointed only to be followed. When he says the takbir, say the takbir; when he bows, bow; when he says: 'Allah hears the one who praises Him,' say: 'Our Lord, and to You be praise'; when he prostrates, prostrate; and when he prays sitting, all of you pray sitting." Al-Bukhari reported it.