Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • System Modeler

    Multidomain modeling and simulation of complex systems

  • Compute ServicesUse with Mathematica and Wolfram|One
  • AI AccessUse with Mathematica and Wolfram|One
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Wolfram|Alpha

  • Wolfram|Alpha Website
  • Wolfram|Alpha APIs

AI Products

  • Wolfram AI Ecosystem
  • Wolfram Foundation Tool
  • Wolfram Cloud MCP
  • Wolfram Local MCP
  • Agent One API
  • CAG Component APIs

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • Linguistic Understanding

Additional Deployment Options

  • Wolfram Cloud
  • Wolfram Web Engine
  • wolframscript
  • WSTPServer
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

Wolfram Consulting

Data Science, Finance & Business

  • Artificial Intelligence
  • Data Science
  • Healthcare
  • Real Estate

Engineering

  • Civil Engineering
  • Automotive Engineering
  • Sustainable Energy

Science & Technology

  • AgTech
  • Biosciences
  • Environmental Science
  • Food Science
  • Quantum Computation
  • Social and Behavioral Sciences

More Wolfram Solutions

Technology for Education

  • Research Universities
  • Colleges & Teaching Universities
  • High Schools
  • Resources for Students

Education Initiatives

  • Next-Gen EdTech
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
For AIs
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • System Modeler
    • Compute ServicesUse with Mathematica and Wolfram|One
    • AI AccessUse with Mathematica and Wolfram|One
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Wolfram|Alpha
      • Wolfram|Alpha Website
      • Wolfram|Alpha APIs
    • AI Products
      • Wolfram AI Ecosystem
      • Wolfram Foundation Tool
      • Wolfram Cloud MCP
      • Wolfram Local MCP
      • Agent One API
      • CAG Component APIs
    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • Linguistic Understanding
    • Additional Deployment Options
      • Wolfram Cloud
      • Wolfram Web Engine
      • wolframscript
      • WSTPServer
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions
    • Wolfram Consulting

    Data Science, Finance & Business

    • Artificial Intelligence
    • Data Science
    • Healthcare
    • Real Estate

    Engineering

    • Civil Engineering
    • Automotive Engineering
    • Sustainable Energy

    Science & Technology

    • AgTech
    • Biosciences
    • Environmental Science
    • Food Science
    • Quantum Computation
    • Social and Behavioral Sciences

    More Wolfram Solutions

    Technology for Education

    • Research Universities
    • Colleges & Teaching Universities
    • High Schools
    • Resources for Students

    Education Initiatives

    • Next-Gen EdTech
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • For AIs
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
Threaded
  • See Also
    • Thread
    • MapThread
    • Inner
    • ArrayReduce
  • Related Guides
    • Handling Arrays of Data
    • List Manipulation
    • See Also
      • Thread
      • MapThread
      • Inner
      • ArrayReduce
    • Related Guides
      • Handling Arrays of Data
      • List Manipulation

Threaded[list]

is an object whose elements will automatically be threaded into the lowest level of an array when used in a listable operation such as Plus.

a+Threaded[b]

adds elements of an array b to elements of an array a at the lowest possible level.

a+Threaded[b,alev]

adds elements at level alev of a.

a+Threaded[b,blevalev]

adds elements at level alev in a to level blev in b.

f[a,Threaded[b,…]]

combines elements for a function f with the attribute Listable.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Applications  
Properties & Relations  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • Thread
    • MapThread
    • Inner
    • ArrayReduce
  • Related Guides
    • Handling Arrays of Data
    • List Manipulation
    • See Also
      • Thread
      • MapThread
      • Inner
      • ArrayReduce
    • Related Guides
      • Handling Arrays of Data
      • List Manipulation

Threaded

Threaded[list]

is an object whose elements will automatically be threaded into the lowest level of an array when used in a listable operation such as Plus.

a+Threaded[b]

adds elements of an array b to elements of an array a at the lowest possible level.

a+Threaded[b,alev]

adds elements at level alev of a.

a+Threaded[b,blevalev]

adds elements at level alev in a to level blev in b.

f[a,Threaded[b,…]]

combines elements for a function f with the attribute Listable.

