Complementary Angle Theorem

There is an effect of the complementary angle theorom that I don't understand. For example:

sin squared(40) + sin squared(50) = sin squared(40) + cos squared(40) = 1

This previous statement's purpose was to show how sin(50) = cos(40), but what got me was the answer being equal to 1. Doing some experimenting, to see if this is a rule:

sin squared(10) + sin squared(80) = sin squared(10) + cos squared(10) = 1

and so on:

cos squared(10) + cos squared(80) = 1

sin squared(30) + sin squared(60) = 1

Why is it, when these functions are squared, that the answer = 1?