How do I find the angle between two vectors using the dot product formula?
I have vectors a = (2, 1, -2) and b = (1, 2, 2). I need to find the angle between them. I know the formula involves the dot product but I keep making arithmetic errors.
1 Answer
Formula: cos(theta) = (a.b) / (|a| * |b|). Compute dot product: a.b = 21 + 12 + (-2)*2 = 2 + 2 - 4 = 0. Since the dot product is 0, the angle is 90 degrees. The vectors are perpendicular! Quick check: |a| = sqrt(4+1+4) = 3, |b| = sqrt(1+4+4) = 3. cos(theta) = 0/9 = 0, so theta = 90 degrees.
No comments yet — start the discussion.