## Answer

Dear Robby,

The easiest way to set up the formula for this is through analytic geometry. For that you have to use the inner product rule (https://en.wikipedia.org/wiki/Internal_product). The inner product rule says that the cosine of an angle is determined by the inner product between two points located on the angle legs divided by the product of the distances from the vertex of these points. The inner product is calculated as a matrix product (https://nl.wikipedia.org/wiki/Matrixmultiplication) between the two coordinates of the respective points.

In the diagram you will also find the parametric equation of the respective lines that make up the angle legs. In the calculation you need the direction vectors associated with the parameter.

The solution is the inverse cosine of the beam’s length divided by the square root of the sum of the squares of the beam’s length, height, and width. If you look closely at the formula, you will see that the law of cosines appears in a right triangle. Perhaps the formula can also be found via trigonometry?

Indeed, consider the right triangle with vertices BDE. Note that it is a true triangle because those three points are coplanar and lie in a plane. However, that triangle has a right angle in its vertex D. The law of cosines of right triangles tells us that the cosine of a non-right angle of the triangle is equal to the length of the adjacent right side divided by the length of the hypotenuse. We thus find that the cosine of the indicated angle in the diagram is equal to the length of the adjacent side (distance BD) divided by the length of the hypotenuse in the triangle (distance BE) which yields the same solution by applying classical trigonometry to suit.

Regards,

Kurt

## Answered by

#### prof. Dr. Kurt Barbara

Mathematics, statistics, probability, scientific calculation

Pleinlaan 2 1050 Ixelles

http://www.vub.ac.be/

.