# Thread: Cosine between two vectors

1. ## Cosine between two vectors

The question:

Given the vectors p = (1 1 -1) and q = (2 1 -1), find the cosine between p and q.

My attempt:

I found the magnitude of p and q, which are $\displaystyle \sqrt{3}$ and $\displaystyle \sqrt{6}$ respectively.

I then found the dot product of the vectors, which resulted in 4.

Using $\displaystyle a.b = |a||b|cos\theta$ I rearranged the equation to:

$\displaystyle cos\theta = \frac{a.b}{|a||b|}$

Substituting the values I got $\displaystyle \frac{4}{3\sqrt{2}}$

The answer in the text is $\displaystyle \frac{2\sqrt{2}}{6}}$

What am I doing wrong? Thanks!

2. Originally Posted by Glitch
The question:

Given the vectors p = (1 1 -1) and q = (2 1 -1), find the cosine between p and q.

My attempt:

I found the magnitude of p and q, which are $\displaystyle \sqrt{3}$ and $\displaystyle \sqrt{6}$ respectively.

I then found the dot product of the vectors, which resulted in 4.

Using $\displaystyle a.b = |a||b|cos\theta$ I rearranged the equation to:

$\displaystyle cos\theta = \frac{a.b}{|a||b|}$

Substituting the values I got $\displaystyle \frac{4}{3\sqrt{2}}$

The answer in the text is $\displaystyle \frac{2\sqrt{2}}{6}}$

What am I doing wrong? Thanks!
With the given vectors your result is OK, but:

$\displaystyle \frac{4}{3\sqrt{2}} = \frac{4}{3\sqrt{2}} \cdot \frac{\sqrt{2}}{\sqrt{2}} = \frac{2\sqrt{2}}3$

3. So the text is incorrect?