Eigenvalues and Eigenvectors


Eigenvalues and Eigenvectors

Anna
Give us about 25 minutes, and eigenvalues and eigenvectors should finally click. We are going to stop seeing a matrix as merely a grid of numbers and start seeing it as an action that contains predictive information about a system.

Simon
We will do three things. First, we will unpack the equation A V equals lambda V and understand eigenvectors as special directions. Then we will build the algorithm using the determinant of A minus lambda I equals zero. Finally, we will see how eigenvalues predict long-term behavior, including applications such as PageRank, facial recognition, and principal component analysis.

Anna
Let us begin with the basic viewpoint: a matrix is an action. If A is a matrix and V is an input vector, multiplying them gives an output vector, V prime, according to V prime equals A times V. Depending on the matrix, that action can be a rotation, a scaling, a shear, or a mixture of those transformations.

Simon
A shear gives us a useful example because it usually changes a vector's direction. Take A to be the matrix with rows 1, 1 and 0, 1, and let V be the vector with entries 2 and 3. Multiplying gives a top entry of 1 times 2 plus 1 times 3, and a bottom entry of 0 times 2 plus 1 times 3.

Anna
So A V equals the vector with entries 5 and 3. The original vector was 2, 3, while the transformed vector is 5, 3. Visually, the vector has been pushed to the right, or sheared, and its direction has changed.

Simon
That leads to the central question: are there any nonzero vectors whose direction a matrix does not change? They might be stretched or shrunk, but they would remain on their original line. Those are the vectors we are hunting for.

Anna
Let us test the vertical vector, 0, 1, using the same shear matrix. The product is 1, 1, because the top entry is 1 times 0 plus 1 times 1, and the bottom entry is 0 times 0 plus 1 times 1. The vector 0, 1 has become 1, 1, so its direction changed and it fails the test.

Simon
Now try the horizontal vector, 1, 0. The product is 1, 0: the top entry is 1 times 1 plus 1 times 0, and the bottom entry is 0 times 1 plus 1 times 0. This vector is transformed into itself, so its direction remains perfectly unchanged.

Anna
That gives us the first key intuition. An eigenvector is any nonzero vector whose direction is not turned by the transformation. For this shear matrix, the vector 1, 0 is an eigenvector, and every other nonzero vector on that same line, such as 30, 0 or negative 50, is an eigenvector too.

Simon
The complete special line is called an eigenspace. In this example, it is the x-axis. The word nonzero matters because the zero vector technically stays fixed under every matrix, but it has no direction, so it does not count as an eigenvector.

Anna
The second key intuition is that eigenvalues are stretch factors. For our eigenvector 1, 0, the output is also 1, 0, so the vector was multiplied by a factor of 1. That factor is the eigenvalue, written with the Greek letter lambda.

Simon
An absolute eigenvalue greater than 1 means stretching, while an absolute eigenvalue less than 1 means shrinking. If the eigenvalue is negative, the vector is flipped by 180 degrees, but it still lies on the same line. So the direction line is preserved even when the arrow reverses.

Anna
All of that is captured by the equation A V equals lambda V. The left side, A V, means apply the matrix transformation to V. The right side, lambda V, means simply scale V by the number lambda. The equation says that applying A to this special vector has exactly the same effect as scaling it.

Simon
For the shear matrix, the vector 1, 0 has eigenvalue 1, because A times the vector 1, 0 equals 1 times that vector. But visually searching for special directions is not a practical method for a three-by-three matrix, let alone a one-hundred-by-one-hundred matrix. We need a systematic recipe.

Anna
Start with A V equals lambda V. Subtract lambda V from both sides to get A V minus lambda V equals the zero vector. The next instinct is to factor out V, but that seems to produce A minus lambda times V equals zero, and that expression has a problem.

Simon
Exactly. A is a matrix, while lambda is a scalar, just one number. We cannot subtract a scalar directly from a matrix. It would be like trying to subtract the number five from a photograph: the operation is not defined.

