If the vector is represented by coordinates, a=(x1, y1, z1), b=(x2, y2, z2), then a.b=(x1x2+y1y2+z1z2).
|a|=√(x1^2+y1^2+z1^2),|b|=√(x2^2+y2^2+z2^2)。
These generations of formula (I), get:
cos=(x1x2+y1y2+z1z2)/[√(x1^2+y1^2+z1^2)*√(x2^2+y2^2+z2^2)]。
The above formula is given by the spatial three-dimensional coordinates, so that z=0 in the coordinates, the calculation formula of the plane vector is obtained. The range of the angle between the two vectors is: [0, π].
When the angle is an acute angle, cos θ>0;
When the angle is an obtuse angle, cos θ < 0.
Powered by TorCMS (https://github.com/bukun/TorCMS).