How to find the dot product using the law of cosines 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$
 A: $$\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$$
A: $$\vec{AB}=\vec{AC}+\vec{CB}$$
and
$$\vec{AC}\cdot\vec{AB}=\vec{AB}^2-\vec{CB}\cdot\vec{AB}=9-3\cdot2\cdot\cos60°=6.$$
A: As per given question, here is the parallelogram -

$\angle ABC = 60^0$. That means the angle between $\vec{AB}$ and $\vec{BC}$ is $120^0$ (basically the angle between $\vec{AB}$ and $\vec{AD}$.
Now the given answer would have been right if $\angle ABC$ was $120^0$. See the below diagram. You can see the angle between $\vec{AB}$ and $\vec{BC}$ is now $60^0$.
You can also visually compare size of $AC$ in both cases.

