D is matrix of order n*n such that D=Diag[d_1,d_2,.....d_n] find f(D)?

Aug 2, 2017

If $f$ is a polynomial, you'll certainly get the matrix $f \left(D\right) = \mathrm{di} a g \left[f \left({d}_{1}\right) , f \left({d}_{2}\right) , \ldots , f \left({d}_{n}\right)\right]$ (for those who have not seen this notation, this is an $n \times n$ matrix whose entries along the "main diagonal" from upper left to lower right are these numbers and whose other entries are zero).

If $f$ is not a polynomial, then things are more subtle, though in many situations you'll still get the matrix $f \left(D\right) = \mathrm{di} a g \left[f \left({d}_{1}\right) , f \left({d}_{2}\right) , \ldots , f \left({d}_{n}\right)\right]$

Explanation:

For example, if $f \left(x\right) = {x}^{2} + 3 x + 5$ and $D = \mathrm{di} a g \left[2 , 3\right]$, then you can check that $f \left(D\right) = {D}^{2} + 3 D + 5 I = \mathrm{di} a g \left[4 , 9\right] + \mathrm{di} a g \left[6 , 9\right] + \mathrm{di} a g \left[5 , 5\right] = \mathrm{di} a g \left[15 , 23\right] = \mathrm{di} a g \left[f \left(2\right) , f \left(3\right)\right]$ (note that "3D" is the scalar 3 times the matrix D and that "5" is interpreted as $5 I$, where $I$ is the $2 \times 2$ identity matrix $\mathrm{di} a g \left[1 , 1\right]$).

If $f$ is not a polynomial, then often we can still say that $f \left(D\right) = \mathrm{di} a g \left[f \left({d}_{1}\right) , f \left({d}_{2}\right) , \ldots , f \left({d}_{n}\right)\right]$. For example, if $f \left(x\right) = {e}^{x}$, we can say that $f \left(D\right) = \mathrm{di} a g \left[{e}^{{d}_{1}} , {e}^{{d}_{2}} , \ldots , {e}^{{d}_{n}}\right]$. This can either be thought of as a definition, or we can use the so-called "Taylor series" for $f \left(x\right) = {e}^{x}$ centered at $x = 0$, which is f(x)=1+x+x^2/(2!)+x^3/(3!)+cdots, to define $f \left(D\right)$ to be I+D+D^2/(2!)+D^3/(3!)+cdots. However, in this situation, we would have to address possible "convergence issues" (i.e., what does such an infinite sum mean?).

If $f$ happens to be undefined at any of the values ${d}_{1} , {d}_{2} , \ldots , {d}_{n}$, then certainly $f \left(D\right)$ would be undefined.

You might wonder in all this: why does $D$ have to be a diagonal matrix? The answer is that defining $f \left(D\right)$ to be a matrix obtained by applying $f$ to all the entries of $D$ is not typically consistent with the operations that define $f$ along with the corresponding matrix operations. Even with a polynomial example, such as $f \left(x\right) = {x}^{2} + 3 x + 5$ above, we would not typically get the matrix ${D}^{2} + 3 D + 5 I$, if $D$ is not diagonal, by applying $f$ to all the entries of $D$ individually.

Actually, you could also say that such an approach is even a problem when $D$ is a diagonal matrix because the value of $f$ at the other (zero) entries, $f \left(0\right)$, may be nonzero.