Skip to content

Inner and Outer Products

This article introduces simple operations between vectors.

Before proceeding, a note on translation issues: due to historical reasons, the terms "inner product" and "outer product" have a wide variety of translations in mathematics and physics.

In physics, they are generally translated as "scalar product" and "vector product," indicating that the operation results in a scalar and a vector, respectively. High school mathematics textbooks also use this meaning-based translation: "scalar product" and "vector product."

In mathematics, they can also be translated as "inner product" and "outer product," which are direct translations of the two terms. "Dot product" and "cross product" are common names derived from the operation symbols, and these colloquial terms are also very common.

In "dot product" operations, the dot symbol is often omitted, especially in linear algebra, where it is directly treated as matrix multiplication without writing the dot symbol.

Inner Product

The concept of inner product applies to vectors of any dimension.

Definition

There are different but equivalent definitions of the inner product; some are introduced below.

Geometric Definition

In \(n\)-dimensional Euclidean space \(\mathbf{R}^n\), given two vectors \(\boldsymbol{a}, \boldsymbol{b}\) with an angle \(\theta\) between them, then:

\[ \boldsymbol{a} \cdot \boldsymbol{b} = |\boldsymbol{a}| |\boldsymbol{b}| \cos \theta \]

is the inner product, also called the dot product or scalar product, of these two vectors. Here, \(|\boldsymbol{b}|\cos \theta\) is called the projection of \(\boldsymbol{b}\) onto the direction of \(\boldsymbol{a}\). The geometric meaning of the inner product is: the inner product \(\boldsymbol{a} \cdot \boldsymbol{b}\) equals the product of the magnitude of \(\boldsymbol{a}\) and the projection of \(\boldsymbol{b}\) onto the direction of \(\boldsymbol{a}\).

Algebraic Definition

In \(n\)-dimensional Euclidean space \(\mathbf{R}^n\), given two vectors \(\boldsymbol{a} = (a_1, a_2, \dots, a_n), \boldsymbol{b} = (b_1, b_2, \dots, b_n)\), then:

\[ \boldsymbol{a} \cdot \boldsymbol{b} = \sum_{i = 1}^{n} a_i b_i \]

is the inner product, also called the dot product or scalar product, of these two vectors. The geometric and algebraic definitions are equivalent in Euclidean space, with the latter being more convenient to use.

When no confusion arises, the dot symbol for the inner product can be omitted. If a vector has a superscript \(2\) in the upper right corner, it denotes the shorthand for the inner product of the vector with itself, i.e., the square of the vector's magnitude, omitting the magnitude notation. This superscript \(2\) should not be interpreted as the square of the vector because the result of the vector inner product is a scalar, and there is no inner product of any number of vectors other than two. Similarly, the square of the square of the vector magnitude cannot be abbreviated as a superscript \(4\); instead, the result with superscript \(2\) must be treated as a whole, and so on.

Properties

It can be observed that the result of an inner product is a scalar. Its special feature is that it is a bilinear operation that is linear in each of the two vectors. Specifically, the inner product satisfies:

\[ \begin{aligned} (\boldsymbol{a} + \boldsymbol{b}) \cdot \boldsymbol{c} &= \boldsymbol{a} \cdot \boldsymbol{c} + \boldsymbol{b} \cdot \boldsymbol{c} \\ \boldsymbol{a} \cdot (\boldsymbol{b} + \boldsymbol{c}) &= \boldsymbol{a} \cdot \boldsymbol{b} + \boldsymbol{a} \cdot \boldsymbol{c} \\ (\lambda \boldsymbol{a}) \cdot \boldsymbol{b} &= \lambda (\boldsymbol{a} \cdot \boldsymbol{b}) \\ \boldsymbol{a} \cdot (\lambda \boldsymbol{b}) &= \lambda (\boldsymbol{a} \cdot \boldsymbol{b}) \end{aligned} \]

The inner product also satisfies the commutative law:

\[ \boldsymbol{a} \cdot \boldsymbol{b} = \boldsymbol{b} \cdot \boldsymbol{a} \]

Applications

