# Are these two matrices equal?

Let $$M$$ be a $$n\times n$$ definite positive real diagonalizable matrix and $$D$$ the diagonal matrix of eigenvalues of $$M$$ (all positive, then). Let $$P$$ be a matrix the columns of which form a basis of eigenvectors. Then we have $$M=PDP^{-1}$$.

As $$P$$ is not unique, let $$Q$$ be another matrix the columns of which form an another basis of eigenvectors. Then we have $$M=QDQ^{-1}$$.

Now suppose I have to deal with two matrices which are: $$A=PD^{1/2}P^{-1}$$ and $$B=QD^{1/2}Q^{-1}$$...

Can I conclude that $$A=B$$ ? It's my first intuition, but I couldn't manage to go through any demonstration or any counter-example. Could you provide me some help?

• I think the answer depends on your definition of $D^{1/2}$. Is it just any matrix $X$ such that $X^2 = D$? Or do you choose the roots in a specific way? – Claudius Jul 20 at 8:08
• OK, sorry! I forgot to say that $M$ is positive definite, so that eigenvalues are positive. Then $D^{1/2}$ is the diagonal matrix containing the square roots of the eigenvalues... – Andrew Jul 20 at 8:14
• Just to make it clear: with square roots you mean positive square roots, right? – Claudius Jul 20 at 8:16
• I amended the post... To answer your questiuon : yes. If $D$ contains $\lambda$, then $D^{1/2}$ contains $\sqrt{\lambda}$ – Andrew Jul 20 at 8:19

The answer is yes. If $$\lambda$$ und $$\mu$$ are two (positive) eigenvalues, then we have $$\lambda =\mu \iff \sqrt\lambda = \sqrt\mu$$ (since we take positive roots, right?). This implies that for $$X\in {\rm GL}_n(\Bbb R)$$ we have the equivalences \begin{align*} XDX^{-1} = D &\iff D^{-1}XD = X\\ &\iff (D^{1/2})^{-1} XD^{1/2} = X\\ &\iff XD^{1/2}X^{-1} = D^{1/2}. \end{align*} More precisely, if $$D$$ has the form $${\rm diag}(\lambda_1I_{n_1},\dotsc, \lambda_r I_{n_r})$$ (with $$I_{n_j}$$ the $$n_j\times n_j$$-identity matrix and $$\lambda_i\neq \lambda_j$$ for $$i\neq j$$) then $$\{X\in {\rm GL}_n(\Bbb R) \mid D^{-1}XD = X\} = {\rm diag}({\rm GL}_{n_1}(\Bbb R),\dotsc, {\rm GL}_{n_r}(\Bbb R)).$$ (And the same for $$D$$ replaced by $$D^{1/2}$$.)

Now take $$P,Q \in {\rm GL}_n(\Bbb R)$$ with $$PDP^{-1} = QDQ^{-1}$$. Then $$(Q^{-1}P) D (Q^{-1}P)^{-1} = D$$, so by the above also $$(Q^{-1}P) D^{1/2} (Q^{-1}P)^{-1} = D^{1/2}$$. Therefore, $$PD^{1/2}P^{-1} = QD^{1/2}Q^{-1}$$.

• Sorry, I must be tired... Could you explain more clearly how you go from the first equivalence to the second and then to the third? – Andrew Jul 20 at 8:50
• The first and third equivalence is just a rearrangement of matrices. The second one should be clarified in the immediately following part. If you don't understand something, please ask a precise question. – Claudius Jul 20 at 8:52
• Claudius, the precise question is: I don't understand why $D^{-1}XD = X \iff (D^{1/2})^{-1} XD^{1/2} = X$ – Andrew Jul 20 at 9:02
• I already explained this in my answer. I simply don't know what your problem is. And you seem not willing to elaborate on your problem. – Claudius Jul 20 at 9:05
• OK, Claudius, if you don't want to explain more clearly why $D^{-1}XD = X \iff (D^{1/2})^{-1} XD^{1/2} = X$, then let's go. It does not give me any useful explanation and you do not want to understand that I do not understand some of your statements. – Andrew Jul 20 at 9:10

Yes. Suppose $$\lambda_1,\ldots,\lambda_k$$ are the distinct eigenvalues of $$M$$ (so that $$1\le k\le n$$). Let $$f$$ be any polynomial such that $$f(\lambda_i)=\lambda_i^{1/2}$$ (e.g. take $$f$$ as a Lagrange interpolation polynomial). Then $$f(D)=D^{1/2}$$. It follows that $$A=PD^{1/2}P^{-1}=Pf(D)P^{-1}=f(PDP^{-1})=f(M)$$ and similarly $$B=f(M)$$ too.

• Thanks. For the moment, I dont know enough about Lagrange interpolation polynoms to understand why $Pf(D)P^{-1}=f(PDP^{-1})$, but I will investigate this; it sounds interesting. – Andrew Jul 20 at 14:12
• @Andrew This is not specific to Lagrange interpolation polynomial. The equality $Pf(D)P^{-1}=f(PDP^{-1})$ holds for any polynomial $f$. – user1551 Jul 20 at 15:00
• Good, thanks. So Lagrange is just for assuming that $f$ is not any polynomial but a polynomial for which $f(\lambda_i)$ has value ${\lambda_i}^{1/2}$... – Andrew Jul 20 at 15:13
• @Andrew Yes, its sole purpose is to ensure that $f(D)=D^{1/2}$. – user1551 Jul 20 at 15:17

Yes, you can conclude that $$A=B$$. To see this in a straightforward manner, using $$P^{-1}P=I$$, note that $$M^2 = PDP^{-1}PDP^{-1} =P D^2 P^{-1}.$$ In the same manner, it follows that $$M^{\frac{1}{2}} = P D^{\frac{1}{2}}P^{-1} = Q D^{\frac{1}{2}} Q^{-1},$$ which gives $$A=B$$.

• Maybe it would be helpful to close the loop with: $$M = M^{\frac{1}{2}} M^{\frac{1}{2}} = PD^{\frac{1}{2}}P^{-1} P D^{\frac{1}{2}} P^{-1} = P D P^{-1}$$. – ChainedSymmetry Jul 20 at 14:03
• Looks nice. But although $D^{1/2}$ is clear, $M^{1/2}$ is not (for me...). How can we say that $(PDP^{-1})^{1/2}=PD^{1/2}P^{-1}$? I mean, $(PDP^{-1})^{1/2}$ is a matrix $X$ defined by $X^2=(PDP^{-1})^{1/2}$. Although $PD^{1/2}P^{-1}$ works well, it may not be the unique matrix that works well. – Andrew Jul 20 at 14:06
• sorry, i wanted to write: $X^2=PDP^{-1}$ – Andrew Jul 20 at 14:14
• The key assumption is that we are taking the same square root of D for both A and B, (i.e. $(D^{\frac{1}{2}})_A = (D^{\frac{1}{2}})_B$. With that assumption, then there is no ambiguity in the equality $A=B$.Taking the root M impacts the magnitude (eigenvalues) of M leaving the direction (eigenspace) of M untouched (up to sign choice for each eigenvalue handled in the assumption above). You might find link helpful reading. – ChainedSymmetry Jul 20 at 14:49
• Hum, could you please explicit the steps between $(PDP^{-1})^{1/2}$ and $PD^{1/2}P^{-1}$? You said "in the same manner...", but I still don't understand that manner. Thank you. – Andrew Jul 21 at 5:28