# Seven-dimensional cross product

In mathematics, the seven-dimensional cross product is a bilinear operation on vectors in seven-dimensional Euclidean space. It assigns to any two vectors a, b in ⁠$\mathbb {R} ^{7}$⁠ a vector a × b also in ⁠$\mathbb {R} ^{7}$⁠. Like the cross product in three dimensions, the seven-dimensional product is anticommutative and a × b is orthogonal both to a and to b. Unlike in three dimensions, it does not satisfy the Jacobi identity, and while the three-dimensional cross product is unique up to a sign, there are many seven-dimensional cross products. The seven-dimensional cross product has the same relationship to the octonions as the three-dimensional product does to the quaternions.
The seven-dimensional cross product is one way of generalizing the cross product to other than three dimensions, and it is the only other bilinear product of two vectors that is vector-valued, orthogonal, and has the same magnitude as in the 3D case. In other dimensions there are vector-valued products of three or more vectors that satisfy these conditions, and binary products with bivector results.

## Multiplication table

| × | e$_1$ | e$_2$ | e$_3$ | e$_4$ | e$_5$ | e$_6$ | e$_7$ |
| e$_1$ | 0 | e$_3$ | −e$_2$ | e$_5$ | −e$_4$ | −e$_7$ | e$_6$ |
| e$_2$ | −e$_3$ | 0 | e$_1$ | e$_6$ | e$_7$ | −e$_4$ | −e$_5$ |
| e$_3$ | e$_2$ | −e$_1$ | 0 | e$_7$ | −e$_6$ | e$_5$ | −e$_4$ |
| e$_4$ | −e$_5$ | −e$_6$ | −e$_7$ | 0 | e$_1$ | e$_2$ | e$_3$ |
| e$_5$ | e$_4$ | −e$_7$ | e$_6$ | −e$_1$ | 0 | −e$_3$ | e$_2$ |
| e$_6$ | e$_7$ | e$_4$ | −e$_5$ | −e$_2$ | e$_3$ | 0 | −e$_1$ |
| e$_7$ | −e$_6$ | e$_5$ | e$_4$ | −e$_3$ | −e$_2$ | e$_1$ | 0 |
The product can be given by a multiplication table, such as the one here. This table, due to Cayley, gives the product of orthonormal basis vectors e$_i$ and e$_j$ for each i, j from 1 to 7. For example, from the table
    $\mathbf {e} _{1}\times \mathbf {e} _{2}=\mathbf {e} _{3}=-\mathbf {e} _{2}\times \mathbf {e} _{1}$
The table can be used to calculate the product of any two vectors. For example, to calculate the e$_1$ component of x × y the basis vectors that multiply to produce e$_1$ can be picked out to give
    $\left(\mathbf {x\times y} \right)_{1}=x_{2}y_{3}-x_{3}y_{2}+x_{4}y_{5}-x_{5}y_{4}+x_{7}y_{6}-x_{6}y_{7}.$
This can be repeated for the other six components.
There are 480 such tables for any given set of orthogonal basis vectors, one for each of the products satisfying the definition such that each entry in the table can be expressed in terms of a single element of the basis. This table can be summarized by the relation
    $\mathbf {e} _{i}\mathbf {\times } \mathbf {e} _{j}=\varepsilon _{ijk}\mathbf {e} _{k},$
where $\varepsilon _{ijk}$ is the Levi-Civita symbol, a completely antisymmetric tensor with a positive value +1 when ijk = 123, 145, 176, 246, 257, 347, 365.
The top left 3 × 3 corner of this table gives the cross product in three dimensions.

## Definition

A cross product on a Euclidean space V is a bilinear map from V × V to V, mapping vectors x and y in V to another vector x × y also in V, where x × y has the properties
* orthogonality:
    $\mathbf {x} \cdot (\mathbf {x} \times \mathbf {y} )=(\mathbf {x} \times \mathbf {y} )\cdot \mathbf {y} =0,$
* magnitude:
    $|\mathbf {x} \times \mathbf {y} |^{2}=|\mathbf {x} |^{2}|\mathbf {y} |^{2}-(\mathbf {x} \cdot \mathbf {y} )^{2}$
