is an attribute that can be assigned to a symbol f to indicate that f and f[arg1,arg2,…] should not combine with other list arguments in arithmetic and many other functions that work with lists.
NonThreadable
is an attribute that can be assigned to a symbol f to indicate that f and f[arg1,arg2,…] should not combine with other list arguments in arithmetic and many other functions that work with lists.
Details
- The NonThreadable attribute is typically used for symbols that represent non-scalar quantities.
- VectorSymbol, MatrixSymbol and ArraySymbol have the NonThreadable attribute.
- Most standard built‐in functions that produce array results have the NonThreadable attribute.
- Expressions whose heads are non-threadable objects are non-threadable.
- Expressions obtained by applying Listable functions to non-threadable objects are non-threadable.
Examples
open all close allBasic Examples (1)
Give the NonThreadable attribute to symbol x:
SetAttributes[x, NonThreadable]Arithmetic operations do not combine x with list elements:
x + y + {{1, 2}, {3, 4}}Expressions with non-threadable heads are non-threadable:
x[1]y[2]{1, 2, 3}Expressions obtained by applying Listable functions to non-threadable objects are non-threadable:
Cos[x[1, 2]] + Cos[y[1, 2]] + {1, 2, 3}Scope (4)
ArraySymbol has the NonThreadable attribute:
Attributes[ArraySymbol]Arithmetic operations do not combine symbolic arrays with list elements:
ArraySymbol["a", {p, q, r}] + {1, 2, 3}SymbolicOnesArray has the NonThreadable attribute:
Attributes[SymbolicOnesArray]A symbolic
matrix of ones is not added to matrix elements:
SymbolicOnesArray[{2, 2}] + {{1, 2}, {3, 4}}When the symbolic matrix is converted to an explicit matrix, the matrices are added correctly:
Normal[%]Inverse has the NonThreadable attribute:
Attributes[Inverse]Arithmetic operations do not combine expressions with head Inverse with list elements:
Inverse[a] + {{1, 2}, {3, 4}}Dot does not have the NonThreadable attribute:
Attributes[Dot]Expressions with head Dot are threadable, unless they are known to be nonscalars:
x.y + {1, 2}VectorSymbol["u", n].VectorSymbol["v", n] + {1, 2}MatrixSymbol["a", {n, n}].VectorSymbol["v", n] + {1, 2}See Also
Related Guides
History
Text
Wolfram Research (2024), NonThreadable, Wolfram Language function, https://reference.wolfram.com/language/ref/NonThreadable.html.
CMS
Wolfram Language. 2024. "NonThreadable." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NonThreadable.html.
APA
Wolfram Language. (2024). NonThreadable. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NonThreadable.html
BibTeX
@misc{reference.wolfram_2026_nonthreadable, author="Wolfram Research", title="{NonThreadable}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/NonThreadable.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_nonthreadable, organization={Wolfram Research}, title={NonThreadable}, year={2024}, url={https://reference.wolfram.com/language/ref/NonThreadable.html}, note=[Accessed: 13-June-2026]}