Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Are there any computer algebra systems with the functionality to allow me to enter in an explicit symmetric polynomial and have it return that polynomial in terms of the elementary symmetric polynomials? Can I do this in sage? How do I do it? Thank you.

share|improve this question
ask.sagemath.org –  Andres Caicedo Feb 13 '12 at 18:56

4 Answers 4

In Maple, it's

convert(..., elsymfun);

For example:


$$\left( x+y+z \right) ^{4}-3\, \left( x+y+z \right) ^{2} \left( xz+xy+ yz \right) -2\, \left( x+y+z \right) ^{2}xyz+ \left( x+y+z \right) \left( xz+xy+yz \right) ^{2}+ \left( x+y+z \right) \left( xz+xy+yz \right) +4\, \left( x+y+z \right) xyz- \left( xz+xy+yz \right) xyz+{x }^{2}{y}^{2}{z}^{2}-xyz $$

share|improve this answer

There is an algorithm (due to Gauss) that is so simple that it can be executed by hand (or easily programmed). It is a special case of Gröbner basis reduction techniques (the first known use of lexicographic order in term rewriting). For details and references see this post.

share|improve this answer

In Sage, if $p$ is the polynomial to convert

Sym = SymmetricFunction(QQ)
e = Sym.elementary()
f = Sym.from_polynomial(p)
share|improve this answer

Mathematica is certainly able to do this, with judicious use of the functions SymmetricReduction[] and SymmetricPolynomial[]. (As already noted in the post linked to by Math Gems, Cox/Little/O'Shea have a description of the algorithm for performing such a reduction.)

To use the same example as Robert:

SymmetricReduction[(x^2 + y + z)(y^2 + x + z)(z^2 + x + y),
                   {x, y, z}, C /@ Range[3]] // First
C[1]^4+C[1] C[2]-3C[1]^2 C[2]+C[1] C[2]^2-C[3]+4C[1] C[3]-
      2C[1]^2 C[3]-C[2] C[3]+C[3]^2

Here, C[1], C[2], C[3] stand-in for $\sigma_1, \sigma_2, \sigma_3$. The First[] is needed to return only the "symmetric part" of the multivariate polynomial, since SymmetricReduction[] is equipped to return both the symmetric part and the remainder of a multivariate polynomial.

If one wants an explicit expression involving only the variables, one can omit the third argument:

SymmetricReduction[(x^2 + y + z) (y^2 + x + z) (z^2 + x + y),
                   {x, y, z}] // First
-x y z + x^2 y^2 z^2 + 4 x y z (x + y + z) - 2 x y z (x + y + z)^2 +
(x + y + z)^4 - x y z(x y + x z + y z) + (x + y + z)(x y + x z + y z) - 
 3 (x + y + z)^2 (x y + x z + y z) + (x + y + z) (x y + x z + y z)^2
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.