# Mathematical formalism for the “dot product” of three vectors

I know that the dot product of two vectors is the sum of element-wise multiplication. Using pseudo-MATLAB notation:

(x,y) = sum(x.*y).


I'm interested in computing something analogous for three vectors:

(x,y,z) = sum(x.*y.*z).


Is there a mathematical definition or formalism for this ternary operation?

• I don't think this operation has a name, nor that it has interesting properties. – Crostul Aug 19 '15 at 19:09
• You can certainly compute this, but the dot product has an actual meaning-it's used to compute the angle between two vectors. – Kevin Carlson Aug 19 '15 at 19:09
• Even without knowing your actual context, probably you want $x\cdot (y \times z)$, that is the dot product of $x$ with the "cross product" of $y$ and $z$. This is a reasonable and useful thing. Also, as it stands, there's sort of a "type error" insofar as I don't know what that alleged ternary operation could mean, since the vectors/matrices are not the right size to be multiplied literally as the notation suggests. – paul garrett Aug 19 '15 at 20:11
• @wonderboy3489 You just defined and formalized the idea. Whether there is any literature on the subject is a different question. A brief search of "ternary dot product" turns up math.stackexchange.com/questions/1196736/… – DanielV Aug 19 '15 at 20:20

You could call it, for example, ${\bf x}^T Y {\bf z}$ where $Y$ is the diagonal matrix with the entries of ${\bf y}$ on the diagonal. Of course you could apply any permutation to ${\bf x}$, ${\bf y}$, ${\bf z}$.
Your "ternary dot product" is basically equivalent to the Hadamard product (https://en.wikipedia.org/wiki/Hadamard_product_%28matrices%29): given two vectors $\langle a_i\rangle, \langle b_i\rangle$, their Hadamard product is just componentwise multiplication: $$\langle a_i\rangle*\langle b_i\rangle=\langle a_ib_i\rangle.$$ To see why this is equivalent to the thing you describe, note that the ternary dot product of $\alpha, \beta, \gamma$ is just $\alpha\cdot (\beta*\gamma)$. In fact, the Hadamard product can be used to define $n$-ary dot products similarly, whereas you can't obviously do this with just the ternary dot product alone. Because of this, I don't think this operation deserves a specific name.
• In fact the only isomorphisms that preserve this triple-product are the permutations of the basis vectors. To see this note that the basis vectors are the only vectors with $(v,-,-)$ of rank $1$ and $(v,v,v)=1$. (At least this is true over $\mathbb R$. Over $\mathbb C$ there is also the map $\omega I$ where $\omega^3=1$.) – Oscar Cunningham Aug 24 '15 at 17:38