I used the formula, $$rand = \frac{X^TY}{\Vert{x}\Vert{y}\Vert}$$ and got $$\frac{-1}{5{\sqrt 2}}$$ -0.1414213562373095 as the answer but the test case says the result is incorrect, is there anything I am doing wrong.
2026-04-08 11:03:19.1775646199
How compute the angle (in rad) between x= [3, 4] and y= [1, −1] using the dot product?
389 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
That's the cosine of the angle. You need to apply the arccos function to get the angle itself.