Below are some common applications of the inner product operation.

  1. Determining if two vectors are perpendicular:

    \[ \boldsymbol{a} \perp \boldsymbol{b} \iff \boldsymbol{a} \cdot \boldsymbol{b} = 0 \]

    That is, the inner product of two perpendicular vectors is \(0\); the inner product of a vector with the zero vector is \(0\). If using the inner product being zero as the definition of perpendicularity, it follows that the zero vector is perpendicular to any vector.

  2. Determining if two vectors are collinear:

    \[ \exists\lambda \in \mathbf{R} (\boldsymbol{a} = \lambda \boldsymbol{b}) \iff |\boldsymbol{a} \cdot \boldsymbol{b}| = |\boldsymbol{a}| |\boldsymbol{b}| \]
  3. Calculating the magnitude of a vector:

    \[ |\boldsymbol a| = \sqrt{\boldsymbol{a} \cdot \boldsymbol{a}} \]
  4. Calculating the angle between two vectors:

    \[ \theta = \arccos \frac{\boldsymbol{a} \cdot \boldsymbol{b}}{|\boldsymbol a| |\boldsymbol b|} \]

Second and Third Order Determinants

Second and third order determinants can be defined as special, simpler cases of determinants. In the field theory part of calculus, Green's formula uses second order determinants, Gauss's formula uses the dot product, and Stokes' formula uses third order determinants.

A second order determinant can be viewed as a function of four variables, defined as:

\[ \begin{vmatrix} a & b \\ c & d \end{vmatrix}=ad-bc \]

A third order determinant can be viewed as a function of nine variables, defined as:

\[ \begin{vmatrix} a & b & c \\ d & e & f \\ g & h & i \end{vmatrix}=aei+dhc+gbf-ahf-dbi-gec \]

A special mnemonic is the "diagonal rule," which only applies to second and third order determinants.

Special note: A fourth order determinant expands to 24 terms, and the sign of the anti-diagonal term is positive. If one forcibly applies the "diagonal rule" for third order determinants, not only is the number of terms insufficient, but the sign of the anti-diagonal term is also incorrect. Therefore, the "diagonal rule" for third order determinants does not apply to higher order determinants, and higher order determinants are also not suitable for calculation by direct expansion.

Outer Product

The outer product is an operation specific to three-dimensional vectors.

In physics, three-dimensional vectors, which are by default related to spatial position, are all denoted in bold. However, four-dimensional vectors related to relativity in physics are not denoted in bold but use special notation and subscripts.

In linear algebra, all vectors are denoted in bold. However, due to the inconvenience and because linear algebra mostly involves operations with vectors and matrices, which rarely cause ambiguity, the vector notation can be omitted in handwriting.

Definition

There are different but equivalent definitions of the outer product; some are introduced below.

Geometric Definition

In three-dimensional Euclidean space \(\mathbf{R}^3\), the outer product of vectors \(\boldsymbol{a}, \boldsymbol{b}\) is defined as a vector, denoted \(\boldsymbol{a} \times \boldsymbol{b}\), with its magnitude and direction defined as follows:

  1. \(|\boldsymbol{a} \times \boldsymbol{b}| = |\boldsymbol{a}| |\boldsymbol{b}| \sin \langle \boldsymbol{a}, \boldsymbol{b} \rangle\);
  2. \(\boldsymbol{a} \times \boldsymbol{b}\) is perpendicular to both \(\boldsymbol{a}\) and \(\boldsymbol{b}\), and the directions of \(\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{a} \times \boldsymbol{b}\) obey the right-hand rule.

Noting the magnitude of the outer product and recalling the triangle area formula \(S=\frac{1}{2}ab\sin C\), it can be seen that the geometric meaning of the outer product is: \(|\boldsymbol{a} \times \boldsymbol{b}|\) is the area of the parallelogram with \(\boldsymbol{a}, \boldsymbol{b}\) as adjacent sides.

Algebraic Definition

In three-dimensional Euclidean space \(\mathbf{R}^3\), the outer product of vectors \(\boldsymbol{a} = (x_1, y_1, z_1), \boldsymbol{b} = (x_2, y_2, z_2)\) is defined as a vector \(\boldsymbol{c}\), denoted \(\boldsymbol{c} = \boldsymbol{a} \times \boldsymbol{b}\), and its result can be expressed using a third order determinant:

\[ \begin{vmatrix} \boldsymbol{i} & \boldsymbol{j} & \boldsymbol{k} \\ x_1 & y_1 & z_1 \\ x_2 & y_2 & z_2 \end{vmatrix} \]

where \(\boldsymbol{i}, \boldsymbol{j}, \boldsymbol{k}\) represent the unit vectors pointing along the coordinate axes \(x, y, z\), written in the corresponding coordinate positions. Expanding gives:

