# Thread: Angles between vectors (parallel, orthogonal, ...)

1. ## Angles between vectors (parallel, orthogonal, ...)

p = (2 , k)
q = (3 , 5)

Find such k that:
a) p and q are orthogonal
b) the angle between p and q is $\frac {\pi}{4}$

I was using:
$
\cos \phi = \frac {p * q}{\|p\|*\|q\|}
$

but somehow I can't solve it right.

Thanks!

2. Originally Posted by saeros
p = (2 , k)
q = (3 , 5)

Find such k that:
a) p and q are orthogonal
b) the angle between p and q is $\frac {\pi}{4}$

I was using:
$
\cos \phi = \frac {p * q}{\|p\|*\|q\|}
$

but somehow I can't solve it right.

Thanks!
If the vectors are orthogonal, then $\mathbf{p}\cdot \mathbf{q} = 0$.

If the vectors are parallel, then $\mathbf{p}\cdot \mathbf{q} = |\mathbf{p}||\mathbf{q}|$.

3. I understand, but then I get to a equation I obviously can't solve !

It's like that:
$
5k - \sqrt{34\cdot(4+k^2)} + 6 = 0
$

I guess I'm not wrong at this point.. but I have no clue how to get k out of it. Any clues please?

4. Hello saeros
Originally Posted by saeros
I understand, but then I get to a equation I obviously can't solve !

It's like that:
$
5k - \sqrt{34\cdot(4+k^2)} + 6 = 0
$

I guess I'm not wrong at this point.. but I have no clue how to get k out of it. Any clues please?
I assume it's part (b) that you're stuck with. So here it is:
$\textbf{p}.\textbf{q}=|\textbf{p}||\textbf{q}|\cos \phi$
$\Rightarrow 5k+6 = \sqrt{34(4+k^2)}.\frac{1}{\sqrt2}$, when $\phi = 45^o$
Square both sides:
$\Rightarrow 25k^2+60k+36 = 17(4+k^2)$
$=68+17k^2$
$\Rightarrow 8k^2 + 60k -32 = 0$

$\Rightarrow 2k^2+15k-8=0$

$\Rightarrow (2k-1)(k+8)=0$

$\Rightarrow k = \tfrac12,\;-8$
When you substitute back in the original equation, the negative root is invalid. So the answer is:
$k = \tfrac12$