0

Versions of this question have been asked before (here, here, here). However, I am asking again for two reasons:

  1. My question is slightly different—it's about eigenvalues/vectors, not determinants—, and I don't know enough linear algebra to see the obvious connections, if they exist.
  2. I was asked this during a job interview and therefore assume the interviewer did not want me to appeal to theorems, e.g. here.

The question: Find the eigenvalues/eigenvectors of the $N \times N$ matrix

$$ A = \begin{bmatrix} N & 1 & 1 & \dots & 1 \\ 1 & N & 1 & \dots & 1 \\ 1 & 1 & N & \dots & 1 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & 1 & \dots & N \end{bmatrix} $$

Is there an simple (interview-level) way to reason about this question? If I'm missing some obvious connection to the answer here, I'm happy to learn and to then close this question.

jds
  • 2,274
  • 3
  • 24
  • 35
  • 5
    write it as $N-1$ times identity plus the all-ones matrix $E$. You will find that the eigenvectors are the same as $E$, and the eigenvalues are $N-1$ plus the ones of $E$ – Exodd Oct 27 '20 at 12:36
  • 1
    It is sufficient to know two things to solve this question. (1). How to determine the eigenvalues/vectors of a matrix of pattern $ab^T$, where $a$ and $b$ are column vectors. (2). If $\lambda$ is an eigenvalue of $A$, then $f(\lambda)$ is an eigenvalue of $f(A)$, where $f$ is a polynomial. – Zhanxiong Oct 27 '20 at 13:42
  • @Exodd, I don't follow such a short answer. Can you expand? Your comment seems the same as this answer, but I don't understand phrases like the "characteristic of the ground field". – jds Oct 28 '20 at 12:56

2 Answers2

1

Call $E$ the all-ones $N\times N$ matrix. Notice that $A = (N-1)I + E$

Let now $v_1,v_2,\dots,v_n$ be a base of eigenvectors for $E$ with eigenvalues $\lambda_1,\lambda_2,\dots,\lambda_n$. Notice that $$ Ev_i = \lambda_iv_i \implies Av_i = [(N-1)I + E]v_i = (N-1)v_i + \lambda_i v_i = (N-1+\lambda_i)v_i $$ so the eigenvalues of $A$ are $N-1+\lambda_i$ with eigenvectors $v_i$.

You can now focus on finding eigevalues/vectors of $E$, that has been answered already

Exodd
  • 10,844
0

An orthogonal matrix of eigenvectors is given by

$$ P= \tiny \left( \begin{array}{rrrrrrrrrr} 1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 2 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 3 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 4 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 5 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 6 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 7 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 8 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 9 \end{array} \right) \left( \begin{array}{rrrrrrrrrr} \frac{1}{\sqrt{10}} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & \frac{1}{\sqrt{2}} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{1}{\sqrt{6}} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{1}{\sqrt{12}} & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & \frac{1}{\sqrt{20}} & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{30}} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{42}} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{56}} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{72}} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{90}} \end{array} \right). $$

multiplied on the right by a diagonal matrix to adjust each column to vector length $1$

The two matrices, full size, are

$$ \left( \begin{array}{rrrrrrrrrr} 1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 2 & -1 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 3 & -1 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 4 & -1 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 5 & -1 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 6 & -1 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 7 & -1 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 8 & -1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 9 \end{array} \right) $$ $$ \left( \begin{array}{rrrrrrrrrr} \frac{1}{\sqrt{10}} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & \frac{1}{\sqrt{2}} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac{1}{\sqrt{6}} & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & \frac{1}{\sqrt{12}} & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & \frac{1}{\sqrt{20}} & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{30}} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{42}} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{56}} & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{72}} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{1}{\sqrt{90}} \end{array} \right). $$

Will Jagy
  • 139,541