|
|
|
Solution
|
Solution provided by AtoZmath.com
|
|
Angle between two vectors calculator
|
1. `(3,4), (4,3)` 2. `(3,4,0), (2,2,1)`
|
Example1. Find angle(A,B) `A=(3,1,1)`,`B=(-1,2,1)`
Solution: Here `vec A=(3,1,1),vec B=(-1,2,1)`
The angle between two vectors `vec A` and `vec B` is given by
`cos(theta)=(vec A * vec B)/(|vec A| * |vec B|)`
1. Calculate dot product `vec A * vec B`
`=A_1*B_1 + A_2*B_2 + A_3*B_3`
`=3*(-1) + 1*2 + 1*1`
`=-3 + 2 + 1`
`=0`
2. Calculate magnitude of vectors `|vec A|`
`=sqrt(A_1^2 + A_2^2 + A_3^2)`
`=sqrt(3^2 + 1^2 + 1^2)`
`=sqrt(9 + 1 + 1)`
`=sqrt(11)`
`=3.3166`
`|vec B|`
`=sqrt(B_1^2 + B_2^2 + B_3^2)`
`=sqrt((-1)^2 + 2^2 + 1^2)`
`=sqrt(1 + 4 + 1)`
`=sqrt(6)`
`=2.4495`
3. Calculate angle between vectors `cos(theta)=(0)/(3.3166 * 2.4495)=0`
`:. theta=cos^(-1)(0)=1.5708` rad
`:. theta=90 ^circ`
|
|
|
|
|