From 0ae966a7d8bc3a8d3d9ee64b0b67df55a002fe51 Mon Sep 17 00:00:00 2001 From: Andrew Lorimer Date: Wed, 17 Oct 2018 10:38:26 +1100 Subject: [PATCH] vectors - 20c --- spec/vectors.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/spec/vectors.md b/spec/vectors.md index 5c6df9c..86bd95b 100644 --- a/spec/vectors.md +++ b/spec/vectors.md @@ -73,3 +73,27 @@ A vector of length 1. $\vec{i}$ and $\vec{j}$ are unit vectors. A unit vector in direction of $\vec{a}$ is denoted by $\hat{\vec{a}}$ +Also, unit vector of $\vec{a}$ can be defined by $\vec{a} \cdot {|\vec{a}|}$ + +## Scalar products / dot products + +If $\vec{a} = a_i \vec{i} + a_2 \vec{j}$ and $\vec{b} = b_i \vec{i} + b_2 \vec{j}$, the dot product is: +$$\vec{a} \cdot \vec{b} = a_1 b_1 + a_2 b_2$$ + +Produces a real number, not a vector. + +$$\vec{a} \cdot \vec{a} = |\vec{a}|^2$$ + +## Geometric scalar products + +$$\vec{a} \cdot \vec{b} = |\vec{a}| |\vec{b}| \cos \theta$$ + +where $0 \le \theta \le \pi$ + +## Perpendicular vectors + +If $\vec{a} \cdot \vec{b} = 0$, then $\vec{a} \perp \vec{b}$ (since $\cos 90 = 0$) + +## Finding angle between vectors + +$$\cos \theta = {{\vec{a} \cdot \vec{b}} \over {|\vec{a}| |\vec{b}|}} = {{a_1 b_1 + a_2 b_2} \over {|\vec{a}| |\vec{b}|}}$$ -- 2.47.1