The question:

Given the vectorsp= (1 1 -1) andq= (2 1 -1), find the cosine betweenpandq.

My attempt:

I found the magnitude of p and q, which are and respectively.

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

Using I rearranged the equation to:

Substituting the values I got

The answer in the text is

What am I doing wrong? Thanks!