# Value of cos(x) where x is multiple of a matrix

Tags:
1. Feb 15, 2017

### Vishakha

1. The problem statement, all variables and given/known data
Given a matrix M={{2,1},{1,2}} then value of cos( (π*M)/6 )

2. Relevant equations

3. The attempt at a solution
Eigen values are π/6 and π/2 and eigen vectors are (π/6,{-1,1}) and (π/2,{1,1}).
Diagonalize matrix is {{π/6,0},{0,π/2}}
I got same value (√3/2)M

2. Feb 15, 2017

### Ray Vickson

I get something different: $\cos(M \pi /6)$ is NOT a scalar multiple of $M$.

3. Feb 16, 2017

### Vishakha

Of course it isn't !
I found similar problem like this in which we have to find cos(A) where A=(π/2) \begin{pmatrix}
1 & 1 \\
1 & 1 \\
\end{pmatrix}. The process is they first find eigen vectors and then used diagonalization formula.
cos(A)= PDP-1
I'm not sure it is D or cos(D).

Last edited: Feb 16, 2017
4. Feb 16, 2017

### Staff: Mentor

Neither, really.
If $A = PDP^{-1}$, then $\cos(A) = \cos(PDP^{-1})$. Now, write the right side as the Maclaurin series for cosine.

5. Feb 16, 2017

### Ray Vickson

You say "of course it isn't"---but in post #1 you said the opposite.

If $A = P^{-1} D P$ with diagonal $D$, then we have $f(A) = P^{-1} f(D) P$, and
$$D = \pmatrix{d_1 & 0 & \ldots \;\; 0\\ 0 & d_2 & \ldots\;\; 0 \\ \vdots & \vdots&\; \vdots\\ 0 & 0 & \ldots\;\; d_n} \: \Longrightarrow f(D) = \pmatrix{f(d_1) & 0 & \ldots\;\; 0\\ 0 & f(d_2) & \ldots\;\; 0 \\ \vdots & \vdots&\; \vdots\\ 0 & 0 & \ldots \;\; f(d_n) }$$

6. Feb 17, 2017

### Vishakha

It gives me expansion of cosine series. I think for final answer may be I have to put value of π.

Thanks for help.

7. Feb 17, 2017

### Vishakha

By M is not scalar multiple of cos(π M/6) I meant cos(π M/6) ≠ M cos(π/6).

I was calculating cos(A)=cos(PDP-1) but instead of $f(A) = P f(D) P^{-1}$ I was doing $f(A) = f(PDP^{-1})$.Thanks for pointing that out.

Thank you for help.

8. Feb 17, 2017

### Ray Vickson

They are the same: $f(P D P^{-1}) = P f(D) P^{-1}$ for any analytic function $f(\cdot)$.