The **cross product** of two vectors (not to be confused with dot product)
is a vector which is perpendicular plane
containing them. The cross product of vector \(\vec{V}\) and \(\vec{U}\) can
be calculated thanks to the following formula:

$$ \vec{V} \times \vec{U} = \left ( \begin{matrix} V_y.U_z - V_z.U_y \\ V_z.U_x - V_x.U_z \\ V_x.U_y - V_y.U_x \end{matrix} \right ) $$

Properties |
---|

If \(\vec{V}\) and \(\vec{U}\) are collinear, \(\vec{V} \times \vec{U}\) is a null vector. |

If \(\vec{V}\) is null, \(\vec{V} \times \vec{U}\) is a null vector. |

If \(\vec{U}\) is null, \(\vec{V} \times \vec{U}\) is a null vector. |

\(\vec{V} \times \vec{U}\) is normal to the plane containing the vectors \(\vec{V}\) and \(\vec{U}\). |

\(\vec{V} \times \vec{U}=-(\vec{U} \times \vec{V}) = (-\vec{U}) \times \vec{V}\). |

The following C++ function return the cross product of two vectors :

```
/*!
* \brief Compute the cross product of two vectors (this x V)
* The current vector is the first operand
* \param V is the second operand
* \return a vector = the cross product of the current vector by V
*/
inline rOc_vector rOc_vector::cross(const rOc_vector V)
{
rOc_vector Res;
Res.x()=this->y()*V.z() - this->z()*V.y();
Res.y()=this->z()*V.x() - this->x()*V.z();
Res.z()=this->x()*V.y() - this->y()*V.x();
return Res;
}
```

With MATLAB, the cross product can easily be computed with the function `cross(A, B)`

:

```
>> u=[1,2,3];
>> v=[4,5,6];
>> cross (u,v)
ans =
-3 6 -3
```

- Calculating the transformation between two set of points
- Catmull-Rom splines
- Check if a number is prime online
- Check if a point belongs on a line segment
- Common derivatives rules
- Common derivatives
- Dot product
- How to calculate the intersection points of two circles
- How to check if four points are coplanar?
- Common integrals (primitive functions)
- Least square approximation with a second degree polynomial
- Least-squares fitting of circles
- Least-squares fitting of sphere
- The mathematics behind PCA
- Online quadratic equation solver
- Online square root simplifyer
- Sines, cosines and tangeantes of common angles
- Singular value decomposition (SVD) of a 2×2 matrix
- Tangent line segments to circles
- Understanding covariance matrices
- Weighted PCA

Last update : 03/13/2022