# Relation between the matrix trace and the amplitude of each element

Assume a diagonal matrix $$\mathbf X$$ whose size $$N\times N$$ and its diagonal elements are $$0.5 + 0.5i$$, and the vector $$\mathbf p$$ of size $$N\times 1$$ whose elements have similar amplitude.

I have noticed that $$\operatorname{tr}\bigg\{\left(\mathbf{X^{-1}\cdot p\cdot p^H\cdot \left(X^H\right)^{-1}}\right)\bigg\}\tag{1}$$ is related into the amplitude of $$\mathbf p$$. where $$\operatorname{tr}$$ is the trace operator.

• For example if $$\mathbf p = 1$$; $$\implies\operatorname{tr}\bigg\{\left(\mathbf{X^{-1}\cdot p\cdot p^H\cdot \left(X^H\right)^{-1}}\right)\bigg\} = 2N$$

• On the other hand, if $$\mathbf p=0.5$$; $$\implies\operatorname{tr}\bigg\{\left(\mathbf{X^{-1}\cdot p\cdot p^H\cdot \left(X^H\right)^{-1}}\right)\bigg\} = \frac N2$$

• And so on.

My question, is there a general formula expressing the relationship between the equation $$(1)$$ and the amplitude of $$\mathbf p$$ ?

The trace of a matrix just scales with the scaling of the matrix:

$$\textrm{tr}\{c\mathbf{A}\}=c\,\textrm{tr}\{\mathbf{A}\}\tag{1}$$

So if you scale the vector $$\mathbf{p}$$, the trace scales with the squared magnitude of the scaling constant. With $$\mathbf{p}=c\mathbf{p}_0$$ you have

\begin{align}\textrm{tr}\{\mathbf{Ap}\mathbf{p}^H\mathbf{A}^H\}&=\textrm{tr}\{\mathbf{A}c\mathbf{p}_0c^*\mathbf{p}_0^H\mathbf{A}^H\}\\&=\textrm{tr}\{|c|^2\mathbf{A}\mathbf{p}_0\mathbf{p}_0^H\mathbf{A}^H\}\\&=|c|^2\textrm{tr}\{\mathbf{A}\mathbf{p}_0\mathbf{p}_0^H\mathbf{A}^H\}\end{align}

• Thanks for your reply, .. but do you mean that $tr{AP_0P_0^HA^H}$ will be constant ? and finally, is it $(A^H)^{-1}$ = $(A^{-1})^H$ ? Nov 4, 2020 at 10:25
• @New_student: $c$ is just a constant with which you scale the vector. So have a fixed vector $p_0$ and the final vector you use is $p=cp_0$. $A$ is just any matrix, it is irrelevant. In your case $A=X^{-1}$. And yes to your last question. Nov 4, 2020 at 10:29
• Thanks again, In that case $tr(AP_0P_0^HA^H)$ if $A$ is diagonal with diagonal elements $0.5+0.5i$ and $P_0 = 1$ should be constant, right? Nov 4, 2020 at 10:34
• Could you please recheck the last equation? because when I made for example $tr(AP_0P_0^HA^H) = 8$ when $P_0 = 1$. Then I changed $P_0 = 0.5$ which means according to your last equality that $|0.5|^2tr(AP_0P_0^HA^H) = 2$ and that's right, but when made $P_0 = 0.25$, $|0.25|^2tr(AP_0P_0^HA^H) = 0.5$ however when doing it in MATLAB, it's $0.125$. I think something is missing in last equation. Nov 4, 2020 at 10:43
• @New_student: The equation looks correct. Nov 4, 2020 at 11:33