cross

Cross product operator.

Syntax

vec_expr_1 cross vec_expr_2

Operands

vec_expr_1, vec_expr_2
A pair of valid vector expressions. Each vector must contain three elements.

Example

Expression Result
{{1, 0, 0} cross {0, 1, 0}} 0, 0, 1
{{1, 2, 3} cross {2, 4, 6}} 0, 0, 0

Comments

The result is the cross product of vec_expr_1 and vec_expr_2. The resultant vector contains three elements and is normal to both vec_expr_1 and vec_expr_2. If vec_expr_1 and vec_expr_2 are parallel vectors, the result is a vector whose elements are zero.