If you visualize this, you get a triangle, one point on the origin. The vector makes an angle of with the x-axis. Therefore, if you get an form of you have

You can get the form by just multiplying and and working out the brackets.

I hope this is clear, if not, please say so.