A symbolic matrix with two parameters, say $x,y$, shows up in my calculation. The entries of the matrix are homogeneous polynomials. I want the entries to be written in some standard format, e.g. in ascending power of say $x$ and descending powers of $y$, or vice versa. But Mathematica insists on factoring some of them. How do you force Mathematica to expand expressions such as $ab^2(a^2-b^2)$ or $a(a^2-b^2)^2$ that occur inside a matrix?