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. Except explicit open source licence (indicated Creative Commons / free), the "Cross Product" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "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.) and all data download, script, or API access for "Cross Product" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!

Reminder : dCode is free to use.

The copy-paste of the page "Cross Product" or any of its results, is allowed (even for commercial purposes) as long as you cite dCode!

Exporting results as a .csv or .txt file is free by clicking on the *export* icon

Cite as source (bibliography):

*Cross Product* on dCode.fr [online website], retrieved on 2023-12-03,

cross,product,vector,3d,wedge,colinear,orthogonal

https://www.dcode.fr/cross-product

© 2023 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback