← Back to all articles

Eigenvalues and Eigenvectors of a Special Matrix

8/18/2023

Problem Statement

Given an n×nn \times n square matrix with nn on the diagonal entries and 11 in every other entry. Find eigenvalues and eigenvectors of this matrix and justify why.

This is one of the problems that I was quizzed on in my Linear Algebra & Applied Matrix Theory course at Stanford. I recently re-discovered it while reading the lecture notes and the textbook to review SVD.

Give yourself sufficient amount of time to attempt this problem and read the solutions below.

Solution

Let An\mathbf A_n denote the n×nn \times n matrix of our interest.

First Pass: A Naïve Approach

For a 2×22 \times 2 matrix, it's not difficult to manually find the eigenvalues and eigenvectors. With

A2=[2112]\mathbf A_2 = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}

and solve for the characteristic polymonial det(A2λI2)=0\det (\mathbf A_2 - \lambda I_2) = 0. We have (2λ)21=0(2 - \lambda)^2 - 1 = 0, hence λ1=1\lambda_1 = 1 and λ2=3\lambda_2 = 3. The associated eigenvectors are, respectively,

v1=[11],v2=[11].\mathbf v_1 = \begin{bmatrix} 1 \\ -1 \end{bmatrix}, \mathbf v_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix}.

We can proceed with a similar approach with A3\mathbf A_3. However, as we can see without going further, the characteristic polynomial we have to solve gets increasingly complicated. Fortunately, once we discover a pattern, an elegant solution presents itself.

Transforming An\mathbf A_n Into a Matrix of All Ones

Since all the entries except for the diagonal entries are 11, we can focus on a second type of matrix Bn=An(n1)In\mathbf B_n = \mathbf A_n - (n-1)\mathbf I_n. Notice that Bn\mathbf B_n is a matrix of all 11 s, or equivalently, 11\mathbf 1 \mathbf 1^\top, hence a rank-1 matrix. That Bn\mathbf B_n is rank 1 is not difficult to see, since all nn column vectors are identical and its column space Col(Bn)=span([1,1,1,1])\text{Col}(\mathbf B_n) = \text{span}\left( \begin{bmatrix} 1, 1, 1, 1 \end{bmatrix}^\top \right). By the rank-nullity theorem, the nullity of Bn\mathbf B_n is n1n-1. This in turn signifies that Bn\mathbf B_n has n1n-1 eigenvalues of 00 and a single non-zero eigenvalue.

By inspection, we can see that [1,1,1,1]\begin{bmatrix} 1, 1, 1, 1 \end{bmatrix}^\top is the eigenvector of Bn\mathbf B_n with the associated eigenvalue nn. In the case of 3×33 \times 3 example,

[111111111][111]=3[111].\begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{bmatrix}\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} = 3 \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}.

Since all the other eigenvalues are 00 s, we can obtain the eigenvectors by computing Bnv=0\mathbf B_n \mathbf v = 0, where v=[v1,,vn]\mathbf v = \begin{bmatrix}v_1, \cdots, v_n \end{bmatrix}^\top is the eigenvector. For an arbitrary n1n \geq 1, this yields the equation v1+v2++vn=0v_1 + v_2 + \cdots + v_n = 0 and thus v1=v2vnv_1 = -v_2 -\cdots - v_n. Jumping ahead quite a tedious computation, we end up with the following

v=v2[1100]++vn[1001].\mathbf v = v_2 \begin{bmatrix} -1 \\ 1 \\ 0 \\ \vdots \\ 0\end{bmatrix} + \cdots + v_n \begin{bmatrix} -1 \\ 0 \\ \vdots \\ 0 \\ 1 \end{bmatrix}.

where not all of viv_i 's where 2in2 \leq i \leq n are zeroes. We have just found n1n-1 other eigenvectors!

Let's put it together now. From the definition of eigenvalues and eigenvectors, we have Bnv=λv\mathbf B_n \mathbf v = \lambda \mathbf v. Then, if we let μ\mu be the eigenvalue of An\mathbf A_n,

Bnv=(An(n1)In)v=μv(n1)Inv=λvμv=(λ+(n1))v\begin{align*} &\mathbf B_n \mathbf v = (\mathbf A_n - (n-1)\mathbf I_n) \mathbf v = \mu \mathbf v - (n-1)\mathbf I_n \mathbf v = \lambda \mathbf v \\ &\Rightarrow \mu \mathbf v = (\lambda + (n-1)) \mathbf v \end{align*}

Since the eigenvalues of Bn\mathbf B_n are 00 with multiplicity n1n-1 and nn with multiplicity 11, we conclude that the eigenvalues of An\mathbf A_n are n1n-1 with multiplicity n1n-1 and 2n12n - 1 with multiplicity 11. The eigenvectors are invariant, hence identical as above.

Ending Remarks

I always find linear algebra so enticing and its theorems beautiful. There are plenty of intriguing high-quality problems on websites such as Stack Overflow, and I intend to present more problems of this kind in the future. Send me a message if you have any problems to suggest!

© 2023 Ji Hun Wang. All Rights Reserved.