This is another one of my “reminder” posts, so look away now if you are familiar with vector dot products.
If we had a two dimensional vector and vector then the dot product would be .
But this can also be expressed as (where is the angle between the two vectors).
Let be the angle makes to the x-axis and the angle made by , then , , and .
Then the dot product can be rewritten as:
As we can rewrite this as:
so we can rewrite the dot product as
As we have .