It wasnarrated that Abu Hurairah said:
"The Messenger of Allah (ﷺ)said: 'The Imam is appointed to be followed. When he says AllahuAkbar, then say Allahu Akbar; when he bows, then bow; when he saysSami' Allahu liman hamidah, then say Rabbana wa lakal-hamd; when heprostrates then prostrate; if he prays standing, then pray standing,and if he prays sitting down then pray sitting down."
English reference: Vol. 1, Book 5, Hadith 1239
Arabic reference: Book 5, Hadith 1297