I was wondering if there is any difference between finding the angle between two 4D vectors as opposed to finding the angle between two 3D vectors?

I have $u = (1, 0, 1, 0)$ , $v = (-3, -3, -3, -3)$ and used the dot product to find the angle between them. We have that:

$u\cdot v = -6$

$||u|| = \sqrt 2$

$||v|| = \sqrt{36}$


$$\cos(\theta) = \frac{u . v} {||u||\cdot ||v||}=\frac{-6 }{ \sqrt 6 \cdot \sqrt{36}} = -0.71,$$


$$\theta = \cos^{-1} (-0.71)$$

And the angle between $u$ and $v$ is $135$ degrees or $2.36$ radians.

  • 1
    $\begingroup$ Replace $\sqrt{6}$ by $\sqrt{2}$ in the denominator, and write ${3\pi\over4}$ instead of $2.36$ radians. Otherwise everything is fine. $\endgroup$ May 5, 2015 at 9:18

1 Answer 1


In a vector space $V$ equipped with an inner product $\langle ~,~ \rangle$, the angle between two nonzero vectors $v, w \in V$ is defined the same way no matter what the dimension is. The dimension could be 1, 4, 1332, or literally infinite. The definition is:

$$\cos \theta = \frac{\langle v, w \rangle}{\|v\| \|w\|}$$

where $\|v\| = \sqrt{\langle v, v\rangle}$ is the norm or length of $v$.

In case you haven't heard the term, an inner product is just a generalization of the Euclidean dot product that can be defined on any vector space.

  • 6
    $\begingroup$ You can write just \cos instead of \text{cos} to get the correct spacing: $\cos\theta$ vs. $\text{cos}\theta$. $\endgroup$
    – Regret
    May 5, 2015 at 8:39
  • 4
    $\begingroup$ Cool, I hadn't ever tried that. You learn something new everyday. $\endgroup$
    – ಠ_ಠ
    May 5, 2015 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.