- 213

- 0

Find the dot product of 2 vectors:

v1 a vector with components <4, 8>

v2 a vector of length 1 angle pi/4

So, i have 2 ways of doing it.

1) v1

^{.}v2 = v1

_{x}

^{.}v2

_{x}+ v1

_{y}

^{.}v2

_{y}

2) v1

^{.}v2 = |v1||v2|cos(theta)

And they should come out the same but.

1) v1

^{.}v2 = 4cos(pi/4) + 8sin(pi/4) = 6√(2)

1) v1

^{.}v2 = √(4

^{2}+ 8

^{2})cos(pi/4) = 2√(10)

and 6√(2) ≠ 2√(10), so i wondered if i did something wrong. Then it tried different numbers and found out these two ways of computing the dot product of two vectors are never the same for an angle pi/4 except for vectors with components <a, 0> or <0, a> where a is any real number.

I wonder if i computed anything wrong causing different results or is is that they are not the same?