I am learning linear algebra and now I'm in eigenvalues and eigenvectors part of it. there is a question that I can't solve it or any idea that I have is hard and nasty. I think this question must have a trick that I am not familiar with it because I'm new to eigenvalues and eigenvectors.
the question is this:
Let $M \in \Bbb R^{n\times n}$ and real numbers $a_1$ to $a_n$ and every $m_{ij} = \frac{a_i}{a_j}$, so: $$ M = \begin{pmatrix}1&\cdots&\frac{a_1}{a_n}\\\vdots&\ddots&\vdots\\\frac{a_n}{a_1}&\cdots&1\end{pmatrix} $$ find all eigenvalues.
any help would be appreciated.
Another way to do this is by noting that if $\mathbf{a} = (a_1, \dots, a_n)^\top$ and $\mathbf{b} = (1/a_1, \dots, 1/a_n)^\top$, then $$ M = \mathbf{a} \mathbf{b}^\top, $$ where $\mathbf{b}^\top$ denotes the transpose of $\mathbf{b}$. The rank of $M$ is therefore 1 (can you see why?), meaning that only one eigenvalue is non-zero. This eigenvalue is found by considering $$ M \mathbf{a} = (\mathbf{a} \mathbf{b}^\top) \mathbf{a} = \mathbf{a} (\mathbf{b}^\top \mathbf{a}) = n \mathbf{a}, $$ i.e. the final eigenvalue is $n$.