- #1
annamal
- 387
- 33
- TL;DR Summary
- I am not sure what I am doing wrong but dot product of a and b =/= |a||b| when I am trying to calculate it
I am not sure what I am doing wrong but dot product of a and b =/= |a||b| when I am trying to calculate it. Theta = 0:
dot product(a and b) = ax*bx + ay*by
|a||b|= sqrt((ax^2+ay^2)*(ax^2 + by^2)) = sqrt((ax*bx)^2 + (ax*by)^2 + (ay*bx)^2 + (ay*by)^2) =/= ax*bx + ay*by
What am I doing wrong?
dot product(a and b) = ax*bx + ay*by
|a||b|= sqrt((ax^2+ay^2)*(ax^2 + by^2)) = sqrt((ax*bx)^2 + (ax*by)^2 + (ay*bx)^2 + (ay*by)^2) =/= ax*bx + ay*by
What am I doing wrong?