Details

  • In a+Threaded[b], the lowest-level dimensions of a must match the dimensions of b.
  • For a function f with the Listable attribute, f[a,b] effectively applies f to the elements in arrays a and b, working from the uppermost level down. Using Threaded gives control over how the elements are combined in a.
  • If a has dimensions {adim1,…,adimj} and b has dimensions {bdim1,…,bdimi}, then the levels correspond to dimensions as follows:
  • In f[a,Threaded[b]], a and b should be rectangular arrays with ArrayDepth[a]≥ArrayDepth[b].
  • Threaded[b] is equivalent to Threaded[b,1-ArrayDepth[b]] or to Threaded[b,-1-1]. »
  • Threaded[b,alev] is equivalent to Threaded[b,1alev].
  • f[a,Threaded[b,alev]] with alev<0 is equivalent to f[a,Threaded[b,ArrayDepth[a]+alev+1]].
  • f[a,Threaded[b,alev]] with alev>0 is equivalent to Map[f[#,b]&,a,{alev-1}] .
  • f[Threaded[a,alev], Threaded[b,blev]] gives a result with head Threaded if alev and blev have the same sign.

Examples

open all close all

Basic Examples  (1)

Add the pair {x,y} to each element in a list of pairs:

Wolfram Language code: {{1, 2}, {3, 4}, {5, 6}} + Threaded[{x, y}]

Without Threaded, adding a list of scalars to the list of pairs would add a scalar value to each pair:

Wolfram Language code: {{1, 2}, {3, 4}, {5, 6}} + {x, y, z}

Scope  (7)

Create a rank-three array with dimensions {2,3,4}:

Wolfram Language code: arr = Array[Subscript[a, ##]&, {2, 3, 4}]

Add a 3×4 matrix to each of the two matrices in the array:

Wolfram Language code: mat = (⁠| | | | | | - | -- | -- | -- | | 1 | 2 | 3 | 4 | | 5 | 6 | 7 | 8 | | 9 | 10 | 11 | 12 |⁠);
Wolfram Language code: arr + Threaded[mat]

Create a rank-four array with dimensions {2,3,4,2}:

Wolfram Language code: arr = Array[Subscript[a, ##]&, {2, 3, 4, 2}]

Adding a 3×4 matrix at the deepest threading level will fail because 3×4 differs from 4×2:

Wolfram Language code: mat = (⁠| | | | | | - | -- | -- | -- | | 1 | 2 | 3 | 4 | | 5 | 6 | 7 | 8 | | 9 | 10 | 11 | 12 |⁠);
Wolfram Language code: arr + Threaded[mat];

The matrix can be added at level 2 because the dimensions match:

Wolfram Language code: arr + Threaded[mat, 2]

Since the deepest array has rank 4, this is the same as threading at level -3:

Wolfram Language code: % == arr + Threaded[mat, -3]

Combining a scalar with a Threaded argument gives a Threaded result:

Wolfram Language code: res = 2 * Threaded[{-1, 1}]

This preserves associativity:

Wolfram Language code: res * {{a, b}, {c, d}}
Wolfram Language code: 2 * (Threaded[{-1, 1}] * {{a, b}, {c, d}})

When all of the arguments are Threaded objects, then the result is a single Threaded object:

Wolfram Language code: Threaded[{-1, 1}] + Threaded[{{a, b}, {c, d}}]

Compare using Threaded with different positive levels for an array with depth 4:

Wolfram Language code: Table[Framed[(Array[a, {2, 2, 2, 2}] + Threaded[{x, y}, n])[[All, All, All, All, 1]]], {n, 4}]

Compare using Threaded with different negative levels for an array with depth 4:

Wolfram Language code: Table[Framed[(Array[a, {2, 2, 2, 2}] + Threaded[{x, y}, -n])[[All, All, All, All, 1]]], {n, 4}]

Use Threaded with an arbitrary listable function:

Wolfram Language code: SetAttributes[f, Listable];
Wolfram Language code: f[Threaded[{a, b}], {{1, 2}, {3, 4}}]

Threaded arguments can appear in any order:

Wolfram Language code: f[0, {-1, -2}, Threaded[{a, b}], {{1, 2}, {3, 4}}]

Use Threaded with SparseArray objects:

Wolfram Language code: m = SparseArray[{{1, 0, 2}, {0, 3, 0}}]; v = SparseArray[{4, 5, 0}];
Wolfram Language code: m + Threaded[v]
Wolfram Language code: MatrixForm[%]
Wolfram Language code: m * Threaded[v] // MatrixForm

Applications  (2)

Add a vector to each row of a matrix:

Wolfram Language code: Threaded[{a, b, c}] + (⁠| | | | | - | - | - | | 1 | 2 | 3 | | 4 | 5 | 6 |⁠) //MatrixForm

Add a vector to each column of a matrix:

Wolfram Language code: {α, β} + (⁠| | | | | - | - | - | | 1 | 2 | 3 | | 4 | 5 | 6 |⁠) //MatrixForm

Zero the red channel and double the blue channel in 3D image data:

Wolfram Language code: data = ImageData[[image]] * Threaded[{0., 2., 1.}]
Wolfram Language code: Image3D[data]

The same construct works for 2D image data:

Wolfram Language code: Image[ImageData[[image]] * Threaded[{0., 2., 1.}]]

Properties & Relations  (8)

Threaded[y,…] stays unevaluated unless inside a wrapping head with the Listable attribute:

Wolfram Language code: t = Threaded[{x, y}]
Wolfram Language code: plus[{{a, b}, {c, d}, {e, f}}, t]
Wolfram Language code: Plus[{{a, b}, {c, d}, {e, f}}, t]

If the operation cannot be performed, a message will be emitted and Threaded will stay unevaluated:

Wolfram Language code: Plus[{{a, b, c}, {d, e, f}}, t]

Default threading behavior of a listable function f with arrays a and b corresponds to Threaded[b,1]:

Wolfram Language code: SetAttributes[f, Listable]
Wolfram Language code: a = Array[x, {2, 2, 2}]; b = Array[y, {2, 2}];

Thread the first level of b at the first level of a:

Wolfram Language code: f[a, b] === f[a, Threaded[b, 1]]

By default, Threaded[b] threads b at the lowest possible level that does not change the depth of a:

Wolfram Language code: f[a, Threaded[b]] === f[a, Threaded[b, Depth[a] - Depth[b] + 1]]

These two threading behaviors are different:

Wolfram Language code: f[a, Threaded[b]] === f[a, Threaded[b, 1]]

An array threaded at the lowest level is duplicated as a whole to create a sufficiently deep array for an operation:

Wolfram Language code: mat = (⁠| | | | | -- | -- | -- | | 1. | 2. | 3. | | 4. | 5. | 6. | | 7. | 8. | 9. |⁠); arr = Array[Subscript[a, ##]&, {3, 3, 3}]; arr * Threaded[mat]

When it is threaded at a higher level, individual entries are duplicated to fill out the array:

Wolfram Language code: arr * Threaded[mat, 1]

Threaded[b] is equivalent to Threaded[b,-1-1]:

Wolfram Language code: randomDims = RandomInteger[{2, 4}, RandomInteger[3]]; a = Array[x, Join[randomDims, {3, 2}]]; b = Array[y, {3, 2}]; a + Threaded[b] === a + Threaded[b, -1 -> -1]

This can also be expressed as Threaded[b,1-ArrayDepth[b]]:

Wolfram Language code: a + Threaded[b] === a + Threaded[b, 1 -> -ArrayDepth[b]]

For a listable function f, an array a and a vector v, the use of Threaded can be reproduced with Inner:

Wolfram Language code: SetAttributes[f, Listable]
Wolfram Language code: a = Array[x, {2, 2, 2, 2}];
Wolfram Language code: v = {y, z};
Wolfram Language code: f[a, Threaded[v]] === Inner[f, a, v, List]

A transposition is needed for nondefault threading level:

Wolfram Language code: f[a, Threaded[v, 1]] === Transpose[Inner[f, a, v, List, 1], {2, 3, 4, 1}]
Wolfram Language code: f[a, Threaded[v, 2]] === Transpose[Inner[f, a, v, List, 2], {1, 3, 4, 2}]
Wolfram Language code: f[a, Threaded[v, 3]] === Transpose[Inner[f, a, v, List, 3], {1, 2, 4, 3}]

Compare threading the first level of b at the first level of a, using both Threaded and an explicit Table:

Wolfram Language code: SetAttributes[f, Listable]; a = Array[x, {3, 4, 2, 5, 6}]; b = Array[y, {2, 5}];
Wolfram Language code: f[a, Threaded[b, 3]] === Table[f[a[[i, j, k]], b[[k]]], {i, 3}, {j, 4}, {k, 2}]

Threading at nondefault levels can be also achieved by using two transpositions:

Wolfram Language code: SetAttributes[f, Listable]; a = Array[x, {3, 4, 2, 5, 6}]; b = Array[y, {2, 5}];

This permutation moves levels 3 and 4 of a to levels 1 and 2, leaving level 5 unchanged:

Wolfram Language code: perm = {3, 4, 1, 2, 5};
Wolfram Language code: f[a, Threaded[b, 3]] === Transpose[f[Transpose[a, perm], b], InversePermutation[perm]]

QuantityArray[mags,units] would correspond to Quantity[mags,Threaded[units]] if Quantity had the Listable attribute:

Wolfram Language code: mags = RandomInteger[10, {3, 4, 2, 2}]; units = {{"Meters", "Seconds"}, {"Kilograms", "Farads"}};
Wolfram Language code: SetAttributes[quantity, Listable]; quantity[mags, Threaded[units]] /. quantity -> Quantity//MatrixForm
Wolfram Language code: % == QuantityArray[mags, units]

See Also

Thread  MapThread  Inner  ArrayReduce

Related Guides

    ▪
  • Handling Arrays of Data
  • ▪
  • List Manipulation

History

Introduced in 2022 (13.1)

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2026_threaded, author="Wolfram Research", title="{Threaded}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/Threaded.html}", note=[Accessed: 01-September-2026]}

BibLaTeX

@online{reference.wolfram_2026_threaded, organization={Wolfram Research}, title={Threaded}, year={2022}, url={https://reference.wolfram.com/language/ref/Threaded.html}, note=[Accessed: 01-September-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • AI Access
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English