Anna
The fix is the identity matrix, I. The identity matrix is the matrix equivalent of the number 1 because multiplying it by a vector leaves that vector unchanged: I V equals V. Therefore, lambda V can be written as lambda I V without changing its value.

Simon
Now the algebra is legitimate. From A V minus lambda V equals zero, replace lambda V with lambda I V. We get A V minus lambda I V equals zero, and now both A and lambda I are matrices. Factoring out V gives the standard form: A minus lambda I, in parentheses, times V equals the zero vector.

Anna
Call the matrix A minus lambda I by the name M. Then the equation becomes M V equals zero. There is always a trivial solution, V equals zero, but eigenvectors must be nonzero. So the real question is: when does this system have a nonzero solution?

Simon
A nonzero solution exists only when M is singular. A singular matrix collapses space into a lower dimension; for example, a two-dimensional transformation might squash the entire plane onto a single line. In that situation, nonzero vectors can be sent to the zero vector.

Anna
The definitive test for singularity is that the determinant is zero. Therefore, for A minus lambda I times V equals zero to have a nonzero solution, we require the determinant of A minus lambda I to equal zero. This is the characteristic equation.

Simon
The characteristic equation is powerful because it temporarily removes V from the problem. Its roots give us the eigenvalues first. Then, for each eigenvalue, we substitute it back into A minus lambda I times V equals zero and solve for the corresponding eigenvectors.

Anna
So the two-step algorithm is simple. Step one: calculate and solve det of A minus lambda I equals zero; its polynomial roots are the eigenvalues. Step two: for each eigenvalue, solve the homogeneous system A minus lambda I times V equals zero to find its eigenvectors and eigenspace.

Simon
Let us apply the recipe to the matrix A with rows 3, 1 and 1, 3. This matrix is symmetric across its main diagonal, and that feature will matter when we interpret the answer.

Anna
First construct A minus lambda I. Subtracting lambda from the diagonal entries gives the matrix with rows 3 minus lambda, 1 and 1, 3 minus lambda. For a two-by-two matrix, the determinant is ad minus bc.

Simon
So the characteristic equation is 3 minus lambda times 3 minus lambda, minus 1 times 1, equal to zero. Expanding and simplifying gives lambda squared minus 6 lambda plus 8 equals zero. Factoring produces lambda minus 4 times lambda minus 2 equals zero.

Anna
Therefore, the two eigenvalues are lambda one equals 4 and lambda two equals 2. These are the two special stretch factors associated with the transformation's special axes.

Simon
Now find the eigenvector for lambda equals 4. Substituting into A minus lambda I gives the matrix with rows negative 1, 1 and 1, negative 1. Applying it to a vector with entries x and y gives the equations negative x plus y equals zero and x minus y equals zero.

Anna
Both equations say y equals x. They are identical, and that is not a mistake. We expect an entire line of solutions, because every nonzero vector in the eigenspace is an eigenvector. Choosing x equals 1 gives y equals 1, so one eigenvector is the vector 1, 1.

Simon
For lambda equals 2, A minus lambda I becomes the matrix with rows 1, 1 and 1, 1. The resulting equation is x plus y equals zero, or y equals negative x. Choosing x equals 1 gives the eigenvector 1, negative 1.

Anna
The result is therefore this: the eigenvalue 4 pairs with the eigenvector 1, 1, and the eigenvalue 2 pairs with the eigenvector 1, negative 1. Along the line y equals x, vectors are stretched by 4. Along the line y equals negative x, they are stretched by 2.

Simon
We can verify the first pair directly. Multiplying the matrix with rows 3, 1 and 1, 3 by the vector 1, 1 gives 4, 4. Multiplying that eigenvector by its eigenvalue, 4 times 1, 1, also gives 4, 4, so the two sides of A V equals lambda V match.

Anna
The symmetry of this matrix gives us two important general facts. Symmetric matrices have real eigenvalues, so we do not get imaginary values here. Also, their eigenvectors are orthogonal when they correspond to these distinct eigenvalues.

