Matrix exponential for a scalar square (source code)

= Matrix exponential for a scalar square
{title2=$M^2=\kappa I\implies e^M=C(\kappa)I+S(\kappa)M$}

When a <square matrix> satisfies $M^2=\kappa I$, its powers reduce to $M^{2n}=\kappa^nI$ and $M^{2n+1}=\kappa^nM$. Absolute convergence of the <matrix exponential> allows even and odd subseries to be separated. Thus $C(\kappa)=\sum_{n\geq0}\kappa^n/(2n)!$ and $S(\kappa)=\sum_{n\geq0}\kappa^n/(2n+1)!$. For real $\kappa>0$, these are $\cosh\sqrt\kappa$ and $\sinh\sqrt\kappa/\sqrt\kappa$. For $\kappa<0$, they are $\cos\sqrt{-\kappa}$ and $\sin\sqrt{-\kappa}/\sqrt{-\kappa}$. At $\kappa=0$, $e^M=I+M$, including nonzero <nilpotent matrices> of square zero. This also explains the limiting sine-over-argument coefficients without dividing by zero.