The question is not correct, you mean the the sine and cosine of 45 degrees is always square root 2 over 2.
Well you need to know how the sine and cosine are calculated. I would search in google for "sine and cosine in a unit circle". There is a very good Khan academy video that explains this in 10 minutes. Watch and learn :-)