where (x·y) is the Euclidean dot product and |x| is the Euclidean norm. The first property states that the product is perpendicular to its arguments, while the second property gives the magnitude of the product. An equivalent expression in terms of the angle θ between the vectors is
    $|\mathbf {x} \times \mathbf {y} |=|\mathbf {x} ||\mathbf {y} |\sin \theta ,$
which is the area of the parallelogram in the plane of x and y with the two vectors as sides. A third statement of the magnitude condition is
    $|\mathbf {x} \times \mathbf {y} |=|\mathbf {x} ||\mathbf {y} |~{\mbox{if}}\ \left(\mathbf {x} \cdot \mathbf {y} \right)=0,$
if x × x = 0 is assumed as a separate axiom.

## Consequences of the defining properties

Given the properties of bilinearity, orthogonality and magnitude, a nonzero cross product exists only in three and seven dimensions. This can be shown by postulating the properties required for the cross product, then deducing an equation which is only satisfied when the dimension is 0, 1, 3 or 7. In zero dimensions there is only the zero vector, while in one dimension all vectors are parallel, so in both these cases the product must be identically zero.
The restriction to 0, 1, 3 and 7 dimensions is related to Hurwitz's theorem, that normed division algebras are only possible in 1, 2, 4 and 8 dimensions. The cross product is formed from the product of the normed division algebra by restricting it to the 0, 1, 3, or 7 imaginary dimensions of the algebra, giving nonzero products in only three and seven dimensions.
In contrast to the three-dimensional cross product, which is unique (apart from sign), there are many possible binary cross products in seven dimensions. One way to see this is to note that given any pair of vectors x and y $\in \mathbb {R} ^{7}$ and any vector v of magnitude |v| = |x||y| sin θ in the five-dimensional space perpendicular to the plane spanned by x and y, it is possible to find a cross product with a multiplication table (and an associated set of basis vectors) such that x × y = v. Unlike in three dimensions, x × y = a × b does not imply that a and b lie in the same plane as x and y.
Further properties follow from the definition, including the following identities:
* Anticommutativity:
    $\mathbf {x} \times \mathbf {y} =-\mathbf {y} \times \mathbf {x}$
* Scalar triple product:
    $\mathbf {x} \cdot (\mathbf {y} \times \mathbf {z} )=\mathbf {y} \cdot (\mathbf {z} \times \mathbf {x} )=\mathbf {z} \cdot (\mathbf {x} \times \mathbf {y} )$
* Malcev identity:
    $(\mathbf {x} \times \mathbf {y} )\times (\mathbf {x} \times \mathbf {z} )=((\mathbf {x} \times \mathbf {y} )\times \mathbf {z} )\times \mathbf {x} +((\mathbf {y} \times \mathbf {z} )\times \mathbf {x} )\times \mathbf {x} +((\mathbf {z} \times \mathbf {x} )\times \mathbf {x} )\times \mathbf {y}$
    $\mathbf {x} \times (\mathbf {x} \times \mathbf {y} )=-|\mathbf {x} |^{2}\mathbf {y} +(\mathbf {x} \cdot \mathbf {y} )\mathbf {x} .$
Other properties follow only in the three-dimensional case, and are not satisfied by the seven-dimensional cross product, notably,
* Vector triple product:
    $\mathbf {x} \times (\mathbf {y} \times \mathbf {z} )=(\mathbf {x} \cdot \mathbf {z} )\mathbf {y} -(\mathbf {x} \cdot \mathbf {y} )\mathbf {z}$
* Jacobi identity:
    $\mathbf {x} \times (\mathbf {y} \times \mathbf {z} )+\mathbf {y} \times (\mathbf {z} \times \mathbf {x} )+\mathbf {z} \times (\mathbf {x} \times \mathbf {y} )=0$
Thanks to the Jacobi Identity, the three-dimensional cross product gives $\mathbb {R} ^{3}$ the structure of a Lie algebra, which is isomorphic to ${\mathfrak {so}}(3)$, the Lie algebra of the 3d rotation group. Because the Jacobi identity fails in seven dimensions, the seven-dimensional cross product does not give $\mathbb {R} ^{7}$ the structure of a Lie algebra.

