distributes f over Plus appearing in any of the xi.


distributes over g.


performs the distribution only if the head of expr is f.


  • Distribute effectively implements the distributive law for operators f and g.
  • Distribute explicitly constructs the complete result of a distribution; Expand, on the other hand, builds up results iteratively, simplifying at each stage.
  • Distribute[expr,g,f,gp,fp] gives gp and fp in place of g and f respectively in the result of the distribution. »


open allclose all

Basic Examples  (3)

Apply the distributive law:

Distribute f over Plus:

Distribute f over g:

Scope  (4)

By default, distribute over Plus:

Distribute only a product of sums:

Distributive laws for logical operators:

Apply the distributive law to arbitrary operators:

Generalizations & Extensions  (1)

Distribute f over g to give fp and gp:

Applications  (5)

Expand symbolic matrix and vector expressions:

Apply the distributive law with any operator:

Find the list of all possible combinations of elements:

Generate a powerset:

Find intermediate terms from a direct application of the distributive law:

Properties & Relations  (3)

For pure products, Distribute gives the same results as Expand:

PowerExpand corresponds to distribution over Times:

Outer forms the same combinations of all elements, but in a nested structure:

Possible Issues  (1)

This use of Distribute does not give the expected result:

The reason is that the argument is evaluated first and the product vanishes:

Prevent evaluation of the argument before Distribute sees it:

Neat Examples  (1)

Find all possible sums of sublists of a list:

Wolfram Research (1988), Distribute, Wolfram Language function, https://reference.wolfram.com/language/ref/Distribute.html.


Wolfram Research (1988), Distribute, Wolfram Language function, https://reference.wolfram.com/language/ref/Distribute.html.


@misc{reference.wolfram_2020_distribute, author="Wolfram Research", title="{Distribute}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Distribute.html}", note=[Accessed: 04-March-2021 ]}


@online{reference.wolfram_2020_distribute, organization={Wolfram Research}, title={Distribute}, year={1988}, url={https://reference.wolfram.com/language/ref/Distribute.html}, note=[Accessed: 04-March-2021 ]}


Wolfram Language. 1988. "Distribute." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Distribute.html.


Wolfram Language. (1988). Distribute. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Distribute.html