Geometry

Dot Product of Vectors

Dot product is also known as scalar product or inner product.

Algebraically, the dot product is the sum of the products of the corresponding entries of the two sequences of numbers.

ab=i=1naibi\bm{a}\cdot \bm{b} = \sum_{i=1}^na_ib_i

Geometrically, it is the product of the Euclidean magnitudes of the two vectors and the cosine of the angle between them.

ab=abcosθ\bm{a}\cdot \bm{b}=\lvert \bm{a}\rvert\lvert \bm{b}\rvert\cos\theta

Usage

  1. Calculate the angle between two vectors.

\bm{a}\times\bm{b}=\lvert\bm{a}\rvert\lvert\bm{b}\rvert\sin(\theta)\bm{n}

\frac{y_2-y_1}{x_2-x_1} = \frac{y_3-y_2}{x_3-x_2}

Toavoid:1.Theprecisionerrorwemightgetfromthedivisions2.DividebyzeroissueWecanusethefollowingequation:To avoid: 1. The precision error we might get from the divisions 2. Divide by zero issue We can use the following equation:

(y_2-y_1)\cdot(x_3-x_2) = (y_3-y_2)\cdot(x_2-x_1)

Last updated

Was this helpful?