Chris Cai's Tech Blog

博客园 首页 新随笔 联系 订阅 管理

Dot Prodcut

The dot product (inner product) of two vectors is a measure of how similar the two vectors are (how much one is projected onto the other), multiplied by the magnitudes. Two vectors that are orthogonal don't have any amount of the other per say, so the dot product is zero. If they are parallel it's just the product of the magnitude. a.b = |a||b|cos(angle)


A matrix operating on a vector is just a series of inner products. Each row or column inner producted with the vector. Matrix multiplication is an array of inner products.

You can also inner product functions together as a way of determining 'how much' of one function is in another. For example you can take a periodic function, and pull out the different frequencies, this is the foundation of Fourier Analysis.

In Tensor Algebra you can inner product things together in any way you want.

 

Cross Product

 

The cross product of two vectors yields a third vector in three-dimensional space. The resulting vector is perpendicular to both the cross-multiplied vectors. This mathematical operation is common in engineering equations and vector calculus.

 

The cross product only works in 3D. It takes two vectors as input v1 and v2, and returns a vector c. The returned vector will be perpendicular to both the input vectors. The length of the vector is equal to the product of the lengths of the input vectors and the sine of the angle between them. So, if the two input vectors are parallel, the length of the output vector will be zero.

 

By convention, the cross product creates a right-handed system in three-dimensional space. The negative of a cross product creates a left-handed system in three-dimensional space. 

计算的时候,如果在左手坐标系,就按照左手法则进行判断,否则,用右手。

posted on 2009-11-14 11:53  Chris Cai  阅读(487)  评论(0编辑  收藏  举报