# Evaluating a 2D function successively with each pair of values in a list of pairs [closed]

I have a table of parameter pairs a and b {{a1, b1}, {a2, b2}, ...} and I would like to evaluate a function with these parameter pairs. What I tried so far:

Table[a + b, {a, {1, 2}}, {b, {3, 4}}]


As a result I do get:

{{4, 5}, {5, 6}}


So Mathematica evaluated the function a + b with all possible combinations of the list of a and b. However, I would like to have a table with the evaluation of the fuction 1st with a = 1 and b = 3 and then with a = 2 and b = 4 and not the other combinations. How do I realize this?

## closed as off-topic by m_goldberg, b3m2a1, Henrik Schumacher, MarcoB, SektorJan 31 '18 at 7:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – m_goldberg, b3m2a1, Henrik Schumacher, MarcoB, Sektor
If this question can be reworded to fit the rules in the help center, please edit the question.

• MapThread[foo, {{1, 2}, {3, 4}}] or Inner[foo, {1, 2}, {3, 4}, List] or foo @@@ Transpose[{{1, 2}, {3, 4}}] or Thread[foo[{1, 2}, {3, 4}]] ?? – kglr Jan 23 '18 at 16:11
• ... use Plus for foo to get your a+b example. – kglr Jan 23 '18 at 16:12
• f @@@ {{1, 3}, {2, 4}}? – Michael E2 Jan 23 '18 at 16:25

Plus @@@ {{1, 3}, {2, 4}}
(* {4, 6} *)

Plus @@@ {{1, 3}, {2, 4}, {3, 5}}
(* {4, 6, 8} *)

• Thank you for your help! – JPK Jan 24 '18 at 9:45
• @JPK You're welcome. :) – Michael E2 Jan 24 '18 at 12:07
Thread[foo[{a, b}, {c, d}]]
foo @@@ Thread[{{a, b}, {c, d}}]
foo @@@ Transpose[{{a, b}, {c, d}}]
Inner[foo, {a, b}, {c, d}, List]


{foo[a, c], foo[b, d]}

For Plus you can simply use (thanks: MichaelE2)

{a, b} + {c, d} (* or *)
Plus[{a, b}, {c, d}]


to get

{a + c, b + d}

Actually, the same is true for all Listable functions such as Times and Power:

Times[{a, b, c}, {x, y, z}]


{a x, b y, c z}

{a,b,c}^{x,y,z}


{a^x, b^y, c^z}

• Thank you for your help! – JPK Jan 24 '18 at 9:45
• @JPK, my pleasure. – kglr Jan 25 '18 at 20:43