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?
 A: 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}}$
A: If you're going to check with Wolfram Alpha, you can ask your question somewhat more directly:
angle between (sqr(3)/3, sqr(3)/3, sqr(3)/3) and (sqr(2)/2,sqr(2)/2,0)
You'll see that the answer is $\arccos(\sqrt(2/3))\approx0.61$, which is exactly what you got.
A: Your question is backwards. Instead of this:
Q1 The angle between my two vectors is $45^{\circ}$! Why is the dot product wrong?
it should be:
Q2 The dot product says the angle between my two vectors is not $45^{\circ}$! Why isn't it?
And the answer is: Draw some more pictures. 
A: Project the problem onto the $x=y$ plane and you will see that the new coordinates are
$$\left(\frac{\sqrt6}{3}, \frac{\sqrt3}{3}\right)$$
and 
$$\left(1,0\right).$$
From this, you should be able to clearly see that the angle between them is not $45^{\circ}$.
