logo

The Relationship between the Dot Product of Two Vectors and the Angle Between Them 📂Mathematical Physics

The Relationship between the Dot Product of Two Vectors and the Angle Between Them

Theorem

Let the angle between two vectors a=(a1,a2,a3)\mathbf{a} = (a_{1}, a_{2}, a_{3}) and b=(b1,b2,b3)\mathbf{b} = (b_{1}, b_{2}, b_{3}) be θ\theta. Then, the following holds.

ab=abcosθ \mathbf{a} \cdot \mathbf{b} = |\mathbf{a}| |\mathbf{b}| \cos \theta

Here, ab\mathbf{a} \cdot \mathbf{b} is the dot product (inner product) of the two vectors.

Corollary

The necessary and sufficient condition for two non-zero vectors a\mathbf{a} and b\mathbf{b} to be orthogonal is as follows.

ab=0 \mathbf{a} \cdot \mathbf{b} = 0

Proof

Consider the diagram below. Vectors a\mathbf{a} and b\mathbf{b}, along with ab\mathbf{a} - \mathbf{b}, form a triangle.

Now, applying the law of cosines to this triangle, we obtain the following.

a2+b22abcosθ=ab2 |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2 |\mathbf{a}| |\mathbf{b}| \cos \theta = | \mathbf{a} - \mathbf{b} |^2

By the properties of the dot product aa=a2\mathbf{a} \cdot \mathbf{a} = | \mathbf{a} |^{2}, the equation becomes:

aa+bb2abcosθ=(ab)(ab)=aa2ab+bb \begin{align*} \mathbf{a} \cdot \mathbf{a} + \mathbf{b} \cdot \mathbf{b} - 2 |\mathbf{a}| |\mathbf{b}| \cos \theta &= (\mathbf{a} - \mathbf{b}) \cdot (\mathbf{a} - \mathbf{b}) \\ &= \mathbf{a} \cdot \mathbf{a} - 2 \mathbf{a} \cdot \mathbf{b} + \mathbf{b} \cdot \mathbf{b} \end{align*}

Eliminating the common terms yields:

ab=abcosθ \mathbf{a} \cdot \mathbf{b} = |\mathbf{a}| |\mathbf{b}| \cos \theta

Proof of the Corollary

()(\Longrightarrow)

Assume a\mathbf{a} and b\mathbf{b} are orthogonal. Then,

ab=abcosπ2=0 \mathbf{a} \cdot \mathbf{b} = |\mathbf{a}| |\mathbf{b}| \cos \frac{\pi}{2} = 0

Let ()(\Longleftarrow) and ab=0\mathbf{a} \cdot \mathbf{b} = 0 be true. Then,

abcosθ=0 |\mathbf{a}| |\mathbf{b}| \cos \theta = 0

Since a\mathbf{a} and b\mathbf{b} are non-zero vectors, a0|\mathbf{a}| \ne 0 and b0|\mathbf{b}| \ne 0 hold. Therefore,

cosθ=0    θ=π2 \cos\theta = 0 \implies \theta = \frac{\pi}{2}