\[ \begin{aligned} \boldsymbol{c} &= \boldsymbol{a} \times \boldsymbol{b} \\ &= (y_1z_2 - y_2z_1)\boldsymbol{i} + (z_1x_2 - z_2x_1)\boldsymbol{j} + (x_1y_2 - x_2y_1)\boldsymbol{k} \\ &= (y_1z_2 - y_2z_1, z_1x_2 - z_2x_1, x_1y_2 - x_2y_1) \end{aligned} \]

Properties

  1. The outer product is a bilinear operation that is linear in each of the two vectors. Specifically, the outer product satisfies:

    \[ \begin{aligned} (\boldsymbol{a} + \boldsymbol{b}) \times \boldsymbol{c} &= \boldsymbol{a} \times \boldsymbol{c} + \boldsymbol{b} \times \boldsymbol{c} \\ \boldsymbol{a} \times (\boldsymbol{b} + \boldsymbol{c}) &= \boldsymbol{a} \times \boldsymbol{b} + \boldsymbol{a} \times \boldsymbol{c} \\ (\lambda \boldsymbol{a}) \times \boldsymbol{b} &= \lambda (\boldsymbol{a} \times \boldsymbol{b}) \\ \boldsymbol{a} \times (\lambda \boldsymbol{b}) &= \lambda (\boldsymbol{a} \times \boldsymbol{b}) \end{aligned} \]

    The first two lines can also be called the distributive law, meaning the outer product satisfies the distributive law over vector addition.

  2. The outer product satisfies the anti-commutative law:

    \[ \boldsymbol a \times \boldsymbol b=-\boldsymbol b \times \boldsymbol a \]
  3. Based on the geometric definitions of inner and outer products above:

    \[ \begin{aligned} |\boldsymbol a \times \boldsymbol b| &= |\boldsymbol a| |\boldsymbol b| \sin \langle \boldsymbol a, \boldsymbol b \rangle \\ \boldsymbol a \cdot \boldsymbol b &= |\boldsymbol a| |\boldsymbol b| \cos \theta \\ &= |\boldsymbol a| |\boldsymbol b| \cos \langle \boldsymbol a, \boldsymbol b\rangle \end{aligned} \]

    the following identity can be written:

    \[ (\boldsymbol a\times \boldsymbol b) \cdot (\boldsymbol a\times \boldsymbol b) = |\boldsymbol a|^2 |\boldsymbol b|^2-{(\boldsymbol a \cdot \boldsymbol b)}^2 \]
  4. The outer product satisfies the Jacobi identity:

    \[ \boldsymbol a \times (\boldsymbol b \times \boldsymbol c) + \boldsymbol b \times (\boldsymbol c \times \boldsymbol a) + \boldsymbol c \times (\boldsymbol a \times \boldsymbol b) = \boldsymbol 0 \]

Applications

Below are some common applications of the outer product operation.

  1. Determining if two vectors are collinear:

    \[ \exists\lambda \in \mathbf{R} (\boldsymbol{a} = \lambda \boldsymbol{b}) \iff \boldsymbol{a} \times \boldsymbol{b} = \boldsymbol{0} \]

    That is, the outer product of two collinear three-dimensional vectors is \(\boldsymbol 0\); the outer product of a three-dimensional vector with itself is \(\boldsymbol 0\); the outer product of a three-dimensional vector with the zero vector is \(\boldsymbol 0\). If using the outer product being zero as the definition of collinearity, it follows that the zero vector is collinear with any vector.

  2. Calculating the area of the parallelogram spanned by two vectors:

    \[ S \langle \boldsymbol a, \boldsymbol b \rangle = |\boldsymbol a \times \boldsymbol b| \]

The Case of Two-Dimensional Vectors

For two-dimensional vectors, the outer product cannot be computed, but the area of the parallelogram spanned by two vectors can still be calculated:

Let \(\boldsymbol{a} = (m, n), \boldsymbol{b} = (p, q)\). Extend the planar Cartesian coordinate system to a spatial Cartesian coordinate system, with the original plane lying in the \(xOy\) plane of the new coordinate system. The original coordinates \((m, n)\) and \((p, q)\) become \((m, n, 0)\) and \((p, q, 0)\).

Then the outer product of the two vectors is \((0, 0, mq - np)\), so the area of the parallelogram is \(|mq - np|\), which can be viewed as the absolute value of the result of a second order determinant operation.

