Thursday 20 March 2008

Dot product and Cross Product

Dot Product
A.B = |A||B|cos(angle)

A.B = a1b1 + a2b2 + a3b3
where A = [a1 a2 a3], B = [b1 b2 b3]

If A.B = 0, then |A|B|cos(angle) = 0,
acos(0) = 90degree.
Thus, A is perpendicular to B,

If A.B <> 90 degree
If A.B > 0, angle <>

** Dot product provides the length of the projection of one vector to another.
If A is going to project on to B, B must be normalised.

Cross Product
A x B = [(a2b3 - a3b2) (a3b1 - a1b3) (a1b2 - a2b1)]
where A = [a1 a2 a3], B = [b1 b2 b3]

A x B is perpendicular to both A and B.
A x B = -(B x A)

|A x B| = |A||B| sin(angle)

No comments: