One of the two ways to 'multiply' two [[Vector|vectors]]. $\huge\begin{align*} \vec u \cdot \vec v \end{align*}$ The dot product between two [[Vector|vectors]] is a [[Scalar]], the two vectors **must** have the same dimension. $\huge\begin{align*} \forall \vec{u},\vec{v} &\in \R^n \\ \vec u \cdot \vec v &= u_0v_{0}+u_1v_{1}+\cdots+u_n+v_{n}\\ &=\sum_{k=0}^{n} u_{k}v_{k} \\ \\ \vec u \cdot \vec v &= \norms{\vec u} \norms{\vec v} \cos (\theta) \\ \vec{v}\cdot\vec{v}&= \norms{\vec{v}}^2 \end{align*}$ Where $\theta$ is the smallest angle between $\vec u$ and $\vec v$. An alternative definition that extends better when working with higher dimensions. $\huge \vec u \cdot \vec v = {\vec u}^\intercal \vec v $ Where $^\intercal$ represents the [[Matrix Transpose|Transpose]] of the [[Vector|Column Vector]]. > [!note] Computation > *it is more computationally efficient to divide by product of magnitudes instead of normalizing the vectors* *In general*, the dot product of two vectors measures how "big" they are, and how much they "agree" with each other. ## Angles $\huge{\vec{u} \cdot \vec{v} > 0}$ if $\vec v$ and $\vec u$ are *acute*. $\huge{\vec{u} \cdot \vec{v} < 0}$ if $\vec v$ and $\vec u$ are *obtuse*. $\huge \vec{ u} \cdot \vec{v} = 0 \iff \vec{u} \perp \vec{v}$ *If and only if* the two vectors are [[Orthogonal]], then the dot product *will only be 0*. $\huge\begin{align*} \theta &= 90\degree \\ \vec u \cdot \vec v &= \parallel \vec u\parallel \parallel \vec v\parallel \cos (90\degree) \\ &= \parallel \vec u\parallel \parallel \vec v\parallel 0 \\ &= 0 \end{align*}$ If the two vectors are a $180\degree$ apart, then they their dot product is -1. ### Getting the angle The dot product can be rearranged as: $\huge\begin{align*} \cos \theta &= \frac{\vec u \cdot \vec v }{\parallel \vec u \parallel \parallel \vec v \parallel} \\ \theta &= \arccos \paren{\frac{\vec u \cdot \vec v }{\parallel \vec u \parallel \parallel \vec v \parallel} }\\ \cos \theta &= \hat u \cdot \hat v \\ \theta &= \arccos \paren{\hat u \cdot \hat v}\\ \end{align*}$ $\huge\begin{align*} \let a &= \norms{\vec u}^{2}\\ \let b &= \norms{\vec v}^{2}\\ \norms{\vec u}\norms{\vec v} &= \sqrt{a}\sqrt{b} &= \sqrt{ab} \\ &= \sqrt{\norms{\vec v}^{2}\norms{\vec u}^2} \end{align*}$ ## Relation to 0 Vector $\huge\vec{0} \cdot \vec{v} = 0$ *Most of the time*, it makes sense to count this as the [[Zero Vector]] being [[Orthogonal]] to all other vectors. >[!note] Physics Connection >$\huge W=Fd$ >Both *work* and *distance* are a vector, which means this formula can be translated to $W=F\cdot d$.