# Eigenvalues and Eigenvectors

Computer Science I · Algebra · https://tryals.app/learn/computer-science-i/eigenvalues-and-eigenvectors

## Directions That Only Stretch

Most vectors change direction under a linear transformation. But some special vectors are only **scaled**: the transformation stretches or shrinks them without rotating them. Such a vector is an **eigenvector**, and its scale factor is the **eigenvalue** $\lambda$.

The defining equation is:
$$A v = \lambda v, \qquad v \neq \mathbf{0}$$

Applying matrix $A$ to eigenvector $v$ gives back $v$ scaled by $\lambda$. Along an eigenvector, complex matrix action becomes simple multiplication by a number.

| Magnitude / Sign | Effect on Direction | Behavior |
| --- | --- | --- |
| $\lvert\lambda\rvert > 1$ | Same or flipped | **Stretched** |
| $\lvert\lambda\rvert < 1$ | Same or flipped | **Shrunk** |
| $\lambda < 0$ | **Flipped** | Opposite direction |

Repeatedly applying $A$ is governed by its eigenvalues; the largest-magnitude eigenvalue eventually dominates systems like Markov chains.

## Finding and Using Eigenvalues

To find eigenvalues, solve the **characteristic equation**:
$$\det(A - \lambda I) = 0$$

This reuses the determinant's singular test because $Av = \lambda v$ means $(A - \lambda I)v = 0$ has a nonzero solution, requiring $A - \lambda I$ to be singular.

Eigenvalues drive major algorithms: **PageRank** ranks web pages via the dominant eigenvector of a link matrix, and **principal component analysis** compresses data along top eigenvectors.

> **Common pitfall:** Forgetting that an eigenvector must be **nonzero** ($v \neq \mathbf{0}$) and must keep its **direction**. The zero vector trivially satisfies the equation for any $\lambda$, so it is excluded. An eigenvector must map to a **scalar multiple of itself**, not merely change in size while rotating.

## Practice questions

5 of this lesson's 9 practice questions, with answers. The full set is in the app.

### 1. PageRank ranks web pages using the principal eigenvector of a link matrix. Why should an eigenvector be the right object for ranking importance?

A. Because eigenvectors are the largest vectors associated with a matrix, and importance means largest.
B. Because importance is defined circularly, which is what an eigenvector is.
C. Because eigenvectors are faster to compute than sorting pages by link count.
D. Because any ranking problem can be solved by an eigenvector, regardless of its structure.

**Answer:** B. Because importance is defined circularly, which is what an eigenvector is.

**Why:** The definition is circular by design, a page is important if important pages link to it, and writing that out gives Av = λv. So the circularity that makes it look useless is exactly what an eigenvector resolves. Power iteration is both the proof that it settles and the algorithm at web scale, which is why the same mathematics appears in spectral clustering and recommenders.

Page: https://tryals.app/practice/computer-science-i/eigenvalues-and-eigenvectors/pagerank-ranks-web-pages-using-the-principal-eigenvector-of-a-link

### 2. Sort each statement about eigenvalues and eigenvectors as true or false.

**Answer:**

- True: An eigenvector must be nonzero, The eigenvalue is the scale factor along the eigenvector, A negative eigenvalue flips the eigenvector's direction
- False: Every vector is an eigenvector of every matrix

**Why:** Eigenvectors are nonzero by definition, the eigenvalue is the scale factor, and a negative eigenvalue reverses direction. But only special vectors are eigenvectors of a general matrix, most change direction.

Page: https://tryals.app/practice/computer-science-i/eigenvalues-and-eigenvectors/sort-each-statement-about-eigenvalues-and-eigenvectors-as-true-or

### 3. PageRank computes its scores by multiplying a vector by the link matrix over and over until it stops changing. Why does that converge to the answer?

A. Because each iteration reduces the error by a fixed amount until it reaches zero
B. Because repeated multiplication amplifies the dominant eigenvector
C. Because the matrix is symmetric, which guarantees convergence
D. Because the vector is normalised after each step, which forces a limit

**Answer:** B. Because repeated multiplication amplifies the dominant eigenvector

**Why:** Each multiplication scales every eigen-component by its eigenvalue, so the largest dominates and the rest fade, the fixed point is the principal eigenvector. Power iteration is both the proof the circular definition settles and the algorithm for computing it at web scale, with no eigen-solver required.

Page: https://tryals.app/practice/computer-science-i/eigenvalues-and-eigenvectors/pagerank-computes-its-scores-by-multiplying-a-vector-by-the-link

### 4. The diagonal matrix with rows (5, 0) and (0, -1) acts on the plane. Select every TRUE statement.

A. It stretches the x-direction by 5
B. It flips the y-direction
C. (1, 1) is an eigenvector
D. (0, 1) is an eigenvector with eigenvalue -1
E. (1, 0) is an eigenvector with eigenvalue 5

**Answer:** A. It stretches the x-direction by 5; B. It flips the y-direction; D. (0, 1) is an eigenvector with eigenvalue -1; E. (1, 0) is an eigenvector with eigenvalue 5

**Why:** The axis vectors are eigenvectors: (1,0) scales by 5, (0,1) by -1 (a flip). But A(1,1) = (5,-1), which is not a multiple of (1,1), so (1,1) is not an eigenvector.

Page: https://tryals.app/practice/computer-science-i/eigenvalues-and-eigenvectors/the-diagonal-matrix-with-rows-5-0-and-0-1-acts-on-the-plane

### 5. An eigenvector keeps its direction under the matrix but may be stretched, shrunk or flipped.

**Answer:** True

**Why:** True. $Av = \lambda v$ preserves the direction and scales by $\lambda$, so the vector may lengthen, shorten or reverse; only $\lambda = 1$ leaves it untouched. That preserved direction is what makes eigenvectors the axes along which repeated application behaves simply, the basis of PageRank and PCA.

Page: https://tryals.app/practice/computer-science-i/eigenvalues-and-eigenvectors/an-eigenvector-keeps-its-direction-under-the-matrix-but-may-be
