How many ways can we put 3 math books and 5 English books on a shelf if all the math books must stay together and all the English books must also stay together? (The math books are all different and so are the English books.)
The math books can be either to the left or right of the english books. That's 2 choicesWithin the math books there are 3! arrangementsWithin the english books there are 5! arrangementsThe total number of arrangements is thus 2⋅3!⋅5!=1440