This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# Inner

 Inneris a generalization of Dot in which f plays the role of multiplication and g of addition.
• Inner[f, {{a, b}, {c, d}}, {x, y}, g]{g[f[a, x], f[b, y]], g[f[c, x], f[d, y]]}.
• Like Dot, Inner effectively contracts the last index of the first tensor with the first index of the second tensor. Applying Inner to a rank r tensor and a rank s tensor gives a rank tensor.
• Inner contracts index n of the first tensor with the first index of the second tensor.
• The heads of and must be the same, but need not necessarily be List. »
Compute the "inner f" of two lists, with "plus operation" g:
Compute a generalized inner product of a matrix and a vector:
Use familiar operations:
Compute the "inner f" of two lists, with "plus operation" g:
 Out[1]=

Compute a generalized inner product of a matrix and a vector:
 Out[1]=

Use familiar operations:
 Out[1]=
 Out[2]=
 Scope   (3)
Generalized inner product of two matrices:
Inner product of a matrix with a vector:
Inner product of a vector with a matrix:
Contract over the first index of the first matrix:
Inner works with heads other than List:
 Applications   (3)
The divergence of a vector field is an inner differentiation:
Inner product of two Boolean matrices:
Applying the functions in a list to corresponding arguments:
This gives the scalar product of two vectors:
This does the same thing:
Combining the products with List gives the same result as MapThread:
New in 1