For a unstructured square complex matrix X. Show that
$\frac{\partial Tr(X^n)}{\partial X}=n(X^{n-1})^T $ and $\frac{\partial Tr(X^n)}{\partial X^*}=n(X^{n-1})^T$.
I think $\frac{\partial Tr(X^n)}{\partial X}=Tr(\frac{\partial X^n}{\partial X})=Tr(nX^{n-1})$,However,i stuck here, How does the $Tr(nX^{n-1})$ become $n(X^{n-1})^T$?and why does the $\partial X$ become $\partial X^*$,the answer will become zero?
EDIT. Here $X$ is a real matrix (and not a complex one). $M_p$ is the set of $p\times p$ real matrices.
Let $f:X\in M_p\rightarrow tr(X^n)$. Then the derivative is
$Df_X:H\in M_p\rightarrow tr(HX^{n-1}+XHX^{n-2}+\cdots +X^{n-1}H)$
$=ntr(HX^{n-1})$
and finally $Df_X(H)=<H,n{X^{n-1}}^T>$ (the scalar product on the matrices: $<U,V>=tr(UV^T)$).
Then the gradient is $\nabla(f)(X)=n{X^{n-1}}^T$.
Since $X$ is real and $X^*$ is the conjugate, then $X^*=X$ and the gradient is the same as above.