Vector Cross Product and Dot Product

Overview

Introduce vector mutiplication with applications.

1 Vector

Vector has magnitude and direction. Collinear vectors: vectors are parallel.

1.1 Cross Product

$$\vec{a}\times\vec{b}=|A||B|\sin{\theta}\vec{n}$$

\theta is the angle between vectors, \vec{n} is unit vector at right angles to vectors, direction follows right hand rule.

The Cross Product of two vector is another vector that is at right angles to both. The magnitude of the cross product equals the areas of parallelogram with both vectors. The magnitude reaches maximum length when both vectos are at right angles.

The cross product is the determinant of 3x3 matrix.

$$ a\times b=\det(i,j,k;a_1,a_2,a_3,b_1,b_2,b_3) $$ $$=(a_2b_3 - a_3,b_2)i+(a_3b_1 - a_1,b_3)j+(a_1b_2 - a_2,b_1)k$$

1.2 Dot Product

Cross product gives a vector answer, but Dot Product gives a scalar answer. It multiplies vectors' lengths together but only when they point in the same direction, so using \cos{\theta}. So if two vector are at right angle, result is zero.

$$ a\cdot b = |a||b|\cos{\theta} $$

2 Application

  1. To determine whether two vectors are:

    1. collinear: A=k*B, and k is a scalar; Cross product is zero vector (only applied to three-dimensional or spatial problems); Ratio of corresponding coordinates are equal.
    2. perpendicular: Dot product is zero.
  2. Calcualte the projection point C of point P onto the line segment AB.

    1. Vector AB, AP, dot product is D.
    2. D/|AB| = |AC|
    3. k = |AC|/|AB| = D/{|AB|^2}
    4. C = A + k\vec{AB}
  3. How to verify C is projection point:

    1. AC = k AB
    2. PCxAB=zero vector
  4. How to calculate the distance d between a point P to a line AB

    1. Cross product's norm is the area of the parallelogram spanned by two vectors. (AB X AP)
    2. The area also equas to distance d * |AB|
    3. d = |AB X AP|/|AB|

Code implementation of above steps:

comments powered by Disqus

Translations: