Anas bin Malik reported,

He reported that the Messenger of Allah ﷺ fell from a horse and was injured, so he led us in prayer while seated, and we prayed behind him sitting down. When he finished, he said, "The imam is appointed only to be followed. When he says the takbir, say the takbir. When he bows, bow. When he rises, rise. When he says, 'Allah hears whoever praises Him,' say, 'Our Lord, to You belongs all praise.' And when he prostrates, prostrate."

Bukhari 733

Sahih

حدثنا قتيبة بن سعيد قال حدثنا ليث عن ابن شهاب

عن أنس بن مالك

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

البخاري 733صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhan
Chapter
Obligation of takbir and opening the prayer
Numbering
Darussalam 733
Bukhari 733