At this point, based on the right-hand rule and the sign of the \(z\) coordinate, the direction of \(\boldsymbol b\) relative to \(\boldsymbol a\) can be inferred: if it is counterclockwise, the \(z\) coordinate is positive; otherwise, it is negative. This can be summarized as clockwise negative, counterclockwise positive.

Scalar Triple Product

Like the outer product, the scalar triple product of vectors is an operation specific to three-dimensional vectors.

Definition

Let \(\boldsymbol a, \boldsymbol b, \boldsymbol c\) be three vectors in three-dimensional space. Then \((\boldsymbol a \times \boldsymbol b) \cdot \boldsymbol c\) is called the scalar triple product of the three vectors \(\boldsymbol a, \boldsymbol b, \boldsymbol c\), denoted as \([\boldsymbol a \boldsymbol b \boldsymbol c]\) or \((\boldsymbol a, \boldsymbol b, \boldsymbol c)\) or \((\boldsymbol a \boldsymbol b \boldsymbol c)\) or \(\det(\boldsymbol a, \boldsymbol b, \boldsymbol c)\). The absolute value \(|(\boldsymbol a \times \boldsymbol b) \cdot \boldsymbol c|\) geometrically represents the volume of the parallelepiped with \(\boldsymbol a, \boldsymbol b, \boldsymbol c\) as edges.

The scalar triple product of vectors can be expressed using a third order determinant:

\[ \begin{aligned} (\boldsymbol a \times \boldsymbol b) \cdot \boldsymbol c &= \det(\boldsymbol a, \boldsymbol b, \boldsymbol c) \\ &= \begin{vmatrix} a_x & b_x & c_x \\ a_y & b_y & c_y \\ a_z & b_z & c_z \end{vmatrix} \\ &= a_x b_y c_z + a_y b_z c_x + a_z b_x c_y - a_z b_y c_x -a _y b_x c_z - a_x b_z c_y \end{aligned} \]

Properties

  1. The scalar triple product is linear in each of the three vectors. Specifically:

    \[ \begin{aligned} \det(\lambda\boldsymbol{u} + \mu\boldsymbol{v}, \boldsymbol{b}, \boldsymbol{c}) &= \lambda\det(\boldsymbol{u}, \boldsymbol{b}, \boldsymbol{c}) + \mu\det(\boldsymbol{v}, \boldsymbol{b}, \boldsymbol{c}) \\ \det(\boldsymbol{a}, \lambda\boldsymbol{u} + \mu\boldsymbol{v}, \boldsymbol{c}) &= \lambda\det(\boldsymbol{a}, \boldsymbol{u}, \boldsymbol{c}) + \mu\det(\boldsymbol{a}, \boldsymbol{v}, \boldsymbol{c}) \\ \det(\boldsymbol{a}, \boldsymbol{b}, \lambda\boldsymbol{u} + \mu\boldsymbol{v}) &= \lambda\det(\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{u}) + \mu\det(\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{v}) \end{aligned} \]
  2. The scalar triple product is antisymmetric. Exchanging the positions of two vectors changes the scalar triple product to its opposite. Therefore:

    \[ \det(\boldsymbol a, \boldsymbol b, \boldsymbol c) = \det(\boldsymbol b, \boldsymbol c, \boldsymbol a) = \det(\boldsymbol c, \boldsymbol a, \boldsymbol b) = -\det(\boldsymbol b, \boldsymbol a, \boldsymbol c) = -\det(\boldsymbol a, \boldsymbol c, \boldsymbol b)= -\det(\boldsymbol c, \boldsymbol b, \boldsymbol a) \]

    From this, the following relationship between the inner product and outer product can also be obtained:

    \[ (\boldsymbol a \times \boldsymbol b) \cdot \boldsymbol c = \boldsymbol a \cdot (\boldsymbol b \times \boldsymbol c) \]

Applications

