({{, (RefLink[MapThread, paclet:ref/MapThread])[f,{{(Subscript[a, 1]),(Subscript[a, 2]),…},{(Subscript[b, 1]),(Subscript[b, 2]),…},…}]
gives {f[(Subscript[a, 1]),(Subscript[b, 1]),…],f[(Subscript[a, 2]),(Subscript[b, 2]),…],…}. }, {, (RefLink[MapThread, paclet:ref/MapThread])[f,{(Subscript[expr, 1]),(Subscript[expr, 2]),…},n]
applies f to the parts of the (Subscript[expr, i]) at level n.}, {, (RefLink[MapThread, paclet:ref/MapThread])[f]
represents an operator form of (RefLink[MapThread, paclet:ref/MapThread]) that can be applied to an expression.}})

OpenersNotesSection(Spacer1)Details

(RefLink[MapThread, paclet:ref/MapThread]) works on (RefLink[Association, paclet:ref/Association]) objects.

(RefLink[MapThread, paclet:ref/MapThread])[f][expr] is equivalent to (RefLink[MapThread, paclet:ref/MapThread])[f,expr].

OpenersPrimaryExamplesSection(Spacer1)Examples  (16)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Apply f to corresponding pairs of elements:

MapThread[f,{{a,b,c},{x,y,z}}]

Apply f to elements of a matrix:

MapThread[f,{{{a,b},{c,d}},{{u,v},{s,t}}},2]

Apply f to corresponding values of associations:

MapThread[f,{<|a->1|>,<|a->2|>}]

Use the operator form of (RefLink[MapThread, paclet:ref/MapThread]):

MapThread[f][{{a,b,c,d},{1,2,3,4}}]

OpenersExampleSection1(Spacer1)Scope  (2)

By default, (RefLink[MapThread, paclet:ref/MapThread]) threads over level 1 of the arguments:

MapThread[f,{{{a,b},{c,d}},{{u,v},{w,x}}}]

Thread over level 2:

MapThread[f,{{{a,b},{c,d}},{{u,v},{w,x}}},2]

(RefLink[MapThread, paclet:ref/MapThread]) works with any number of expressions:

MapThread[f,{{1,2,3},{4,5,6},{7,8,9},{10,11,12}}]

OpenersExampleSection2(Spacer1)Applications  (3)

Set up an outer totalistic cellular automaton:

t=RandomInteger[1,10]

MapThread[f,{t,RotateLeft[t]+RotateRight[t]}]

Divide eigenvectors by their corresponding eigenvalues:

Eigensystem[{{1,3},{2,7}}]

MapThread[#2/#1&,%]//FullSimplify

Apply the functions in a list to corresponding arguments:

MapThread[#1@#2&,{{f,g,h},{x,y,z}}]

OpenersExampleSection3(Spacer1)Properties & Relations  (5)

Add columns of elements in a matrix:

MapThread[Plus,{{a,b,c},{u,v,w},{x,y,z}}]

Total[{{a,b,c},{u,v,w},{x,y,z}}]

Get lists of elements in columns of a matrix:

MapThread[List,{{a,b,c},{u,v,w},{x,y,z}}]

Transpose[{{a,b,c},{u,v,w},{x,y,z}}]

(RefLink[MapThread, paclet:ref/MapThread]) works like (RefLink[Thread, paclet:ref/Thread]), but takes the function and arguments separately:

MapThread[f,{{a,b,c},{x,y,z}}]

Thread[f[{a,b,c},{x,y,z}]]

(RefLink[Thread, paclet:ref/Thread]) evaluates the whole expression before threading:

Thread[D[{x,x y, x z},{x,y,z}]]

(RefLink[MapThread, paclet:ref/MapThread]) takes the function and its arguments separately:

MapThread[D,{{x,x y,x z},{x,y,z}}]

(RefLink[MapThread, paclet:ref/MapThread]) is a generalization of (RefLink[Map, paclet:ref/Map]) to functions of several variables:

Map[f,{a,b,c}]

MapThread[f,{{a,b,c}}]

MapThread[f,{{a,b,c},{x,y,z}}]

OpenersExampleSection4(Spacer1)Possible Issues  (2)

All arguments must be lists of the same length:

MapThread[f,{{a,b,c},t,{u,v,w}}]

(RefLink[Thread, paclet:ref/Thread]) repeats nonlist arguments as needed:

Thread[f[{a,b,c},t,{u,v,w}]]

(RefLink[MapThread, paclet:ref/MapThread]) combines associations in a list:

MapThread[f,{<|a->1|>,<|a->2|>}]

Use (RefLink[Apply, paclet:ref/Apply]) to combine values of an association:

Apply[f,<|a->{1,2},b->{3,4}|>,{1}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Apply, paclet:ref/Apply])  ▪  (RefLink[Map, paclet:ref/Map])  ▪  (RefLink[Thread, paclet:ref/Thread])  ▪  (RefLink[Inner, paclet:ref/Inner])  ▪  (RefLink[Transpose, paclet:ref/Transpose])  ▪  (RefLink[Through, paclet:ref/Through])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Applying Functions to Parts of Expressions, paclet:tutorial/ApplyingFunctionsToPartsOfExpressions])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Applying Functions to Lists, paclet:guide/ApplyingFunctionsToLists])}, {▪(RefLinkPlain[Functional Programming, paclet:guide/FunctionalProgramming])}, {▪(RefLinkPlain[List Manipulation, paclet:guide/ListManipulation])}})}})