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\}&amp;=\textrm{tr}\{\mathbf{A}c\mathbf{p}_0c^*\mathbf{p}_0^H\mathbf{A}^H\}\\&amp;=\textrm{tr}\{|c|^2\mathbf{A}\mathbf{p}_0\mathbf{p}_0^H\mathbf{A}^H\}\\&amp;=|c|^2\textrm{tr}\{\mathbf{A}\mathbf{p}_0\mathbf{p}_0^H\mathbf{A}^H\}\end{align}$$