Eigenvalues of the All-Ones Matrix

Linear Algebra · Medium · Free problem

Let $J$ be the $3 \times 3$ matrix where every entry is $1$.

Find all eigenvalues of $J$ and their multiplicities. What are the corresponding eigenvectors?

Then generalize: what are the eigenvalues of the $n \times n$ all-ones matrix?

Hints

  1. Think about the rank of the matrix -- what does rank tell you about how many nonzero eigenvalues there can be?
  2. The all-ones matrix can be written as an outer product $J = \mathbf{1}\mathbf{1}^T$. Apply $J$ to the vector $\mathbf{1}$ itself.
  3. Use the trace to pin down the nonzero eigenvalue: $\text{tr}(J) = \sum \lambda_i$, and if only one $\lambda_i$ is nonzero, it equals the trace.

Worked Solution

How to Think About It: Before computing anything, think about what this matrix does geometrically. The all-ones matrix $J$ takes any vector and projects it (with scaling) onto the direction $(1, 1, 1)^T$. Specifically, $Jv = (\mathbf{1}^T v)\,\mathbf{1}$, so it sums the components and puts that sum in every entry. This is a rank-1 matrix, which immediately tells you there is one nonzero eigenvalue and the rest are zero. In a quant interview, saying "it's rank 1, so there's one nonzero eigenvalue" before doing any algebra is exactly the right opening.

Quick Estimate: The nonzero eigenvalue must equal the trace (since the other eigenvalues are zero). $\text{tr}(J) = 3$, so $\lambda_1 = 3$. Done.

Approach: Confirm via direct computation and find eigenvectors.

Formal Solution:

Write $J = \mathbf{1}\mathbf{1}^T$ where $\mathbf{1} = (1, 1, 1)^T$.

Eigenvalue $\lambda_1 = 3$:

$$J\mathbf{1} = \mathbf{1}(\mathbf{1}^T \mathbf{1}) = 3\,\mathbf{1}$$

So $\mathbf{1} = (1, 1, 1)^T$ is an eigenvector with eigenvalue $3$.

Eigenvalue $\lambda_{2,3} = 0$:

Since $\text{rank}(J) = 1$, the null space has dimension $3 - 1 = 2$. Any vector orthogonal to $\mathbf{1}$ is in the null space:

$$J v = \mathbf{1}(\mathbf{1}^T v) = \mathbf{0} \quad \text{whenever } \mathbf{1}^T v = 0$$

Two linearly independent null vectors: $v_2 = (1, -1, 0)^T$ and $v_3 = (1, 0, -1)^T$.

Generalization: The $n \times n$ all-ones matrix $J_n = \mathbf{1}_n \mathbf{1}_n^T$ has: - Eigenvalue $n$ with multiplicity $1$ (eigenvector $\mathbf{1}_n$) - Eigenvalue $0$ with multiplicity $n - 1$ (any vector orthogonal to $\mathbf{1}_n$)

This follows from the same rank-1 argument: $\text{rank}(J_n) = 1$, $\text{tr}(J_n) = n$.

Answer: The eigenvalues of the $3 \times 3$ all-ones matrix are $\lambda = 3$ (multiplicity 1) and $\lambda = 0$ (multiplicity 2). For the $n \times n$ case: eigenvalue $n$ (multiplicity 1) and $0$ (multiplicity $n-1$).

Intuition

This problem is really about recognizing rank-1 structure. Any matrix of the form $uv^T$ has rank 1, one nonzero eigenvalue equal to $v^T u$ (or equivalently the trace), and a null space of dimension $n-1$. This pattern shows up constantly -- in PCA (the leading term of the SVD is rank 1), in covariance estimation (sample covariance of a single factor is rank 1), and in perturbation theory (rank-1 updates via the Sherman-Morrison formula).

The deeper lesson is that the spectral decomposition of simple structured matrices should be instant pattern recognition, not a characteristic polynomial calculation. In an interview, the moment you see "all entries are 1" you should say "rank 1, eigenvalues are $n$ and $0$." Interviewers are testing whether you have geometric intuition about matrices or whether you mechanically compute $\det(J - \lambda I) = 0$.

Open the full interactive solver →