## Coordinate expressions

To define a particular cross product, an orthonormal basis {e$_j$} may be selected and a multiplication table provided that determines all the products {e$_i$ × e$_j$}. One possible multiplication table is described in the Multiplication table section, but it is not unique. Unlike three dimensions, there are many tables because every pair of unit vectors is perpendicular to five other unit vectors, allowing many choices for each cross product.
Once we have established a multiplication table, it is then applied to general vectors x and y by expressing x and y in terms of the basis and expanding x × y through bilinearity.
| × | e$_1$ | e$_2$ | e$_3$ | e$_4$ | e$_5$ | e$_6$ | e$_7$ |
| e$_1$ | 0 | e$_4$ | e$_7$ | −e$_2$ | e$_6$ | −e$_5$ | −e$_3$ |
| e$_2$ | −e$_4$ | 0 | e$_5$ | e$_1$ | −e$_3$ | e$_7$ | −e$_6$ |
| e$_3$ | −e$_7$ | −e$_5$ | 0 | e$_6$ | e$_2$ | −e$_4$ | e$_1$ |
| e$_4$ | e$_2$ | −e$_1$ | −e$_6$ | 0 | e$_7$ | e$_3$ | −e$_5$ |
| e$_5$ | −e$_6$ | e$_3$ | −e$_2$ | −e$_7$ | 0 | e$_1$ | e$_4$ |
| e$_6$ | e$_5$ | −e$_7$ | e$_4$ | −e$_3$ | −e$_1$ | 0 | e$_2$ |
| e$_7$ | e$_3$ | e$_6$ | −e$_1$ | e$_5$ | −e$_4$ | −e$_2$ | 0 |
Using e$_1$ to e$_7$ for the basis vectors a different multiplication table from the one in the Introduction, leading to a different cross product, is given with anticommutativity by
    $\mathbf {e} _{1}\times \mathbf {e} _{2}=\mathbf {e} _{4},\quad \mathbf {e} _{2}\times \mathbf {e} _{4}=\mathbf {e} _{1},\quad \mathbf {e} _{4}\times \mathbf {e} _{1}=\mathbf {e} _{2},$
    $\mathbf {e} _{2}\times \mathbf {e} _{3}=\mathbf {e} _{5},\quad \mathbf {e} _{3}\times \mathbf {e} _{5}=\mathbf {e} _{2},\quad \mathbf {e} _{5}\times \mathbf {e} _{2}=\mathbf {e} _{3},$
    $\mathbf {e} _{3}\times \mathbf {e} _{4}=\mathbf {e} _{6},\quad \mathbf {e} _{4}\times \mathbf {e} _{6}=\mathbf {e} _{3},\quad \mathbf {e} _{6}\times \mathbf {e} _{3}=\mathbf {e} _{4},$
    $\mathbf {e} _{4}\times \mathbf {e} _{5}=\mathbf {e} _{7},\quad \mathbf {e} _{5}\times \mathbf {e} _{7}=\mathbf {e} _{4},\quad \mathbf {e} _{7}\times \mathbf {e} _{4}=\mathbf {e} _{5},$
    $\mathbf {e} _{5}\times \mathbf {e} _{6}=\mathbf {e} _{1},\quad \mathbf {e} _{6}\times \mathbf {e} _{1}=\mathbf {e} _{5},\quad \mathbf {e} _{1}\times \mathbf {e} _{5}=\mathbf {e} _{6},$
    $\mathbf {e} _{6}\times \mathbf {e} _{7}=\mathbf {e} _{2},\quad \mathbf {e} _{7}\times \mathbf {e} _{2}=\mathbf {e} _{6},\quad \mathbf {e} _{2}\times \mathbf {e} _{6}=\mathbf {e} _{7},$
    $\mathbf {e} _{7}\times \mathbf {e} _{1}=\mathbf {e} _{3},\quad \mathbf {e} _{1}\times \mathbf {e} _{3}=\mathbf {e} _{7},\quad \mathbf {e} _{3}\times \mathbf {e} _{7}=\mathbf {e} _{1}.$
