首页 > 代码库 > 向量叉乘 Cross product
向量叉乘 Cross product
参考:Wiki Cross product
Coordinate notation
The standard basis vectors i, j, and k satisfy the following equalities in a right hand coordinate system:
which imply, by the anticommutativity of the cross product, that
The definition of the cross product also implies that
These equalities, together with the distributivity and linearity of the cross product (but both do not follow easily from the definition given above), are sufficient to determine the cross product of any two vectors u and v. Each vector can be defined as the sum of three orthogonal components parallel to the standard basis vectors:
Their cross product u × v can be expanded using distributivity:
This can be interpreted as the decomposition of u × v into the sum of nine simpler cross products involving vectors aligned with i, j, or k. Each one of these nine cross products operates on two vectors that are easy to handle as they are either parallel or orthogonal to each other. From this decomposition, by using the above-mentioned equalities and collecting similar terms, we obtain:
meaning that the three scalar components of the resulting vector s = s1i + s2j + s3k = u × v are
Using column vectors, we can represent the same result as follows:
Matrix notation[edit]
The cross product can also be expressed as the formal[note 1] determinant:
向量叉乘 Cross product