Outer
[f, x, y]Outer[f, {a, b}, {1, 2, 3}]
Outer product of two matrices:
Outer[Times, {{a, b}, {c, d}}, {{1, 2}, {3, 4}}]
Outer product of two sparse arrays:
Outer[Times, SparseArray[{{1, 2} -> a, {2, 1} -> b}], SparseArray[{{1, 2} -> c, {2, 1} -> d}]]
Outer
of multiple lists:
Outer[f, {a, b}, {x, y, z}, {1, 2}]
Outer
converts input sparse arrays to lists if f=!=Times, or if the input is a mixture of sparse arrays and lists:
Outer[f, SparseArray[{{1, 2} -> a, {2, 1} -> b}], SparseArray[{{1, 2} -> c, {2, 1} -> d}]]
Outer[Times, SparseArray[{{1, 2} -> a, {2, 1} -> b}], {c, d}]
Arrays can be ragged:
Outer[Times, {{1, 2}}, {{a, b}, {c, d, e}}]
Word combinations:
Outer[StringJoin, {"", "re", "un"}, {"cover", "draw", "wind"}, {"", "ing", "s"}] // InputForm
Compositions of trigonometric functions:
trigs = Outer[Composition, {Sin, Cos, Tan}, {ArcSin, ArcCos, ArcTan}]
Evaluate at 0:
Map[#[0] &, trigs, {2}]