Definition:Angle Between Vectors

Definition
Let $\mathbf{v},\mathbf{w}$ be two non-zero vectors in $\R^n$.

Case 1
Suppose that $\mathbf{v}$ and $\mathbf{w}$ are not scalar multiples of each other:


 * $\neg \exists \lambda \in \R: \mathbf v = \lambda \mathbf w$

Then the angle between $\mathbf{v}$ and $\mathbf{w}$ is defined as follows:

Describe a triangle with lengths corresponding to $\left\Vert{ \mathbf{v} }\right\Vert$, $\left\Vert{ \mathbf{w} }\right\Vert$, and $\left\Vert{ \mathbf{v}-\mathbf{w} }\right\Vert$ (where $\left\Vert{\cdot}\right\Vert$ denotes vector length):


 * AngleBetweenTwoVectors.png

The angle formed between the two sides with lengths $\left\Vert{ \mathbf{v} }\right\Vert$ and $\left\Vert{ \mathbf{w} }\right\Vert$ is called the angle between vectors $\mathbf{v}$ and $\mathbf{w}$.

By convention, the angle is taken between $0$ and $\pi$.

Case 2
Suppose that $\mathbf{v}$ and $\mathbf{w}$ are scalar multiples of each other:


 * $\exists \lambda \in \R: \mathbf v = \lambda \mathbf w$

If $\lambda > 0$, then the angle between $\mathbf{v}$ and $\mathbf{w}$ is defined as a zero angle, that is, $\theta = 0$.

If $\lambda < 0$, then the angle between $\mathbf{v}$ and $\mathbf{w}$ is defined as a straight angle, that is, $\theta = \pi$.

(Note that $\lambda \ne 0$ because we have stipulated $\mathbf {v}$ and $\mathbf{w}$ as non-zero.)

Comment
If either $\mathbf{v}$ or $\mathbf{w}$ is zero, the angle between $\mathbf{v}$ and $\mathbf{w}$ is not defined.

Also note that in all cases, $0 \le \theta \le \pi$.

Also see

 * Angle Between Non-Zero Vectors Always Defined
 * Cosine Formula for Dot Product
 * Angle Between Vectors in Terms of Dot Product