Sayyiduna Abu Hurayrah (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "The imam is appointed only to be followed, so do not differ from him. When he says the takbir, you too say the takbir; when he bows, you too bow; when he says 'Sami'a Allahu liman hamidah' (Allah hears the one who praises Him), you say 'Allahumma Rabbana lakal-hamd' (O Allah, our Lord, to You belongs all praise); when he prostrates, you too prostrate; and when he prays sitting, you too pray sitting."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5072