Decomposing the vector b on the x-axis and the y-axis, we get a rectangle triangle where the two sides are bx (x-axis) and by (y-axis), and b is the hypothenuse.
The component in x, bx, is equal to the product between the hypothenuse and the cosine of the angle between b and the x-axis, which is

:
