Say we have a list

l = {4x,3y,z}

When we do


we get, as expected


Is there a function, call it F, that takes multiplicities into account, so for example for l



or equivalently a function that extracts multiplicities of each element in a list?

  • 3
    $\begingroup$ Your example is probably too simplistic to really represent what you want. For example, F = Coefficient[#, {x, y, z}] & works just fine. Is this what you want? Is there a more complex example where this does not work? $\endgroup$ May 29, 2019 at 17:00

1 Answer 1


You could use FactorTermsList:

First @* FactorTermsList /@ {4 x, 3 y, z}

{4, 3, 1}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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