2017/06/13

Vectors 向量

dot product / scalar product / inner product / projection product 點積/內積/純量積 a·b
A·B = |A| |B| cos(θ)
AB = |A| cos(θ)

For vectors a = (a1, a2, ..., an) and b = (b1, b2, ..., bn) ,

a·b = a1b1 + a2b2 + ... + anbn

For example, vectors a = (1, 2, 3) and b = (0, 4, 5),

a·b = 1×0 + 2×4 + 3×5 = 23

Matlab code:

>> a = [1 2 3];
>> b = [0 4 5];
>> dot(a,b)

ans =

    23

cross product/vector product 點積/向量積 a×b

參考資料

內積與外積

沒有留言:

張貼留言