Show the Trace$(B)^{2} \leq$ nTrace$(B^{T}B)$

The following definition is needed for my actual question:

For $A, B \in \mathcal{M}_{n \times n}$ define $$ \langle A, B \rangle = \text{Trace}(B^{T}A) = \sum_{j=1}^{n}\sum_{i=1}^{n}b_{ij} \, a_{ij} $$

And here is the actual question:

For $B \in \mathcal{M}_{n \times n}$ show that $$ \text{Trace}(B)^{2} \:\leq\: n \,\text{Trace}(B^{T}B) $$

I know I have to use the Cauchy-Schwarz Inequality, but I wasn't exactly sure how to. Here is my attempt:

Since I only have one matrix I decided to use the identity matrix $$ \begin{align} \text{Trace}(B)^{2} \:&\leq\: n \,\text{Trace}(B^{T}B) \\ \text{Trace}(I^{T}B)^{2} \:&\leq\: n \, \langle B, B \rangle \\ \langle I_{n}, B \rangle^{2} \:&\leq\: n \, \Vert B \Vert^{2} \\ \langle I_{n}, B \rangle \:&\leq\: \sqrt{n} \, \Vert B \Vert \end{align} $$

I feel like I either did it incorrect, or that I'm close but am missing something.


Solution 1:

It seems like you pretty much have the solution: $$ \operatorname{trace}(B)^2 = \overbrace{\langle I,B \rangle^2 \leq \langle I,I \rangle \langle B,B \rangle}^{\text{Cauchy Schwarz}} = \operatorname{trace}(I) \operatorname{trace}(B^TB) = n\operatorname{trace}(B^TB) $$ So, we have $$ \operatorname{trace}(B)^2 \leq n\operatorname{trace}(B^TB) $$ which is what we wanted.

Solution 2:

We have $$\text{Tr}(B)^2 = \left(\sum_{k=1}^n B_{kk}\right)^2$$ $$(B^TB)_{ii} = \sum_{j=1}^nB^T_{ij}B_{ji} = \sum_{j=1}^n B_{ij}^2$$ Hence, $$\text{Tr}(B^TB) = \sum_{i,j=1}^n B_{ij}^2$$ From Cauchy-Schwarz, we have \begin{align*} \text{Tr}(B)^2 & = \left(\sum_{k=1}^n 1 \cdot B_{kk}\right)^2 \leq \left(\sqrt{1^2+1^2+\cdots +1^2} \right)^2 \left(\sqrt{B_{11}^2 + B_{22}^2 + \cdots + B_{nn}^2}\right)^2\\ & = n \left(\sum_{i=1}^n B_{ii}^2\right) \leq n \text{Tr}(B^TB) \end{align*}