More compactly this rule can be written as
    $\mathbf {e} _{i}\times \mathbf {e} _{i+1}=\mathbf {e} _{i+3}$
with i = 1, ..., 7 modulo 7 and the indices i, i + 1 and i + 3 allowed to permute evenly. Together with anticommutativity this generates the product. This rule directly produces the two diagonals immediately adjacent to the diagonal of zeros in the table. Also, from an identity in the subsection on consequences,
    $\mathbf {e} _{i}\times \left(\mathbf {e} _{i}\times \mathbf {e} _{i+1}\right)=-\mathbf {e} _{i+1}=\mathbf {e} _{i}\times \mathbf {e} _{i+3}\ ,$
which produces diagonals further out, and so on.
The e$_j$ component of cross product x × y is given by selecting all occurrences of e$_j$ in the table and collecting the corresponding components of x from the left column and of y from the top row. The result is:
    ${\begin{aligned}\mathbf {x} \times \mathbf {y} =(x_{2}y_{4}-x_{4}y_{2}+x_{3}y_{7}-x_{7}y_{3}+x_{5}y_{6}-x_{6}y_{5})\,&\mathbf {e} _{1}\\+(x_{3}y_{5}-x_{5}y_{3}+x_{4}y_{1}-x_{1}y_{4}+x_{6}y_{7}-x_{7}y_{6})\,&\mathbf {e} _{2}\\+(x_{4}y_{6}-x_{6}y_{4}+x_{5}y_{2}-x_{2}y_{5}+x_{7}y_{1}-x_{1}y_{7})\,&\mathbf {e} _{3}\\+(x_{5}y_{7}-x_{7}y_{5}+x_{6}y_{3}-x_{3}y_{6}+x_{1}y_{2}-x_{2}y_{1})\,&\mathbf {e} _{4}\\+(x_{6}y_{1}-x_{1}y_{6}+x_{7}y_{4}-x_{4}y_{7}+x_{2}y_{3}-x_{3}y_{2})\,&\mathbf {e} _{5}\\+(x_{7}y_{2}-x_{2}y_{7}+x_{1}y_{5}-x_{5}y_{1}+x_{3}y_{4}-x_{4}y_{3})\,&\mathbf {e} _{6}\\+(x_{1}y_{3}-x_{3}y_{1}+x_{2}y_{6}-x_{6}y_{2}+x_{4}y_{5}-x_{5}y_{4})\,&\mathbf {e} _{7}.\end{aligned}}$
As the cross product is bilinear, the operator x × – can be written as a matrix, which takes the form
    $T_{\mathbf {x} }={\begin{bmatrix}0&-x_{4}&-x_{7}&x_{2}&-x_{6}&x_{5}&x_{3}\\x_{4}&0&-x_{5}&-x_{1}&x_{3}&-x_{7}&x_{6}\\x_{7}&x_{5}&0&-x_{6}&-x_{2}&x_{4}&-x_{1}\\-x_{2}&x_{1}&x_{6}&0&-x_{7}&-x_{3}&x_{5}\\x_{6}&-x_{3}&x_{2}&x_{7}&0&-x_{1}&-x_{4}\\-x_{5}&x_{7}&-x_{4}&x_{3}&x_{1}&0&-x_{2}\\-x_{3}&-x_{6}&x_{1}&-x_{5}&x_{4}&x_{2}&0\end{bmatrix}}.$
The cross product is then given by
    $\mathbf {x} \times \mathbf {y} =T_{\mathbf {x} }\mathbf {y} .$

### Different multiplication tables

Two different multiplication tables have been used in this article, and there are more. These multiplication tables are characterized by the Fano plane, and these are shown in the figure for the two tables used here: at top, the one described by Sabinin, Sbitneva, and Shestakov, and at bottom that described by Lounesto. The numbers under the Fano diagrams (the set of lines in the diagram) indicate a set of indices for seven independent products in each case, interpreted as ijk → e$_i$ × e$_j$ = e$_k$. The multiplication table is recovered from the Fano diagram by following either the straight line connecting any three points, or the circle in the center, with a sign as given by the arrows. For example, the first row of multiplications resulting in e$_1$ in the above listing is obtained by following the three paths connected to e$_1$ in the lower Fano diagram: the circular path e$_2$ × e$_4$, the diagonal path e$_3$ × e$_7$, and the edge path e$_6$ × e$_1$ = e$_5$ rearranged using one of the above identities as:
    $\mathbf {e} _{6}\times \left(\mathbf {e} _{6}\times \mathbf {e} _{1}\right)=-\mathbf {e} _{1}=\mathbf {e} _{6}\times \mathbf {e} _{5},$
