<s>[INST] Angle between two 3D vectors is not what I expected. Using the definition of the dot product, you can find the angle between two vectors. I am experiencing an unexpected result, so my question is where did I go wrong.
I have two unit vectors in 3 dimensions. So the angle between these vectors would be just the inverse cosine of the dot product. I picked two unit vectors I know would be $45$ degrees from each other, dotted them, and took the inverse cosine.
$$\arccos\left(\left(\frac{\sqrt3}{3}, \frac{\sqrt3}{3}, \frac{\sqrt3}{3}\right) \cdot \left(\frac{\sqrt2}{2},\frac{\sqrt2}{2},0\right)\right)$$
Look here on Wolfram.
But it does not come out to be $45$ degrees, or $\dfrac{\pi}{4}$ radians. It comes out to be $.61$ which is not $\dfrac{\pi}{4}$. $\dfrac{\pi}{4}$ is $.78$.
So where did I go wrong?
 [/INST] Hint: Calculate 
$\displaystyle \cos \theta = \frac{a . b}{|a||b|}.$
What do you get?
$\displaystyle a . b = \left(\frac{\sqrt{3} \sqrt{2}}{3 \times 2}\right) + \left(\frac{\sqrt{3} \sqrt{2}}{3 \times 2}\right) + (0) = \frac{\sqrt{6}}{3} = \sqrt{\frac{2}{3}}$
$\displaystyle |a| .|b| = \left|~\sqrt{\left(\frac{\sqrt{3}}{3}\right)^2 + \left(\frac{\sqrt{3}}{3}\right)^2 + \left(\frac{\sqrt{3}}{3}\right)^2 }~\right|. \left|~\sqrt{\left(\frac{\sqrt{2}}{2}\right)^2 + \left(\frac{\sqrt{2}}{2}\right)^2 +0^2}~\right| = |1|.|1| = 1$
This comes out to: $\displaystyle \cos^{-1} \sqrt{\frac{2}{3}}$
</s>