The scalar triple product of vectors has the following common applications.

  1. Calculating the volume of tetrahedron \(ABCD\):

    \[ V=\frac{1}{6}\left|\det(\overrightarrow{AB}, \overrightarrow{AC}, \overrightarrow{AD})\right| \]
  2. Determining whether \(\boldsymbol a, \boldsymbol b, \boldsymbol c\) are coplanar;

    Three three-dimensional vectors \(\boldsymbol a, \boldsymbol b, \boldsymbol c\) are coplanar if and only if \(\det(\boldsymbol a, \boldsymbol b, \boldsymbol c)=0\).

  3. Determining the handedness of the coordinate system formed by \(\boldsymbol a, \boldsymbol b, \boldsymbol c\);

    The sign of the scalar triple product \(\det(\boldsymbol a, \boldsymbol b, \boldsymbol c)\), whether positive or negative, depends on whether the angle between \(\boldsymbol a \times \boldsymbol b\) and \(\boldsymbol c\) is acute or obtuse, i.e., whether it points to the same side or the opposite side of the plane spanned by \(\boldsymbol a\) and \(\boldsymbol b\). This corresponds to whether the three vectors \(\boldsymbol a, \boldsymbol b, \boldsymbol c\) in order form a right-handed or left-handed system. Specifically:

    • \(\det(\boldsymbol a, \boldsymbol b, \boldsymbol c) < 0\) is equivalent to \(\boldsymbol a, \boldsymbol b, \boldsymbol c\) forming a left-handed system in order;
    • \(\det(\boldsymbol a, \boldsymbol b, \boldsymbol c) > 0\) is equivalent to \(\boldsymbol a, \boldsymbol b, \boldsymbol c\) forming a right-handed system in order.

Vector Triple Product

The scalar triple product of three-dimensional vectors is a mix of inner and outer products and has cyclic symmetry. The outer product of three-dimensional vectors with three-dimensional vectors still yields a three-dimensional vector. Are there related conclusions for the outer product of outer products?

First, prove a lemma.

\[ (\boldsymbol a \times \boldsymbol b)\times \boldsymbol a = (\boldsymbol a \cdot \boldsymbol a) \boldsymbol b - (\boldsymbol a \cdot \boldsymbol b) \boldsymbol a \]

Proof: By the right-hand rule, \(\boldsymbol a \times \boldsymbol b\) is perpendicular to both \(\boldsymbol a\) and \(\boldsymbol b\). The left side of the equation to be proved is perpendicular to \(\boldsymbol a \times \boldsymbol b\), so the left side of the equation to be proved is coplanar with \(\boldsymbol a\) and \(\boldsymbol b\).

Therefore, we can assume:

\[ (\boldsymbol a \times \boldsymbol b)\times \boldsymbol a = \lambda \boldsymbol a + \mu \boldsymbol b \]

Based on related conclusions about the scalar triple product, taking the inner product of both sides of the above equation with \(\boldsymbol a\) and \(\boldsymbol b\) respectively gives:

\[ \begin{aligned} \lambda (\boldsymbol a \cdot \boldsymbol a)+\mu (\boldsymbol a \cdot \boldsymbol b) &= 0 \\ \lambda (\boldsymbol a \cdot \boldsymbol b) + \mu (\boldsymbol b \cdot \boldsymbol b) &= \det(\boldsymbol b, \boldsymbol a \times \boldsymbol b, \boldsymbol a) \\ &= (\boldsymbol a \times \boldsymbol b) \cdot (\boldsymbol a \times \boldsymbol b) \end{aligned} \]

From the identity derived earlier:

\[ (\boldsymbol a \times \boldsymbol b) \cdot (\boldsymbol a \times \boldsymbol b) = |\boldsymbol a|^2|\boldsymbol b|^2-(\boldsymbol a \cdot \boldsymbol b)^2 \]

We can solve:

\[ \begin{aligned} \lambda &= -\boldsymbol a \cdot \boldsymbol b \\ \mu &= \boldsymbol a \cdot \boldsymbol a \end{aligned} \]

Q.E.D.

In the proof above, it was mentioned that \(\boldsymbol a \times \boldsymbol b\) cross-multiplied with any vector yields a vector coplanar with \(\boldsymbol a\) and \(\boldsymbol b\). Next, we prove the conclusion for the vector triple product:

\[ (\boldsymbol a\times \boldsymbol b)\times \boldsymbol c=(\boldsymbol a \cdot \boldsymbol c)\boldsymbol b - (\boldsymbol b \cdot \boldsymbol c)\boldsymbol a \]

The coplanarity mentioned above helps in memorizing the vector triple product conclusion. It can be seen that the lemma above is a special case of the vector triple product.

Proof: Here we only need to consider the case where all three vectors are non-zero and non-collinear; other special cases are obvious.

The three-dimensional vectors \(\boldsymbol a\), \(\boldsymbol b\), and \(\boldsymbol a \times \boldsymbol b\) are not coplanar, so we can assume:

\[ \boldsymbol c = \alpha \boldsymbol a + \beta \boldsymbol b + \gamma(\boldsymbol a \times \boldsymbol b) \]

Thus:

