# 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 $\sqrt{3}$ and $\sqrt{6}$ respectively.

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

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

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

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

The answer in the text is $\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 $\sqrt{3}$ and $\sqrt{6}$ respectively.

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

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

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

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

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

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

$\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?