Sahih al-Bukhari 734
Sahih al-Bukhari · Book 10: Call to Prayers (Adhaan) · The necessity of saying the Takbir, i.e., Allahu Akbar (Allah is the Most Great) and the commencement of As-Salat (the prayer)
Narrated Abu Huraira:
حَدَّثَنَا أَبُو الْيَمَانِ ، قَالَ أَخْبَرَنَا شُعَيْبٌ ، قَالَ حَدَّثَنِي أَبُو الزِّنَادِ ، عَنِ الأَعْرَجِ ، عَنْ أَبِي هُرَيْرَةَ ، قَالَ قَالَ النَّبِيُّ صلى الله عليه وسلم " إِنَّمَا جُعِلَ الإِمَامُ لِيُؤْتَمَّ بِهِ، فَإِذَا كَبَّرَ فَكَبِّرُوا، وَإِذَا رَكَعَ فَارْكَعُوا، وَإِذَا قَالَ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ. فَقُولُوا رَبَّنَا وَلَكَ الْحَمْدُ. وَإِذَا سَجَدَ فَاسْجُدُوا، وَإِذَا صَلَّى جَالِسًا فَصَلُّوا جُلُوسًا أَجْمَعُونَ " .
The Prophet (ﷺ) said, "The Imam is to be followed. Say the Takbir when he says it; bow if he bows; if he says 'Sami`a l-lahu liman hamidah', say, ' Rabbana wa laka l-hamd', prostrate if he prostrates and pray sitting altogether if he prays sitting."