Let $A\in M^{n\times n}(\mathbb R)$. prove that if for every other $B\in M^{n\times n}(\mathbb R)$:
$n\cdot tr(AB)=tr(A) \cdot tr(B) $, $A$ is a scalar matrix.
Let $A\in M^{n\times n}(\mathbb R)$. prove that if for every other $B\in M^{n\times n}(\mathbb R)$:
$n\cdot tr(AB)=tr(A) \cdot tr(B) $, $A$ is a scalar matrix.
On
Alternatively, let $\lambda_1,\lambda_2,\ldots,\lambda_n\in\mathbb{C}$ be eigenvalues of $A$. Observe that $$\begin{align} n\,\text{trace}\left(A\,A^\top\right)&\geq n\,\sum_{i=1}^n\,\left|\lambda_i\right|^2 \geq\left(\sum_{i=1}^n\,\left|\lambda_i\right|\right)^2\geq \left|\sum_{i=1}^n\,\lambda_i\right|^2 \\&=\big|\text{trace}(A)\big|^2=\text{trace}(A)\,\text{trace}\left(A^\top\right)\,, \end{align}$$ where the first inequality is due to this link, the second inequality is due to the Cauchy-Schwarz Inequality, and the third inequality is due to the Triangle Inequality. Since the equality $n\,\text{trace}\left(A\,A^\top\right)=\text{trace}(A)\,\text{trace}\left(A^\top\right)$ holds by the hypothesis, all eigenvalues of $A$ must be equal, and let $\lambda$ be the common value of the $\lambda_i$'s, which is a real number. Take $I$ to be the $n$-by-$n$ identity matrix. Then, for any $n$-by-$n$ matrix $B$ over $\mathbb{R}$, we have $$\begin{align}n\,\text{trace}\big((A-\lambda\,I)\,B\big)&=n\,\text{trace}(A\,B)-n\lambda\,\text{trace}(B)\\&=n\,\text{trace}(A\,B)-\text{trace}(A)\,\text{trace}(B)=0\,.\end{align}$$ That is, if $C:=A-\lambda\,I$, then $\text{trace}(C\,B)=0$ for every $n$-by-$n$ matrix $B$. Hence, $\text{trace}\big(C\,C^\top\big)=0$. Ergo, $C$ is the zero matrix, and $A=\lambda\,I$. (In fact, the equality case of the first inequality already implies that $A$ is a normal matrix. Having only one value for all the eigenvalues, $A$ is thus a scalar matrix.)
Hint: Suppose that $B(r,s)$ is the matrix where $b_{r,s}=1$ and $b_{i,j}=0$ for $i\not=r$ or $j\not=s$. In other words, $B(r,s)$ is all zeros except for the one position $(r,s)$.
Consider $AB(r,s)$. This matrix is all zeros except for the $s$-th column, which is the $r$-th column of $A$. Therefore, the trace of $AB(r,s)$ is $a_{s,r}$.
Since the trace of $B(r,s)=1$ for $r=s$ and $0$ for $r\not=s$, we can calculate the entries of $A$. In particular, for $r\not=s$, $n\cdot tr(AB(r,s))=n\cdot a_{r,s}$ and $tr(A)\cdot tr(B)=0$. On the other hand, for $r=s$, $n\cdot tr(AB(r,s))=a_{s,r}$, and $tr(A)\cdot tr(B)=tr(A)$, so $a_{r,s}=tr(A)/n$.