or
    $\mathbf {e} _{5}\times \mathbf {e} _{6}=\mathbf {e} _{1},$
also obtained directly from the diagram with the rule that any two unit vectors on a straight line are connected by multiplication to the third unit vector on that straight line with signs according to the arrows (sign of the permutation that orders the unit vectors).
It can be seen that both multiplication rules follow from the same Fano diagram by simply renaming the unit vectors, and changing the sense of the center unit vector. Considering all possible permutations of the basis there are 480 multiplication tables and so 480 cross products like this.

### Using geometric algebra

The product can also be calculated using geometric algebra of a seven-dimensional vector space with a positive-definite quadratic form. The product starts with the exterior product, a bivector-valued product of two vectors:
    $\mathbf {B} =\mathbf {x} \wedge \mathbf {y} ={\frac {1}{2}}(\mathbf {xy} -\mathbf {yx} ).$
This is bilinear, alternating, has the desired magnitude, but is not vector-valued. The vector, and so the cross product, comes from the contraction of this bivector with a trivector. In three dimensions, up to a scale factor there is only one trivector, the pseudoscalar of the space, and a product of the above bivector and one of the two unit trivectors gives the vector result, the dual of the bivector.
A similar calculation is done is seven dimensions, except that since trivectors form a 35-dimensional space there are many trivectors that could be used, though not just any trivector will do. The trivector that gives the same product as the above coordinate transform is
    $\mathbf {v} =\mathbf {e} _{124}+\mathbf {e} _{235}+\mathbf {e} _{346}+\mathbf {e} _{457}+\mathbf {e} _{561}+\mathbf {e} _{672}+\mathbf {e} _{713}.$
This is combined with the exterior product to give the cross product
    $\mathbf {x} \times \mathbf {y} =-(\mathbf {x} \wedge \mathbf {y} )~\lrcorner ~\mathbf {v}$
where $\lrcorner$ is the left contraction operator from geometric algebra.

## Relation to the octonions

Just as the 3-dimensional cross product can be expressed in terms of the quaternions, the 7-dimensional cross product can be expressed in terms of the octonions. After identifying R$^7$ with the imaginary octonions (the orthogonal complement of the real part of O), the cross product is given in terms of octonion multiplication by
    $\mathbf {x} \times \mathbf {y} =\mathrm {Im} (\mathbf {xy} )={\frac {1}{2}}(\mathbf {xy} -\mathbf {yx} ).$
Conversely, suppose V is a 7-dimensional Euclidean space with a given cross product. Then one can define a bilinear multiplication on R ⊕ V as follows:
    $(a,\mathbf {x} )(b,\mathbf {y} )=(ab-\mathbf {x} \cdot \mathbf {y} ,a\mathbf {y} +b\mathbf {x} +\mathbf {x} \times \mathbf {y} ).$
The space R ⊕ V with this multiplication is then isomorphic to the octonions.
The cross product only exists in three and seven dimensions as one can always define a multiplication on a space of one higher dimension as above, and this space can be shown to be a normed division algebra. By Hurwitz's theorem such algebras only exist in one, two, four, and eight dimensions, so the cross product must be in zero, one, three or seven dimensions. The products in zero and one dimensions are trivial, so non-trivial cross products only exist in three and seven dimensions.
The failure of the 7-dimension cross product to satisfy the Jacobi identity is related to the nonassociativity of the octonions. In fact,
    $\mathbf {x} \times (\mathbf {y} \times \mathbf {z} )+\mathbf {y} \times (\mathbf {z} \times \mathbf {x} )+\mathbf {z} \times (\mathbf {x} \times \mathbf {y} )=-{\frac {3}{2}}[\mathbf {x} ,\mathbf {y} ,\mathbf {z} ]$
