Factorize the polynomial
$$P(x)= \begin{vmatrix} a_1^2-x & a_{1}a_2 & a_1a_3 & \cdots & a_1a_n \\ a_2a_1 & a_2^2-x & a_{2}a_3 & \cdots & a_2a_n\\ a_3a_1 & a_3a_2 & a_3^2-x & \cdots & a_3a_n \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ a_na_1 & a_na_2 & a_na_3 & \cdots & a_n^2-x\\ \end{vmatrix}$$
I was thinking of getting the eigenvalues for the matrix , however i couldn't find a way to determine them.
I also tried to get the determinant for n=2 :
determinant = $X(X-(a_1^2+a_2^2))$
However that alone is not sufficient to generalize the determinant
Any hints or advices appreciated.
I would also be grateful if anyone would know somewhere where i can tackle similar problems .
Thanks in advance.
The determinant is the characteristic polynomial of the matrix $$ \begin{pmatrix} a_1^2 & a_{1}a_2 & a_1a_3 & \cdots & a_1a_n \\ a_2a_1 & a_2^2 & a_{2}a_3 & \cdots & a_2a_n\\ a_3a_1 & a_3a_2 & a_3^2 & \cdots & a_3a_n \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ a_na_1 & a_na_2 & a_na_3 & \cdots & a_n^2\\ \end{pmatrix} =(a_1,...,a_n)^T\cdot(a_1,...,a_n) $$ As mentioned in the comments, this matrix has rank $1$ and so has a kernel of dimension $n-1$. Thus, $0$ is an eigenvalue of multiplicity $n-1$.
The cases $n=1,2,3$ suggest that $a_1^2+a_2^2+\cdots+a_n^2$ is an eigenvalue with eigenvector $(a_1, a_2, \dots, a_n)$, which is easy to verify.
Therefore, the characteristic polynomial of the matrix is $(-1)^{n}x^{n-1}(x-(a_1^2+a_2^2+\cdots+a_n^2))$.