By drawing a right triangle it is obvious that $\cos \theta = \sin\left(\frac{\pi}{2} - \theta\right)$. I'm trying to prove to myself that this is true for all values of $\theta$ by following the reasoning on this page where the sine graph is inverted vertically by plugging in $-\theta$ and then shifted to the right by $\frac{\pi}{2}$ to get the cosine graph. To shift a graph to the right by $x$, don't you have to subtract $x$ from the input value?
I'm getting $\cos \theta = \sin\left(-\theta - \frac{\pi}{2}\right)$ which is of course wrong and Wolfram shows me is the vertically-inverted cosine graph.
I know this is ridiculously simple and something to do with the $-\theta$ parameter to $\sin$ meaning that a right shift then needs the shift value added, but I can't see clearly why.
Let $\gamma$ denote the graph of the function $f$, hence $\gamma=\{(x,f(x))\mid x\in\mathbb R\}$. Let $a$ denote a real number and $\alpha=(a,0)$. The set $\gamma+\alpha$ is $$ \gamma+\alpha=\{u+\alpha\mid u\in\gamma\}=\{(x+a,f(x))\mid x\in\mathbb R\}=\{(t,f(t-a))\mid t\in\mathbb R\}, $$ hence $\gamma+\alpha$ is the graph of the function $f_a:x\mapsto f(x-a)$.
In the present case, $f(x)=-\sin(x)$, $a=+\pi/2$ (remember the shift is to the right hence $a\gt0$), hence $f_a(x)=-\sin(x-\pi/2)=\sin(\pi/2-x)$, as desired.