1

Came across this as an interview question that I saw online: given a covariance matrix with diagonals being all 1 and the off-diagonals being c, what are its eigenvalues?

Going by the definition $Av = \lambda v$, we have $$ \begin{bmatrix} 1&c&..&c \\ c&1&c& ... \\ ...\\ c&c&...&1\\ \end{bmatrix} \begin{bmatrix} v_1\\v_2\\...\\v_n \end{bmatrix} =\lambda \begin{bmatrix} v_1\\v_2\\...\\v_n \end{bmatrix} $$

then it's easy to get $$ (c \times(n-1)+1)*v = \lambda * v$$ and thus $$\lambda = c \times(n-1)+1$$

This is just one eigenvalue. Is there a way to get a solution for all other eigenvalues or is this the best we could do?

wwyws
  • 67
  • 4
  • 2
    Your matrix $A$ can be written as $A=I + cuu^T$ where $u$ is vector of all ones, which implies that eigenvalues of $A$ are also eigenvalues of $uu^T$, but $uu^T$ has rank and therefore only one non-zero eigenvalue. So the rest of the eigenvectors of $A$ are the zero eigenvectors of $uu^T$ and therefore the corresponding eigenvalues of $A$ are all 1. – J. Delaney Feb 23 '22 at 18:05
  • $A = I +cuu^T$ has diagonals c+1 but the matrix I had in mind has diagonals of just 1. Does that make a difference? Also, could you link explanations to why $A$ and $uu^T$ can share eigenvalues and eigenvectors? – wwyws Feb 23 '22 at 19:34
  • 1
    Right it should be $A = (1-c)I + cuu^T$. In general $(\alpha I + A)v=\lambda v \Rightarrow Av = (\lambda - \alpha)v$ by basic algebra, namely if $v$ is an eigenvector of $(\alpha I + A)$ then it also an eigenvector of $A$. You should be able to work out the rest of the details from there – J. Delaney Feb 23 '22 at 19:45
  • I see. So since $A = (1-c)I + cuu^T$, eigenvalules of A are just eigenvalue of $cuu^T$ plus $\alpha$. So the with zero eigenvectors of $cuu^T$ the corresponding eigenvalues of A is simply 0+ 1 +c = 1+c. Thank you again! – wwyws Feb 23 '22 at 20:01

0 Answers0