Wikipedia gives [the following explicit formula](https://en.wikipedia.org/wiki/Matrix_function#Arbitrary_function_of_a_2x2_matrices) for the functional calculus of $2\times2$ matrices:
$$
f(A) = \frac{f(\lambda\_+) + f(\lambda\_-)}{2} I + \frac{\mathrm{tr}(A)/2 - \mathrm{adj}(A)}{\sqrt{\Delta(A)}} \frac{f(\lambda\_+) - f(\lambda\_-)}{2},
$$
where I am guessing that $\mathrm{tr}(A)/2 - \mathrm{adj}(A)$ actually means $(\mathrm{tr}(A)/2) I - \mathrm{adj}(A)$ and $\mathrm{adj}(A)$ stands for the adjugate of $A$ and where $\Delta(A)=(\mathrm{tr}(A)/2)^2 - \mathrm{det}(A)$ is the discriminant of the characteristic polynomial $\chi\_A(t)=\mathrm{det}(tI-A)=t^2-\mathrm{tr}(A)t+\mathrm{det}(A)$ and $\lambda\_\pm = \mathrm{tr}(A)/2 \pm \sqrt{\Delta(A)}$ are its roots. Unfortunately, the Wikipedia article is rather *cryptic* in this place without listing any assumptions whatsoever, and I have not been able to locate the formula in either Higham's book or in Bhatia's.



> 
> Is (my interpretation of) this formula really correct for any $A\in M\_2(\mathbb{C})$ with $\Delta(A)\neq 0$ (suffices to assume $f\in\mathbb{C}[t]$ at the moment)? If not, then in what generality and where can I find a rigorous derivation of it?
> 
> 
> 



Explicit formula for the functional calculus of 2x2 matrices
A general procedure for $f(A)$ for any $n \times n$ matrix $A$, where $f$ is an analytic function in a neighbourhood of the spectrum of $A$, is this. Let
$p$ be a rational function such that $p(\lambda) = f(\lambda)$ for every 
eigenvalue $\lambda$ of $A$, and $p^{(k)}(\lambda) = f^{(k)}(\lambda)$ for $k \le d(\lambda) - 1$ where $d(\lambda)$ is the size of the largest Jordan block for eigenvalue $\lambda$ (and thus the multiplicity of $\lambda$ as a root of the minimal polynomial of $A$). Then $f(A) = p(A)$. 


In this case, since we must assume $\Delta(A) \ne 0$, the eigenvalues are distinct so all $d(\lambda) = 1$. If $A$ is invertible, $\text{Adj}(A) = A^{-1} \det(A)$ and so the right side is $p(A)$ for some rational function $p$.
We just have to check $p(\lambda\_\pm) = f(\lambda\_\pm)$. Then use continuity to deal with the case where $A$ is not invertible.


