The triple product combines three vectors into one scalar: d = a · (b × c). Geometrically, it is the signed volume of the parallelepiped spanned by a, b, and c. It is also called the box product. section 9.4 section 9.4.1
Compute the cross product first, then dot its vector result with the remaining vector. The equivalent form (a × b) · c gives the same result, but a dot product cannot come first because it produces a scalar rather than a vector. section 9.4 section 9.4.1
Operand order carries orientation information:
- Cyclic rotations preserve the signed volume: (a × b) · c = (c × a) · b = (b × c) · a. section 9.4.4
- Swapping any pair reverses the sign, representing the inverted orientation of the same-shaped parallelepiped. section 9.4.1 section 9.4.4
- A determinant formed from the three vector coordinates provides an alternative way to calculate the same volume. section 9.4.1
Three unit coordinate vectors form a parallelepiped with volume 1, making the scalar result visible as a concrete 3D volume. section 9.4.1
Distance from a point to a plane
Let p1, p2, and p3 define a plane, and let p be the query point. Form two base edges, p2 − p1 and p3 − p1, plus p − p1. Their triple product gives signed volume; divide its magnitude by the length of the base cross product to obtain the point-to-plane distance. Reusing that cross product makes the computation light. section 9.4.3
SymPy calculation
SymPy has no dedicated triple-product operation, but dot and cross compose directly: a.dot(b.cross(c)). With operator abbreviations, write a & (b ^ c); parentheses are required because Python evaluates & before ^. section 9.4.2
The same geometric idea extends beyond 3D: the resulting scalar represents signed N-dimensional volume of an N-dimensional parallelotope. In practice, 2D and 3D remain the usual working spaces, while determinants retain the generalized volume interpretation. section 9.5.1 section 9.8
