Tool to calculate the cross product (or vector product) from 2 vectors in 3D not collinear (Euclidean vector space of dimension 3)
Cross Product - dCode
Tag(s) : Matrix
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The cross product (or vector product) is an operation on 2 vectors $ \vec{u} $ and $ \vec{v} $ of 3D space (not collinear) whose result noted $ \vec{u} \times \vec{v} = \vec{w} $ (or sometimes $ \vec{u} \wedge \vec{v} $) is an orthogonal vector to the first 2 vectors.
For any pair of vectors $ \vec{u} = (u_1, u_2, u_3) $ and $ \vec{v} = (v_1, v_2, v_3) $, the calculation of the cross product is given by: $$ \vec{u} \times \vec{v} = \begin{pmatrix} u_2v_3-u_3v_2 \\ u_3v_1-u_1v_3 \\ u_1v_2-u_2v_1 \end{pmatrix} $$
Example: Determine the vector cross product of $ \vec{a} = (1, 2, 3) $ and $ \vec{b} = (4, 5, 6) $ by calculating $$ \vec{a} \times \vec{b} = \begin{pmatrix} 2 \times 6 - 3 \times 5 \\ 3 \times 4 - 1 \times 6 \\ 1 \times 5 - 2 \times 4 \end{pmatrix} = \begin{pmatrix} -3 \\ 6 \\ -3 \end{pmatrix} $$
The calculation of the vector product makes it possible to:
— check if 2 vectors are collinear (then their vector product is the zero vector)
— calculate a vector orthonogal to the 2 others and thus create an orthonogal basis with the 3 vectors
— check that 2 vectors are orthogonal
— calculate the area of a parallelogram with sides $ \vec{u} $ and $ \vec{v} $ (the modulus of the vector product is equal to the area of the parallelogram)
The cross product is distributive with the addition:
$$ \vec{a} \times ( \vec{b} + \vec{c} ) = \vec{a} \times \vec{b} + \vec{a} \times \
ec{c} $$
The cross product is distributive with a scalar multiplication:
$$ \lambda (\vec{a} \times \vec{b}) = \lambda \vec{a} \times \vec{b} = \vec{a} \times \lambda \ vec{b} $$
The cross product is antisymmetric:
$$ \vec{a} \times \vec{b} = -\vec{b} \times \vec{a} $$
The norm (the modulus) of the vector product is defined by the formula:
$$ \| \vec{u} \times \vec{v} \| = \| \vec{u} \| \| \vec{v} \| \left| \sin ( \widehat{ \vec{u}, \vec{v} } ) \right| $$
dCode retains ownership of the "Cross Product" source code. Any algorithm for the "Cross Product" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Cross Product" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Cross Product" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Cross Product" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Cross Product on dCode.fr [online website], retrieved on 2025-04-16,