ComponentExpand[expr]
expands out array variables in expr in terms of indexed components.
ComponentExpand[expr,assum]
specifies dimensionality of variables using assumptions assum.
ComponentExpand
ComponentExpand[expr]
expands out array variables in expr in terms of indexed components.
ComponentExpand[expr,assum]
specifies dimensionality of variables using assumptions assum.
Details and Options
- ComponentExpand can be used for rewriting symbolic array expressions in terms of indexed components.
- ComponentExpand returns the component-wise expression for a symbolic array expression.
- Array variables may be specified using VectorSymbol, MatrixSymbol, ArraySymbol or through assumptions.
- Assumptions should consist of domain specifications Element[a,dom], where dom may be Vectors[d], Matrices[{d1,d2}], Arrays[{d1,…,dk}] or a region.
- Array variables need to have explicit integer dimensions to be expanded.
- ComponentExpand replaces special symbolic arrays with explicit arrays and replaces vector inequalities with scalar inequalities.
- ComponentExpand has the option Assumptions, specifying default assumptions to be appended to assum.
- The default setting for the Assumptions option is $Assumptions.
- You can specify default assumptions for ComponentExpand using Assuming.
Examples
open all close allBasic Examples (3)
Scope (5)
Array variables specified through ArraySymbol, MatrixSymbol and VectorSymbol:
ComponentExpand[ArraySymbol["a", {2, 2, 2}]]ComponentExpand[MatrixSymbol["m", {2, 3}]]ComponentExpand[VectorSymbol["v", {4}]]Array variables specified through assumptions:
ComponentExpand[a, Element[a, Arrays[{2, 2, 2}]]]ComponentExpand[m, Element[m, Matrices[{2, 3}]]]ComponentExpand[v, Element[v, Vectors[4]]]Expressions involving array variables:
ComponentExpand[Tr[ArraySymbol["a", {3, 3, 3}]]]ComponentExpand[Inverse[m], Element[m, Matrices[{2, 2}]]]ComponentExpand[Mean[VectorSymbol["v", 3]]]ComponentExpand[VectorGreater[{u, v, w}], Element[u | v | w, Vectors[3]]]You can expand inequalities with explicit vectors:
ComponentExpand[VectorLess[{{x, y}, {1, 2}}]]ComponentExpand[SymbolicIdentityArray[{2, 2}]]ComponentExpand[SymbolicOnesArray[{2, 2}].MatrixSymbol["m", {2, 2}]]Options (1)
Assumptions (1)
Use the assumptions argument to specify the dimensionality of v:
ComponentExpand[v.v, Element[v, Vectors[3]]]Use the Assumptions option:
ComponentExpand[v.v, Assumptions -> Element[v, Vectors[3]]]Use Assuming to specify default assumptions:
Assuming[Element[v, Vectors[3]], ComponentExpand[v.v]]Related Guides
History
Text
Wolfram Research (2025), ComponentExpand, Wolfram Language function, https://reference.wolfram.com/language/ref/ComponentExpand.html.
CMS
Wolfram Language. 2025. "ComponentExpand." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ComponentExpand.html.
APA
Wolfram Language. (2025). ComponentExpand. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ComponentExpand.html
BibTeX
@misc{reference.wolfram_2026_componentexpand, author="Wolfram Research", title="{ComponentExpand}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/ComponentExpand.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_componentexpand, organization={Wolfram Research}, title={ComponentExpand}, year={2025}, url={https://reference.wolfram.com/language/ref/ComponentExpand.html}, note=[Accessed: 13-June-2026]}