\[ \begin{aligned} (\boldsymbol a \times \boldsymbol b) \times \boldsymbol c &= (\boldsymbol a \times \boldsymbol b) \times (\alpha \boldsymbol a + \beta \boldsymbol b + \gamma(\boldsymbol a \times \boldsymbol b)) \\ &= \alpha(\boldsymbol a \times \boldsymbol b) \times \boldsymbol a + \beta(\boldsymbol a \times \boldsymbol b) \times \boldsymbol b \end{aligned} \]

According to the lemma above:

\[ \begin{aligned} (\boldsymbol a \times \boldsymbol b) \times \boldsymbol a &=(\boldsymbol a \cdot \boldsymbol a) \boldsymbol b - (\boldsymbol a \cdot \boldsymbol b) \boldsymbol a \\ (\boldsymbol a \times \boldsymbol b) \times \boldsymbol b &= -(\boldsymbol b \times \boldsymbol a) \times \boldsymbol b \\ &= -(\boldsymbol b \cdot \boldsymbol b)\boldsymbol a+(\boldsymbol a \cdot \boldsymbol b) \boldsymbol b \end{aligned} \]

Therefore:

\[ \begin{aligned} (\boldsymbol a \times \boldsymbol b) \times \boldsymbol c &= \alpha((\boldsymbol a \cdot \boldsymbol a)\boldsymbol b - (\boldsymbol a \cdot \boldsymbol b)\boldsymbol a) + \beta((\boldsymbol a \cdot \boldsymbol b)\boldsymbol b - (\boldsymbol b \cdot \boldsymbol b)\boldsymbol a) \\ &=(\alpha(-\boldsymbol a \cdot \boldsymbol b) + \beta(-\boldsymbol b \cdot \boldsymbol b))\boldsymbol a + (\alpha \boldsymbol a \cdot \boldsymbol a + \beta \boldsymbol a \cdot \boldsymbol b)\boldsymbol b \\ &= (\boldsymbol a \cdot \boldsymbol c) \boldsymbol b - (\boldsymbol b \cdot \boldsymbol c) \boldsymbol a \end{aligned} \]

Q.E.D.

Based on the anti-commutativity of the outer product, we can obtain two formulas for the vector triple product:

\[ \begin{aligned} (\boldsymbol a\times \boldsymbol b)\times \boldsymbol c &=(\boldsymbol a \cdot \boldsymbol c)\boldsymbol b - (\boldsymbol b \cdot \boldsymbol c)\boldsymbol a \\ \boldsymbol a \times(\boldsymbol b \times \boldsymbol c) &= (\boldsymbol a \cdot \boldsymbol c)\boldsymbol b - (\boldsymbol a \cdot \boldsymbol b)\boldsymbol c \end{aligned} \]

It can be seen that the vector triple product has strict requirements on the order of operations.

Using the scalar triple product and vector triple product, Lagrange's identity can also be proven.

\[ (\boldsymbol a \times \boldsymbol b) \cdot (\boldsymbol c \times \boldsymbol d)=(\boldsymbol a \cdot \boldsymbol c)(\boldsymbol b \cdot \boldsymbol d)-(\boldsymbol a \cdot \boldsymbol d)(\boldsymbol b \cdot \boldsymbol c) \]

Proof:

\[ \begin{aligned} (\boldsymbol a \times \boldsymbol b) \cdot (\boldsymbol c \times \boldsymbol d) &= \det(\boldsymbol c, \boldsymbol d, \boldsymbol a \times \boldsymbol b) \\ &= \det(\boldsymbol a \times \boldsymbol b, \boldsymbol c, \boldsymbol d) \\ &= ((\boldsymbol a \times \boldsymbol b)\times \boldsymbol c)\cdot \boldsymbol d \\ &= (\boldsymbol b(\boldsymbol a \cdot \boldsymbol c)- \boldsymbol a(\boldsymbol b \cdot \boldsymbol c))\cdot \boldsymbol d \\ &= (\boldsymbol a \cdot \boldsymbol c)(\boldsymbol b \cdot \boldsymbol d) - (\boldsymbol a \cdot \boldsymbol d)(\boldsymbol b \cdot \boldsymbol c) \end{aligned} \]

It can be seen that the earlier identity

\[ (\boldsymbol a \times \boldsymbol b) \cdot (\boldsymbol a \times \boldsymbol b) = |\boldsymbol a|^2|\boldsymbol b|^2 - (\boldsymbol a \cdot \boldsymbol b)^2 \]

is a special case of Lagrange's identity.