Expansion of the Frobenius norm

650 Views Asked by At

this might be very elementary question. I was confused by looking at some different sources when expanding the Frobenius norm into trace. Would these two expressions below always be the same? Or only under certain conditions?

\begin{aligned} \left\|X-Y\right\|_{F}^{2}&=\operatorname{tr}\left(\left(X-Y\right)\left(X-Y\right)^{\top}\right) \end{aligned}

\begin{aligned} \left\|X-Y\right\|_{F}^{2}&=\operatorname{tr}\left(\left(X-Y\right)^{\top}\left(X-Y\right)\right) \end{aligned}

Thanks

1

There are 1 best solutions below

0
On

For any two $n\times n$ matrices $A$ and $B$, $\operatorname{tr}(AB)=\operatorname{tr}(BA)$ and, in particular,$$\operatorname{tr}\left(AA^\top\right)=\operatorname{tr}\left(A^\top A\right).$$