Okay, so I need to figure out how many ways I can stack 6 different books on a shelf where the 2 math books aren't next to each other. Let me start by understanding the problem. There are 6 books in total, 2 of them are math books, and the rest are different. The key here is that the math books shouldn't be adjacent. 

First, maybe I should calculate the total number of ways to stack all 6 books without any restrictions. Since all the books are different, the total permutations would be 6 factorial, which is 6! = 720. That's straightforward. 

But now, I need to subtract the number of arrangements where the two math books are next to each other. This is a common strategy in combinatorics: total number minus the number of unwanted cases. 

So, how do I find the number of arrangements where the two math books are adjacent? Well, if I consider the two math books as a single unit or "block," then instead of having 6 separate books, I have 5 items to arrange: the math block and the other 4 books. The number of ways to arrange these 5 items is 5! = 120. But wait, within the math block, the two math books can be in two different orders: either Math Book A is first and Math Book B is second, or vice versa. So I need to multiply by 2 to account for the permutations within the block. That gives 5! * 2 = 120 * 2 = 240. 

Therefore, the number of arrangements where the math books are next to each other is 240. 

Subtracting that from the total arrangements gives the number of acceptable arrangements: 720 - 240 = 480. 

Let me verify if this makes sense. The total permutations are 720. If considering the two math books as a single entity, we have 5! * 2 = 240. Subtracting gives 480. That seems right. 

Alternatively, another way to approach this could be to first place the non-math books and then insert the math books in the available slots. Let's see if that method gives the same result. 

There are 4 non-math books. The number of ways to arrange these is 4! = 24. Once they are placed, there are slots between them where the math books can be inserted. Specifically, there are 5 possible slots: one before the first book, one between each pair of books, and one after the last book. So, for example, if the non-math books are A, B, C, D, then the slots are: _ A _ B _ C _ D _. That's 5 slots. 

We need to choose 2 slots out of these 5 to place the math books. The number of ways to choose 2 slots is C(5,2) = 10. Then, for each of these choices, the two math books can be arranged in 2! = 2 ways. Therefore, the total number of acceptable arrangements is 4! * C(5,2) * 2! = 24 * 10 * 2 = 480. 

This matches the previous result. So that's a good confirmation. 

Alternatively, if I had used the inclusion-exclusion principle, but in this case, since the problem is straightforward, both methods work. 

Another sanity check: the probability that the two math books are next to each other is 240 / 720 = 1/3. So the probability that they are not next to each other is 1 - 1/3 = 2/3, which would be 480 / 720 = 2/3. That checks out. 

Therefore, both methods confirm that the answer is 480. I think that's solid. 

**Final Answer**
The number of ways to stack the books without the math books being next to each other is \boxed{480}.
Therefore, the number of ways to stack the books without the math books being next to each other is $\boxed{480}$.
</think>