I have $5$ different mathematics textbooks and $4$ different psychology textbooks. In how many ways can I place the $9$ textbooks on a bookshelf, in a row, if all the psychology textbooks must be together, and all the mathematics textbooks must be together?
Between the 5 different mathematics textbooks, there is 5! ways to order them.
Between the 4 different psychology textbooks, there is 4! ways to order them.
Treating each of these as a group, we can order the group of of mathematics textbooks, and psychology textbooks in \(\frac{2!}{1!1!}\) = 2 different ways. (this is because either the group of mathematics textbooks can be first, or the group of psychology textbooks can be first).
There are 5!*4!*2 = 5760 different ways to order the textbooks.