Anas bin Malik reported,

The Prophet ﷺ fell from a horse and scraped his right side. We went to visit him, and when the time for prayer came, he led us in prayer while seated, so we prayed behind him seated as well.When he finished the prayer, he said, "The imam is appointed only to be followed. So when he says the takbir, say the takbir. When he prostrates, prostrate. When he rises, rise. When he says, 'Allah hears whoever praises Him,' say, 'Our Lord, to You belongs all praise.' And when he prays seated, then all of you pray seated."

Muslim 921

Sahih

حدثنا يحيى بن يحيى وقتيبة بن سعيد وأبو بكر بن أبي شيبة وعمرو الناقد وزهير بن حرب وأبو كريب جميعا عن سفيان قال أبو بكر حدثنا سفيان بن عيينة عن الزهري قال سمعت

أنس بن مالك يقول

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

مسلم 921صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Prayer
Chapter
Following the imam by the one praying behind him
Numbering
Darussalam 921
Muslim 921