I was trying to multiply some matrices using wolframalpha when I found that the results didn't match up. Specifically, matrix expression like $CX^2C^{-1}$ produced different result than $CXC^{-1}CXC^{-1}$, although these should be the same. I found that this happens because wolframalpha calculates the product differently based on how the parentheses are placed. Here are two examples:
({{1,1},{-1,0}}*{{2,1},{1,2}}*{{1,1},{-1,0}}^-1)*{{1,1},{-1,0}}*{{2,1},{1,2}}*{{1,1},{-1,0}}^-1
{{1,1},{-1,0}}*{{2,1},{1,2}}*{{1,1},{-1,0}}^-1*{{1,1},{-1,0}}*{{2,1},{1,2}}*{{1,1},{-1,0}}^-1
Is there an adequate reason for this or is it a bug?


As it was mentioned in a comment, you are missing a dot in the first expression. When you don't use the dot (or use *) Wolfram will compute the product as $$ (A*B)_{ij} = a_{ij} b_{ij}$$ when you really wanted it to compute $$(A.B)_{ij} = \sum_{k=1}^n a_{ik} b_{kj}$$
In the second expression, you always use "*", so you are not computing what you expect.
Also consider that, even though this does not seem to be a problem for wolframalpha, in Wolfram Mathematica $\texttt{A^(-1)}$ does not represent the inverse... you must use $\texttt{Inverse[A]}$.
This post was probably a better fit for http://mathematica.stackexchenge.com