How to solve this confusing permutation problem related to arrangement of books?

Ms. Jones has 10 books that she is going to put on her bookshelf. Of these, 4 are
mathematics books, 3 are chemistry books, 2 are history books, and 1 is a language
book. Ms. Jones wants to arrange her books so that all the books dealing with the
same subject are together on the shelf. How many different arrangements are

I am completely lost. I know there are 4! 3! 2! 1! arrangements such that the mathematics books are
first in line, then the chemistry books, then the history books, and then the language

But this is not the answer.

Solutions Collecting From Web of "How to solve this confusing permutation problem related to arrangement of books?"

you have already excellent answers so i will try to give you a nice way on how to see the problem.

Suppose that the books of the same category are all in a custody,so we have a custody for math,chemistry,history and language: $4$ custodies in total.

Now the question is: in how many ways can you arrange those 4 custodies?
The answer is clearly $4!$. Now what is left is the number of arrangements of books in the same custody,therefore we have $4!\cdot 3! \cdot 2! \cdot 1!$ and you can do that for every arrangement of the $4$ custodies .,therefore you have finally $4!(4! \cdot 3! \cdot 2! \cdot 1!) $



You treat books of same subject as one object (since they have to be together) so you have $ 4!$ options. And then comes your part in which you permute books of same subject. So the final result is $4!4!3!2!1!$.

You are almost there, but you need to multiply the arrangement for the categories. There are $4$ categories so the final answer should be $4!(4!3!2!1!)$.