Can someone explain to me exactly why cosx=sin(pi/2-x) and why sinx=cos(pi/2-x)

Also why are tanx=cot(pi/2-x) and cotx=tan(pi/2-x)?

I don't understand why they are related? how does cosx=sin(pi/2-x) exactly?

My teacher just kind of gave us the formulas.. but never said WHY they're like that, she didn't prove it or anything.. Can someone please prove it or explain the concept to me.

Thank you