Simon
Indeed, the dot product of 1, 1 with 1, negative 1 is 1 times 1 plus 1 times negative 1, which equals zero. A zero dot product means the vectors meet at a right angle. This clean, orthogonal geometry is one reason symmetric matrices are so important in data science: their fundamental axes do not shear or skew.

Anna
Now let us move from calculation to prediction. Imagine a population divided between a city and its suburbs. The transition matrix is A with first row 0.95, 0.10 and second row 0.05, 0.90. The state vector V sub k records the city and suburb populations in year k.

Simon
To find the population after k years, we use V sub k equals A to the power k times V sub zero. Our goal is to predict V sub 50. But calculating the fiftieth power of a matrix by hand would be painful, and it would hide the structure of what is happening.

Anna
If the starting vector were an eigenvector, the calculation would be easy. Since A times V equals lambda V, repeated application gives A to the k times V equals lambda to the k times V. The matrix power becomes an ordinary scalar power.

Simon
The useful fact is that, for most matrices, the eigenvectors form a basis, or a natural coordinate system. That means any starting vector can be written as a combination of the eigenvectors. For the population matrix, write V sub zero as c one times v one plus c two times v two.

Anna
For this population model, the two eigenvalues are a stable value of 1.0 and a decaying value of 0.85, with corresponding eigenvectors v one and v two. Applying A to the decomposed starting vector and using linearity gives V sub 50 equal to c one times A to the 50th times v one plus c two times A to the 50th times v two.

Simon
Now use the eigenvalue relationship on each component. The result is V sub 50 equals c one times 1.0 to the 50th times v one, plus c two times 0.85 to the 50th times v two. This is the general formula for predicting the future state of a linear system when the eigenvectors provide a basis.

Anna
The dominant eigenvalue explains the long-term behavior. The first factor, 1.0 to the 50th, is still 1. The second factor, 0.85 to the 50th, is approximately 0.0000296, which is practically zero.

Simon
So the second term, the component associated with the smaller eigenvalue, almost disappears. After 50 years, V sub 50 is approximately c one times v one. The final population state becomes almost perfectly aligned with the eigenvector corresponding to the dominant eigenvalue.

Anna
That is the deeper meaning of eigenvalues: they reveal the system's long-term trends. A component with an eigenvalue whose absolute value is below 1 decays over repeated applications. A dominant component survives relative to the others, so its eigenvector becomes the system's eventual direction or destiny.

Simon
This same machinery powers important applications, including Google's PageRank and facial recognition. In each case, the matrix is not just a table of numbers; its eigenvalues and eigenvectors expose stable patterns and directions hidden inside the transformation.

Anna
The main ideas are now connected. Eigenvectors are the hidden axes of a transformation: directions that remain on their own lines. Eigenvalues are the stretch factors along those axes. The equation A V equals lambda V expresses both facts at once.

Simon
And the practical method is equally important. Convert the equation to A minus lambda I times V equals zero, set the determinant of A minus lambda I equal to zero to find the eigenvalues, and then substitute each value back to find its eigenvectors.

Anna
The most powerful conclusion is about repeated behavior. The eigenvalue with the largest relevant magnitude tends to dominate over time, and its eigenvector reveals the stable direction toward which the system moves. That is how eigenanalysis predicts a system's long-term state.

Simon
A natural next step is principal component analysis, or PCA. Instead of asking for the axes of a transformation, PCA asks for the important axes of a data set.

Anna
Imagine a cloud of data points. PCA finds the directions in which the data varies most. The first principal component, PC1, is the direction of maximum variance and corresponds to the largest eigenvalue. The second principal component, PC2, is orthogonal to the first and corresponds to the second-largest eigenvalue.

Simon
So PCA uses the same ideas we have learned: eigenvectors provide meaningful axes, eigenvalues measure the importance or amount of variation along those axes, and orthogonality gives a clean coordinate system. You have gone from seeing a matrix as a grid to reading the predictive story hidden inside it.

Ask anything
We've read this whole study set, so questions about it get the best answers.