Linear Algebra – How to Find the Dot Product Using the Law of Cosines?

euclidean-geometryinner-productslinear algebratrianglesvectors

I'm working with the following problem:

We have a triangle with sides $AB=3$ and $BC=2$, the angle $ABC$ is 60 degrees. Find the dot product $AC \cdotp AB$

Since we don't actually know the side $AC$ my first step is to calculate this side via the law of cosines.

$$AC^2=AB^2 +BC^2 -2AB\cdot BC\cos x$$
$$\implies AC^2=3^2 +2^2 -2\cdot2\cdot3\cos 60^\circ$$
$$\implies AC^2=9 +4 -12\cdot0.5$$
$$\implies AC^2=13-6=7$$
$$\implies AC=\sqrt 7.$$

My next step is to calculate the angle $BAC$; we should be able to use the law of cosines here as well:

$$BC^2=AB^2+AC^2-2\cdot AB\cdot AC\cos x$$
$$\implies4=9+(\sqrt 7)^2 -2\cdot3\sqrt 7\cos x$$
$$\implies4=9+7 -6\sqrt 7\cos x$$
$$\implies-2=-6\sqrt 7\cos x$$
$$\implies\frac{1}{3}=\sqrt 7\cos x$$
$$\implies\frac{1}{3\sqrt 7}=\cos x.$$

If we want to calculate our dot product using only the vector lengths, we would use the fact that $A\cdotp B=|A||B|\cos x$, which in this case would mean that:

$$AB \cdot AC=3\sqrt7\frac{1}{3\sqrt 7}=1,$$

which is quite wrong since the answer is supposed to be $12$.

Can someone please tell me where I've made a mistake?

In the proposed solution another method seem to be used. The textbook claims that $AB \cdotp AC = AB \cdotp (AB + BC)=AB \cdotp AB + AB \cdotp BC = |AB|^2 + |AB||BC|cos(60)=9+6*\frac{1}{2}=12$

Best Answer

$$\cos\measuredangle BAC=\frac{3^2+(\sqrt7)^2-2^2}{2\cdot3\cdot\sqrt7}=\frac{2}{\sqrt7},$$ which gives $$\vec{AC}\cdot\vec{AB}=3\cdot\sqrt7\cdot\frac{2}{\sqrt7}$$

In your solution this statement is wrong: $-2=-6\sqrt7\cos{x}$.

It should be $$-12=-6\sqrt7\cos{x}.$$ About you last adding.

It should be $$\vec{AB}\cdotp\vec{AC}=\vec{AB}\cdotp (\vec{AB} + \vec{BC})=\vec{AB}\cdotp\vec{AB}+\vec{AB}\cdotp\vec{BC} =$$ $$=|AB|^2+ |\vec{AB}||\vec{BC}|\cos120^{\circ}=9-6\cdot\frac{1}{2}=6$$

Related Question