Q. Let $A$ be an $m \times n$ matrix of rank $1$ and $G$ be an $n \times m$ matrix such that $AGA = A$. Show that the trace of $AG$ is $1$.
Here is an argument
rank$(A) = 1$ implies that $A$ can be written as a product of a column vector $u$ of size $m$ and a row vector $v$ of size $n$, i.e., $A = uv$.
$\operatorname{trace} AB = \operatorname{trace} BA$ for any matrices $A$ and $B$.
Now
$AGA = A \Rightarrow AGuv = uv \Rightarrow (AG)u(v^{T} u) = uv \Rightarrow (AG)u = v$
So
$\operatorname{trace} AG = \operatorname{trace} AGuu^{T}$ (since $uu^{T}$ is a matrix of rank $1$) $= \operatorname{trace} u^TAGu = \operatorname{trace} u^Tvu = v^T u = 1$ (since $A = uv$ and $v^T u = 1$)
Therefore, $\operatorname{trace} AG=1$
Please check this...also you can give another solution...
You could begin with $$uv^TGuv^T=uv^T$$ and applying trace() on both sides with some rearrangement: $$\text{tr}(v^Tuv^TGu)=v^Tu$$ $v^Tu$ is a scalar and can be pulled out, therefore: $$v^Tu\text{tr}(v^TGu)=v^Tu$$ In the end, we have (assuming $v^Tu\neq 0$): $$\text{tr}(AG)=\text{tr}(GA)=\text{tr}(Guv^T)=1$$ It could be that the case $v^Tu= 0$ needs additional treatment.