Solve the geometric dot product formula for the cosine. The dot product divided by the two lengths gives , and the inverse cosine gives an angle between and .
| Step | On , | |
|---|---|---|
| 1 | Compute the dot product. Multiply matching components and add, as in the dot product. | |
| 2 | Compute both lengths. Neither vector may be the zero vector.Euclidean norm ↗ | , |
| 3 | Divide to get the cosine. The angle formula. By Cauchy–Schwarz the value lies between and ; anything else is an arithmetic error. | |
| 4 | Take the inverse cosine. The result is always in . Set your calculator to degrees or radians as the question asks. |