let $A\in M_n\mathbb R$ .how prove these statements with following condition? Assume $A\in M_n(\mathbb{R})$, $A\neq 0$ such that:
\begin{align*}
A=(a_{ij}),\ 1\le i,j\le n,\\
a_{ik}a_{jk}=a_{kk}a_{ij},\ \forall\, i,j
\end{align*}
How to prove that:


*

*$\operatorname{trace}(A)\neq0$,

*$A$ is symmetric,

*$x^{n-1}(x-\operatorname{trace}(A))$ is the characteristics polynomial of $A$.


Thanks in advance.
 A: Consider the sum of the squares of each row. For row $i$ we have
$$\sum_{k=1}^na_{ik}^2 = \sum_{k=1}^na_{kk}a_{ii} = \mathrm{tr}(A)a_{ii}$$
Clearly if the trace is zero then so is the squared sum of every row. Hence every entry must be zero contrary to the hypothesis that $A\neq 0$. This is a contradiction, so trace is non-zero.
Now since the trace is non-zero, there exists at least one non-zero entry on the main diagonal, without loss of generality $a_{11}\neq 0$. Then we have for all $i,\ j$
$$a_{ij}=\frac{a_{i1}a_{j1}}{a_{11}} = \frac{a_{j1}a_{i1}}{a_{11}} = a_{ji}$$
Hence the matrix is symmetric. 
Finally, we prove that the matrix is rank $1$. Notice that every column is a linear combination of column $1$ where we assumed that $a_{11}\neq 0$. This is because for each fixed $j$, we have
$$a_{ij} = \frac{a_{j1}}{a_{11}}a_{i1},\ \ \ \ 1\le i \le n$$
so that column $j$ is $\frac{a_{j1}}{a_{11}}$ times column $1$. This shows that the matrix has rank $1$. This in particular means that $x^{n-1}\mid p(x)$ where $p(x)$ is the characteristic polynomial. There is precisely one non-zero root so that
$$p(x)=x^{n-1}(x-\lambda) = x^n - \lambda x^{n-1}$$
The coefficient of $x^{n-1}$ in the characteristic polynomial is precisely $-\mathrm{tr}(A)$ so the result follows.
A: Since $A\neq 0$, it follows from the condition that there exists $k$ such that $a_{k,k}\neq 0$. Indeed, assume that $a_{k,k}=0$ for all $k$, then $a_{i,k}^2=a_{i,k}a_{i,k}=a_{k,k}a_{i,i}=0$ so $a_{i,k}=0$ for all $i,k$. Contradiction.
Now
$$
a_{i,j}=\frac{a_{i,k}a_{j,k}}{a_{k,k}}=\frac{a_{j,k}a_{j,k}}{a_{k,k}}=a_{j,i}
$$
forall $i,j$.
So $A$ is symmetric.
Now note that a sum over $k$ of the condition yields
$$
A^2_{ij}=\mbox({tr}A)A_{i,j}.
$$
So 
$$
A^2=\mbox({tr}A)A.
$$
In particular, 
$$
\mbox{tr}A=\sqrt{\mbox{tr}A^2}=\sqrt{\mbox{tr}A^tA}>0.
$$
Finally, from the former relation, we see that the eigenvalues of $A$ belong to $\{0,\mbox{tr}A\}$.
Thinking about about a diagonalized form of $A$, we see that $0$ must have multiplicity $n-1$ and $\mbox{tr}A$ multiplicity $1$.
So the characteristic polynomial is indeed
$$
p_A(x)=x^{n-1}(x-\mbox{tr}A).
$$
