Cauchy Integral Formula for Matrices How do I evaluate the Cauchy Integral Formula $f(A)=\frac{1}{2\pi i}\int\limits_Cf(z)(zI-A)^{-1}dz$ for a matrix $A=\left(\begin{array}{ccc}2&2&-5\\3&7&-15\\1&2&-4\end{array}\right)$ and a function $f(x)=3x^2+1$?
I have evaluated the function directly, using interpolation and using Jordan-Normal Form and want to show the solutions are equivalent.
The solution should be $f(A)=\left(\begin{array} \ 16&24&-60\\36&76&-180\\12&24&-56\end{array}\right)$.
 A: Choose the contour $C$ so that $|z| > \|A\|$ for all $z$ in $C$. Then note that $(zI -A)^{-1} = \frac{1}{z}(I-\frac{A}{z})^{-1}$, and for $|z| > \|A\|$, we have $(zI -A)^{-1} = \frac{1}{z} \sum_{k=0}^\infty \frac{A^k}{z^k}$. Since $|z| > \|A\|$ for all $z$ in $C$, the convergence is uniform so we may interchange integration and summation.
Also note that $f$ is analytic on $C$ and the 'inside' of $C$.
This gives
\begin{eqnarray}
f(A)&=&\frac{1}{2\pi i}\int\limits_Cf(z)(zI-A)^{-1}dz \\
&=&  \frac{1}{2\pi i}\int\limits_Cf(z) \frac{1}{z} \sum_{k=0}^\infty \frac{A^k}{z^k} dz \\
&=&  \frac{1}{2\pi i} \sum_{k=0}^\infty \left(\int\limits_Cf(z) \frac{1}{z^{k+1}} dz \right) A^k \\
&=&   \sum_{k=0}^\infty \left( \frac{1}{2\pi i}\int\limits_Cf(z) \frac{1}{z^{k+1}} dz \right) A^k \\
&=&  \sum_{k=0}^\infty \frac{f^{(k)}(0)}{k!}  A^k
\end{eqnarray}
(The specific value doesn't matter, but it is easy to compute $\|A\|_1 = 24$, so as long as $|z|> 24$ on $C$, the above formula holds.)
It follows that if $f(x) = \sum_{k=0}^n a_k z^k$, then $f(A) = \sum_{k=0}^n a_k A^k$. Hence, in this case, $f(A) = 3 A^2 +I$. Evaluating shows that it equals the answer above.
A: There is a typo in the answer for $f(A)$, the (1,1) entry should be 16 not 6.
Another way to proceed is to calculate $(zI-A)^{-1}$, and then to calculate the contour integral $$f(A)_{ij} = \int_\mathcal{C} \mathrm{d} z ~ f(z) \, (zI-A)^{-1}_{ij}$$ for each $i,j$. $\mathcal{C}$ can be any contour encircling both eigenvalues of $A$, that is, 1 and 3. This gives the quoted result.