where [x, y, z] is the associator.

## Rotations

In three dimensions the cross product is invariant under the action of the rotation group, SO(3), so the cross product of x and y after they are rotated is the image of x × y under the rotation. But this invariance is not true in seven dimensions; that is, the cross product is not invariant under the group of rotations in seven dimensions, SO(7). Instead it is invariant under the exceptional Lie group G$_2$, a subgroup of SO(7).

## Generalizations

Nonzero binary cross products exist only in three and seven dimensions. Further products are possible when lifting the restriction that it must be a binary product. We require the product to be multi-linear, alternating, vector-valued, and orthogonal to each of the input vectors a$_i$. The orthogonality requirement implies that in n dimensions, no more than n − 1 vectors can be used. The magnitude of the product should equal the volume of the parallelotope with the vectors as edges, which can be calculated using the Gram determinant. The conditions are
* orthogonality: $\left(\mathbf {a} _{1}\times \ \cdots \ \times \mathbf {a} _{k}\right)\cdot \mathbf {a} _{i}=0$ for i = 1, ..., k.
* the Gram determinant: $|\mathbf {a} _{1}\times \cdots \times \mathbf {a} _{k}|^{2}=\det(\mathbf {a} _{i}\cdot \mathbf {a} _{j})={\begin{vmatrix}\mathbf {a} _{1}\cdot \mathbf {a} _{1}&\mathbf {a} _{1}\cdot \mathbf {a} _{2}&\cdots &\mathbf {a} _{1}\cdot \mathbf {a} _{k}\\\mathbf {a} _{2}\cdot \mathbf {a} _{1}&\mathbf {a} _{2}\cdot \mathbf {a} _{2}&\cdots &\mathbf {a} _{2}\cdot \mathbf {a} _{k}\\\vdots &\vdots &\ddots &\vdots \\\mathbf {a} _{k}\cdot \mathbf {a} _{1}&\mathbf {a} _{k}\cdot \mathbf {a} _{2}&\cdots &\mathbf {a} _{k}\cdot \mathbf {a} _{k}\\\end{vmatrix}}$
The Gram determinant is the squared volume of the parallelotope with a$_1$, ..., a$_k$ as edges.
With these conditions a non-trivial cross product only exists:
* as a binary product in three and seven dimensions
* as a product of n − 1 vectors in n ≥ 3 dimensions, being the Hodge dual of the exterior product of the vectors
* as a product of three vectors in eight dimensions
One version of the product of three vectors in eight dimensions is given by $\mathbf {a} \times \mathbf {b} \times \mathbf {c} =(\mathbf {a} \wedge \mathbf {b} \wedge \mathbf {c} )~\lrcorner ~(\mathbf {w} -\mathbf {ve} _{8})$ where v is the same trivector as used in seven dimensions, $\lrcorner$ is again the left contraction, and w = −ve$_{12...7}$ is a 4-vector.
There are also trivial products. As noted already, a binary product only exists in 7, 3, 1 and 0 dimensions, the last two being identically zero. A further trivial 'product' arises in even dimensions, which takes a single vector and produces a vector of the same magnitude orthogonal to it through the left contraction with a suitable bivector. In two dimensions this is a rotation through a right angle.
As a further generalization, we can loosen the requirements of multilinearity and magnitude, and consider a general continuous function V$^d$ → V (where V is R$^n$ endowed with the Euclidean inner product and d ≥ 2), which is only required to satisfy the following two properties:
* The cross product is always orthogonal to all the input vectors.
* If the input vectors are linearly independent, then the cross product is nonzero.
Under these requirements, the cross product only exists (I) for n = 3, d = 2, (II) for n = 7, d = 2, (III) for n = 8, d = 3, and (IV) for any d = n − 1.
In another direction, vector product algebras have been defined over an arbitrary field, and for any field not of characteristic 2 they must have dimension 0, 1, 3, or 7. In fact this result has been generalized still further, e.g. by working over any commutative ring in which 2 is cancellable, meaning that 2x = 2y implies x = y.