submited by

Style Pass

Inner Product (.) is a dyadic operator that produces a dyadic function when applied with two dyadic functions. It's a generalisation of the matrix product, allowing not just addition-multiplication, but any dyadic functions given as operands.

For each rank-1 cell in the arguments, inner product applies ⍵⍵ between the two and then applies ⍺⍺⌿ to the results of those invocations. If the arguments themselves are simply vectors, there is only one rank-1 cell in each argument, so this results in the following application pattern:

The second line is an illustration of how the first will be evaluated. Note that this is precisely the vector dot product when used as +.×. (This simple invocation with vector arguments will be referred to as the "vector inner product" below, but it is just a simple case of the general inner product.)

For matrix arguments, there may be more than one rank-1 cell. Considering the case of rank-2 matrices as arguments, if there are N rows in ⍺ and M columns in ⍵, the result will be a matrix with N rows and M columns. Each row of the resulting matrix will correspond to the elements of that same row in ⍺ being paired up with elements in a column of ⍵. Likewise, each column of the resulting matrix will correspond to the elements of that same column of ⍵ being paired up with elements in a row of ⍺. Important: This means that the inner product will be applied for each row of ⍺ but each column of ⍵!

Read more aplwiki.com/...