# Analytic functions and diagonalisation of matrices.

If I have an analytic function $$f$$ of a square matrix A (like sin(A)), then I know that if the matrix diagnosable then it is possible to find a matrix $$D = P^{-1}AP \tag{1}$$. Then for a function $$f(A)$$: $$f(A) = Pf(D)P^{-1} \tag{2}$$

So for example if $$f(x) = cos(x)$$ : $$cos(A) = Pf(D)P^{-1} \tag{3}$$

What is the justification for this and how does this follow from first principles? A similar question has been asked here $$\sin(A)$$, where $$A$$ is a matrix but I don't see any justification/proof for (2).

If $$f(A)$$ is defined for every $$A$$ then $$f$$ must be an entire function: $$f(z)=\sum_{n=0}^\infty c_n z^n.$$Note that $$(PDP^{-1})^n=PD^nP^{-1}.$$
• (+1) Please let me note that the term $f(D)$ or $\cos(D)$ is not even defined. You have to first express $f$ or $\cos$ by a limit of polynomials in order to give it a meaning. – Yanko Jan 12 at 17:00
• Ok so $f(A) = f(PDP^{-1}) = \sum_{n=0}^\infty c_n (PDP^{-1})^n=P\sum_{n=0}^\infty c_n (D)^n P^{-1}$? – daljit97 Jan 12 at 17:27
• @daljit97 $\dots=Pf(D)P^{-1}$. Right. – David C. Ullrich Jan 12 at 17:32
• @Yanko You need to read about the "functional calculus" somewhere - it's a long story. There's the "continuous functional calculus": If $D$ is diagonal with entriies $\lambda_1,\dots,\lambda_n$ then $f(D)$ is diagonal with entries $f(\lambda_1),\dots,f(\lambda_n)$. Or the holomorphic functional calculus: If $x$ is an element of any Banach algebra, $V$ is open, $\sigma(x)\subset V$ and $f\in H(V)$ then you can define $f(x)$ using the Cauchy Integral Formula $f(x)=\frac1{2\pi i}\int_\Gamma f(z)(x-ze)^{-1}\,dz$ for a suitable cycle $\Gamma$ (see Rudin Functional Analysis). – David C. Ullrich Jan 12 at 17:51