Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
    
Closely related: How to keep Collect result in order?. –  Artes Jan 13 at 21:59
    
    
Just to elaborate on Artes' answer, you can do something like this: Collect[2*a^3*(a + 2 b)^2, a] –  Vincent Tjeng Jan 14 at 16:59
    
@Artes thanks. It looks like my problem was that I was using Collect[MatrixForm ... instead of MatrixForm[Collect ... Somehow the first one does not work but the second one does! –  Maesumi Jan 14 at 18:00
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.