Lesson: Deriving the 3D cross product from duality
The 2D cross product was one signed number. The 3D cross product is a whole vector, and its formula is the kind of thing textbooks ask you to memorize:
v × w = [ v_y·w_z - v_z·w_y , v_z·w_x - v_x·w_z , v_x·w_y - v_y·w_x ]Three components, each a different criss-cross of multiplications. Where does that come from? Why those products in that arrangement? This lesson answers that, and the answer is the most satisfying derivation in the whole track. We will not memorize this formula. We will build it from two ideas you already have: duality from the dot-product lesson, and the determinant as signed volume. Done right, the formula assembles itself.
What we are aiming at
Section titled “What we are aiming at”First, what the 3D cross product the first vector cross the second vector should be, described geometrically. It is the vector with three properties:
- Perpendicular to both the first vector and the second vector. It points straight out of the plane those two vectors span.
- Length equal to the area of the parallelogram the first vector and the second vector span (which is the length of the first vector times the length of the second vector times the sine of theta).
- Direction by the right-hand rule. Curl the fingers of your right hand from the first vector toward the second vector; your thumb points along the first vector cross the second vector.
That is the target. Now watch it emerge from a single clean idea.
A volume function in disguise
Section titled “A volume function in disguise”Fix the two vectors, the first and the second. Now define a volume function that takes in a third vector, the input, and returns a number:
f(p) = signed volume of the parallelepiped spanned by p, v, and wA parallelepiped is the 3D version of a parallelogram, a slanted box, and three vectors from the origin define one. So the volume function eats a 3D input vector and outputs a single number, the signed volume. That is a function from 3D to 1D, the same shape as the dot product and the same shape as the 2D cross product.
From the determinant lesson, the signed volume of the box spanned by three vectors is the determinant of the matrix whose columns are those vectors:
f(p) = det([ p | v | w ])This is the direct 3D generalization of “2D determinant equals signed area.” A 3x3 determinant is signed volume.
The function is linear
Section titled “The function is linear”Here is the quietly important fact: the volume function is linear in the input. Scale the input by 2 and the box gets twice as tall over the same base spanned by the first and second vectors, so its volume doubles. Add two inputs and the volumes add. (Both follow from the determinant being linear in each of its columns, which is a property the determinant always has.) So the volume function is a genuine linear transformation from 3D to a single number.
Duality returns
Section titled “Duality returns”Now the move from the dot-product lesson, lifted one dimension. There we saw that any linear function from a space to a single number is secretly a dot product: there is one specific vector you are dotting against, and the function is a 1-row matrix, which is that vector lying on its side.
That was in 2D, but the insight does not care about dimension. Every linear function from 3D to a single number is a dot product with some unique 3D vector. Our the volume function is exactly such a function. So there must be one specific vector, call it the result vector, with
u · p = f(p) = signed volume of [ p | v | w ] for every pThat result vector is forced into existence by duality. It is the vector that, dotted with any input, gives the signed volume of the box that input makes with the first and second vectors.
That result vector is the definition of the first vector cross the second vector. The cross product is not “memorize these criss-crossed products.” It is “the unique vector whose dot with any input returns the signed volume of that input together with the first and second vectors.” Everything else is reading off what that vector must be.
Reading off the formula
Section titled “Reading off the formula”To find the components of the result vector, we compute the determinant of the matrix with columns the input vector, the first vector, the second vector the long way and compare it to the result vector dot the input vector, which is u-x times p-x plus u-y times p-y plus u-z times p-z.
Expanding the determinant along the first column (the input-vector column) gives a sum of three terms, one per component of the input vector:
det([p | v | w]) = p_x·(v_y·w_z - v_z·w_y) - p_y·(v_x·w_z - v_z·w_x) + p_z·(v_x·w_y - v_y·w_x)Each the input vector component is multiplied by a little 2x2 determinant built from the first vector and the second vector. Now set this equal to the result vector dot the input vector and match the coefficient of each the input vector component:
u_x = v_y·w_z - v_z·w_yu_y = v_z·w_x - v_x·w_z (the middle term's minus sign folded in)u_z = v_x·w_y - v_y·w_xThat is the formula from the top of the lesson, and we did not memorize a thing. It is just the list of coefficients you get when you write the signed-volume function as a dot product. The criss-cross pattern is the cofactor expansion of a determinant, nothing more.
The three properties fall out
Section titled “The three properties fall out”The geometric properties we were aiming at are now automatic consequences, not extra facts to check.
Perpendicular to the first vector and the second vector. What is the result vector dot the first vector? By construction it is the signed volume of the box with columns the first vector, the first vector, the second vector, a parallelepiped with two identical edges. A box that uses the same vector twice is flat: it has zero volume. So the result vector dot the first vector equals 0, which means the result vector is perpendicular to the first vector. The same argument with the second vector gives the result vector dot the second vector equals 0. The cross product is perpendicular to both inputs because a degenerate box has no volume.
Length equals the parallelogram’s area. Point the input in the direction of the result vector itself, as a unit vector. Then the result vector dot the input equals the length of the result vector. But that quantity is also the volume of the box with that unit input as one edge and the first and second vectors as the others. Since the input is perpendicular to the plane of the first and second vectors and has length 1, that box is a prism of height 1 sitting on the parallelogram base, so its volume equals the base area. Therefore the length of the result vector equals the area of the parallelogram spanned by the first and second vectors.
Right-hand direction. The sign convention in “signed volume” is the right-handed one, so the result vector comes out pointing in the direction that makes the volume positive, which is exactly the right-hand rule.
All three target properties, derived from one definition. That is the payoff: the cross product is the vector duality hands you when you ask for the signed-volume function, and its famous behavior is forced, not assumed.
Worked examples
Section titled “Worked examples”The standard basis. Compute the cross product of i-hat and j-hat, the vectors 1, 0, 0 and 0, 1, 0, component by component:
i-hat × j-hat = [1, 0, 0] × [0, 1, 0] 1st component: (0)(0) - (0)(1) = 0 2nd component: (0)(0) - (1)(0) = 0 3rd component: (1)(1) - (0)(0) = 1 = [0, 0, 1] = k-hatSo i-hat cross j-hat is k-hat. The right-hand rule agrees: curling from the x-axis to the y-axis, the thumb points along the z-axis. And swapping gives j-hat cross i-hat equals 0, 0, negative-1, which is negative k-hat: anti-commutativity, the sign flip from the previous lesson, still here in 3D.
A general pair, with the perpendicular check. Compute the cross product of 1, 2, 3 and 4, 5, 6:
[1, 2, 3] × [4, 5, 6]: 1st: (2)(6) - (3)(5) = 12 - 15 = -3 2nd: (3)(4) - (1)(6) = 12 - 6 = 6 3rd: (1)(5) - (2)(4) = 5 - 8 = -3 = [-3, 6, -3]Now verify it is perpendicular to both inputs by dotting:
[-3, 6, -3] · [1, 2, 3] = -3 + 12 - 9 = 0[-3, 6, -3] · [4, 5, 6] = -12 + 30 - 18 = 0Both zero, exactly as the derivation promised.
Length as area. Compute the cross product of 2, 0, 0 and 0, 3, 0:
[2, 0, 0] × [0, 3, 0]: 1st: (0)(0) - (0)(3) = 0 2nd: (0)(0) - (2)(0) = 0 3rd: (2)(3) - (0)(0) = 6 = [0, 0, 6]The result has length 6. The parallelogram spanned by 2, 0, 0 and 0, 3, 0 is a 2-by-3 rectangle in the xy-plane, area 6. Length matches area, the second property confirmed in numbers.
Why this matters when you use AI
Section titled “Why this matters when you use AI”As with the previous lesson, the honest note: the 3D cross product is not a daily tool in mainstream deep learning the way the dot product is. It earns its place in physics-informed neural networks that model fluid flow or electromagnetism, in 3D geometric deep learning over meshes and point clouds, and in robotics, where torques and angular velocities are cross products. The perpendicular-direction idea also feeds into the quaternion rotations used in some 3D pose-estimation networks.
But the deeper takeaway is the method, not the formula. You just watched duality, the same idea that explained the dot product, reach up a dimension and manufacture a vector out of a volume function. That pattern, “a linear map to numbers is secretly a vector,” recurs throughout mathematics and the theory underneath machine learning. Seeing it build the cross product is a clean example of how the abstract idea pays off concretely.
Common pitfalls
Section titled “Common pitfalls”Trying to memorize the criss-cross. The formula is the cofactor expansion of a determinant. If you remember “the cross product is the vector whose dot with the input vector gives the volume of the box with columns the input vector, the first vector, the second vector,” you can reconstruct the components any time, instead of memorizing a pattern that is easy to scramble.
Forgetting it is a vector in 3D. Unlike the 2D cross product (a number), the 3D cross product is a 3D vector. The output has a direction, perpendicular to both inputs, not just a magnitude.
Mixing up the order. The cross product is still anti-commutative: the first vector cross the second vector equals negative the second vector cross the first vector. Swapping the inputs reverses the perpendicular direction (the right-hand rule flips), so the result points the opposite way.
Expecting perpendicularity to be an extra rule. It is not bolted on; it is forced. The quantity the result vector dot the first vector is the volume of a box with a repeated edge, which is zero, so perpendicularity is a consequence of the definition, not a separate axiom.
What you should remember
Section titled “What you should remember”- The 3D cross product, the first vector cross the second vector, is the unique vector (the result vector) whose dot with any input equals the signed volume of the parallelepiped spanned by that input, the first vector, and the second vector, for every input. That definition, via duality, is the whole thing.
- Its formula is read off by expanding the determinant of the matrix with columns the input vector, the first vector, the second vector and matching to the result vector dot the input vector. The criss-cross components are cofactor terms, not something to memorize:
v × w = [ v_y·w_z - v_z·w_y , v_z·w_x - v_x·w_z , v_x·w_y - v_y·w_x ]- The three geometric properties are automatic: perpendicular to both inputs (a box with a repeated edge has zero volume), length equal to the parallelogram’s area (a unit-height prism on that base), and right-hand direction (from the signed-volume convention).
The cross product is what duality produces when you feed it a volume. We derived the formula instead of memorizing it, and its perpendicularity and length came along for free. The next lesson uses these same determinant-as-volume ideas to crack open how linear systems get solved, through Cramer’s rule.