Most vectors are knocked off their line by a matrix, but a few are only stretched, shrunk or flipped. Meet eigenvectors and eigenvalues as a picture, check a claimed eigenvector with one multiplication, and find them by sweeping round the circle in code.
M03.1.1L2 Intermediate25 minIn review (what this means)
The maths and code on this page are checked by automated tests on every change, but an independent reader has not signed it off yet. Spot a mistake or a confusing step? Tell us.
State the definition of an eigenvector and its eigenvalue, and read it as a picture: the map keeps the vector on its own line and stretches it by the eigenvalue.
Check a claimed eigenvector with one matrix-vector product, and read off its eigenvalue.
Read the eigenvalues of a projection, a reflection and a scaling from their geometry, without algebra.
Find the eigenvector directions of a 2 by 2 matrix numerically by sweeping unit vectors round the circle.
The question
Feed a vector through the same matrix again and again, as a deep network does when its layers share one weight matrix, or as PageRank does when it follows links click after click. Most vectors swing round and change direction at every step. Are there directions that the matrix never turns, only stretches? If so, how do we find them, and what do they tell us about the matrix?
Intuition
A matrix moves every vector of the plane (lesson M02.4). Take a vector, draw the line through it and the origin, and look at where the matrix sends the vector. Almost always the image has left that line: the matrix has turned it.
It sends \(\ihat = (1, 0)\) to \((4, 2)\) and \(\jhat = (0, 1)\) to \((1, 3)\). Both are turned. But the vector \((1, 1)\) goes to \({(4 + 1,\; 2 + 3)} = (5, 5)\), which lies on the very same line, five times as far out.
M03.1.1-F1
The running matrix \(\mat{A}\) turns most vectors off their line (left). Two directions are special: along \(\vect{v}_1 = (1, 1)\) and \(\vect{v}_2 = (1, -2)\) the image stays on the line of the input, stretched 5 times and 2 times (right).
A vector that a matrix keeps on its own line is an eigenvector of the matrix, and the factor it is stretched by is its eigenvalue. “Eigen” is German for “own”: the vector keeps its own line. For \(\mat{A}\) there are two such lines, and on them the whole action of the matrix is a plain stretch. That is why eigenvectors explain a matrix: along them, a complicated map becomes simple multiplication.
Build it up
Step 1. The test is “same line”, not “same arrow”. A vector \(\vect{v}\) and its image \(\mat{A}\vect{v}\) lie on one line through the origin exactly when one is a multiple of the other: \({\mat{A}\vect{v}} = {\lambda\,\vect{v}}\) for some number \(\lambda\), written with the Greek letter lambda by long custom.
Step 2. The number says what happens along the line. If \(\lambda = 2\), the vector doubles. If \(\lambda = \frac12\), it halves. If \(\lambda = -1\), it flips to point the other way along the same line. If \(\lambda = 0\), it is crushed to the origin.
M03.1.1-F2
What the eigenvalue \(\lambda\) does to \(\vect{v}\), always along the line of \(\vect{v}\): stretch, shrink, flip, or collapse to the origin.
Step 3. Some maps tell you their eigenvalues by their shape. Three maps built on the lines \(y = x\) and \(y = -x\) need no algebra at all.
M03.1.1-F4
Eigenvalues read off by geometry. A projection keeps its target line (\(\lambda = 1\)) and crushes the line it projects along (\(\lambda = 0\)). A reflection keeps its mirror (\(\lambda = 1\)) and flips the perpendicular line (\(\lambda = -1\)). A scaling by 2 doubles every vector, so every line is an eigenvector line with \(\lambda = 2\).
The projection onto the line \(y = x\) leaves a vector on that line where it is, so those vectors have \(\lambda = 1\). It sends a vector on the line \(y = -x\) to the origin, so those have \(\lambda = 0\).
The reflection across \(y = x\) leaves the mirror line alone, \(\lambda = 1\), and turns every vector on \(y = -x\) round, \(\lambda = -1\).
The scaling by 2 doubles every vector, so every non-zero vector is an eigenvector with \(\lambda = 2\).
The formal statement
NoteDefinition: eigenvector and eigenvalue
Let \(\mat{A}\) be an \({n \times n}\) matrix. A non-zero vector \(\vect{v}\) in \(\R^n\) is an eigenvector of \(\mat{A}\) if there is a number \(\lambda\) with
\[
\mat{A}\vect{v} = \lambda\,\vect{v}.
\]
The number \(\lambda\) is the eigenvalue that belongs to \(\vect{v}\). A number \(\lambda\) is an eigenvalue of \(\mat{A}\) when at least one non-zero \(\vect{v}\) satisfies the equation.
The matrix must be square, because \(\mat{A}\vect{v}\) and \(\vect{v}\) have to live in the same space to be compared. The vector must be non-zero, because \({\mat{A}\vect{0}} = \vect{0} = {\lambda\,\vect{0}}\) for every number \(\lambda\): allowing the zero vector would make every number an eigenvalue and the word would mean nothing. The eigenvalue itself may be zero.
Consequence 1: an eigenvector is really a line. If \(\vect{v}\) is an eigenvector with eigenvalue \(\lambda\) and \(c \neq 0\) is any number, then \(c\,\vect{v}\) is one too, with the same eigenvalue:
The first step is linearity (M02.4.1), the second uses \({\mat{A}\vect{v}} = {\lambda\vect{v}}\), the third reorders the numbers. So \((1, 1)\), \((2, 2)\) and \((-3, -3)\) are all eigenvectors of \(\mat{A}\) with \(\lambda = 5\). What matters is the line, not the length or the sign.
Consequence 2: in the plane, “same line” is one number. Two vectors \(\vect{v} = (v_1, v_2)\) and \(\vect{w} = (w_1, w_2)\) lie on one line through the origin exactly when the parallelogram they span is flat, that is, when the determinant with them as columns is zero (lesson M02.8.3):
\[
v_1 w_2 - v_2 w_1 = 0 .
\]
This number is often called the two-dimensional cross product. With \(\vect{w} = \mat{A}\vect{v}\) it gives a test that a computer can run on any direction.
Consequence 3: the eigenvalue from the vector. If \({\mat{A}\vect{v}} = {\lambda\vect{v}}\), take the dot product of both sides with \(\vect{v}\):
Division is allowed because \({\vect{v} \cdot \vect{v}} = {\norm{\vect{v}}^2} > 0\) for a non-zero vector. For a unit vector the denominator is 1.
Go deeper: why a straight line through the origin is the natural object
A line through the origin is a one-dimensional subspace: it is closed under adding and scaling. A matrix keeps such a line in place, \({\mat{A}L} \subseteq L\), exactly when the line is spanned by an eigenvector. Axler builds the whole theory on this idea: an operator has a one-dimensional subspace that it maps into itself if and only if it has an eigenvalue (Section 5A). In higher dimensions the same question can be asked of planes and larger subspaces, and the answers lead to the decompositions of the rest of this course.
Worked example
Check that \((1, 1)\) and \((1, -2)\) are eigenvectors of \(\mat{A}\), find their eigenvalues, and show that \((1, 0)\) is not an eigenvector.
M03.1.1-F3
One multiplication per claim. An image that is a multiple of the input confirms an eigenvector and names its eigenvalue; any other image refutes the claim.
Each product is “row times column” for each entry (M02.4.2).
so \(\vect{v}_2 = (1, -2)\) is an eigenvector with \(\lambda_2 = 2\). Last, \({\mat{A}\,(1, 0)} = (4, 2)\). A multiple of \((1, 0)\) has second entry 0, and this one has 2, so \((1, 0)\) is not an eigenvector. The cross-product test agrees: \({1 \cdot 2 - 0 \cdot 4} = 2 \neq 0\), while for \(\vect{v}_1\) it gives \({1 \cdot 5 - 1 \cdot 5} = 0\).
Consequence 3 recovers the eigenvalue from the vector: \({\vect{v}_2 \cdot \mat{A}\vect{v}_2} = {1 \cdot 2 + (-2)(-4)} = 10\) and \({\vect{v}_2 \cdot \vect{v}_2} = 5\), so \(\lambda_2 = 10 / 5 = 2\).
The geometric examples, checked. The projection onto \(y = x\) and the reflection across it have the matrices
Then \({\mat{M}\,(1, 1)} = {\tfrac12\,(2, 2)} = (1, 1)\) and \({\mat{M}\,(1, -1)} = {\tfrac12\,(0, 0)} = (0, 0)\), giving 1 and 0. The reflection swaps the two entries, so \({\mat{N}\,(1, 1)} = (1, 1)\) and \({\mat{N}\,(1, -1)} = (-1, 1)\), giving 1 and \(-1\). The pictures were right.
Code
From scratch: sweep a unit vector round the circle, one degree at a time, and watch the cross-product test of Consequence 2 change sign. Between two neighbouring angles where it changes sign there is an eigenvector line; halving the gap again and again pins it down.
import mathA = [[4, 1], [2, 3]]defapply(M, v):return (M[0][0] * v[0] + M[0][1] * v[1], M[1][0] * v[0] + M[1][1] * v[1])def cross(degrees):"""v1 w2 - v2 w1 for the unit vector v at this angle and its image w = A v.""" a = math.radians(degrees) v = (math.cos(a), math.sin(a)) w =apply(A, v)return v[0] * w[1] - v[1] * w[0]def refine(lo, hi, steps=50):"""Halve the bracket [lo, hi] until the sign change is pinned to a point."""for _ inrange(steps): mid = (lo + hi) /2if (cross(lo) >0) == (cross(mid) >0): lo = midelse: hi = midreturn (lo + hi) /2found = []for d inrange(360):if (cross(d) >0) != (cross(d +1) >0): angle = refine(d, d +1) a = math.radians(angle) v = (math.cos(a), math.sin(a)) w =apply(A, v) lam = v[0] * w[0] + v[1] * w[1] # Consequence 3, with v of length 1 found.append((round(angle, 4), round(lam, 6)))print(found)
Four angles, two lines: \(45^\circ\) and \(225^\circ\) are the two halves of the line of \((1, 1)\), with \(\lambda = 5\), and about \(116.57^\circ\) and \(296.57^\circ\) are the line of \((1, -2)\), with \(\lambda = 2\).
M03.1.1-F6
The sweep of the code. The test is zero exactly where \(\mat{A}\vect{v}\) lies on the line of \(\vect{v}\): twice for each eigenvector line, once for each of its two directions.
NumPy checks a claim in one line, and the same check works for any size of matrix.
import numpy as npA = np.array([[4.0, 1.0], [2.0, 3.0]])for v, lam in [((1, 1), 5), ((1, -2), 2), ((1, 0), None)]: v = np.array(v, dtype=float) image = A @ vprint(v, "->", image, " eigenvector:", lam isnotNoneand np.allclose(image, lam * v))
The sweep found the lines without being told them, but it only works in the plane, and it only notices a change of sign. It can miss two lines that are very close together, and it misses a line where the test touches zero without changing sign: for the shear of lesson M03.1.3 the test is \({-v_2^2}\), never positive, so the sweep finds nothing. The next lesson finds eigenvalues exactly, by algebra.
Explore
M03.1-X1
Eigenvector hunter
Turn the unit vector \(\vect{u}\) with the slider, the step buttons or by dragging its tip, and watch its image \(\mat{A}\vect{u}\). When the two line up, the line lights up and the read-out gives \(\lambda\). Choose another matrix with the buttons, or set its entries.
Things to try:
With \(\mat{A}\), press Next line-up four times. Which angles do you stop at, and which eigenvalue belongs to each?
Choose S. Its eigenvector lines are perpendicular. Is that true for \(\mat{A}\)?
Choose Shear. How many lines light up as you go once round?
Choose Rotation or T, and press Play. Does anything ever line up?
Pitfalls
M03.1.1-F5
Wrong beside right. The reflection \(\mat{N}\) sends \((1, -1)\) to \((-1, 1)\). Testing the direction rejects it; testing the line accepts it with \(\lambda = -1\), which is correct.
“An eigenvector must keep its direction.”
It must keep its line. A negative eigenvalue flips the vector to the other side of the origin, and that still counts: the reflection \(\mat{N}\) has the eigenvalue \(-1\). In data science a negative eigenvalue is a real signal, for example the direction in which a saddle-shaped loss curves downwards (M03.4).
“The zero vector is an eigenvector of every matrix.”
It satisfies \({\mat{A}\vect{0}} = {\lambda\vect{0}}\), but for every \(\lambda\) at once, so it carries no information. The definition excludes it. The eigenvalue 0 is allowed, and it means that a whole line is crushed to the origin: the matrix is not invertible.
“Each eigenvalue has one eigenvector.”
Every non-zero multiple of an eigenvector is another one (Consequence 1). Software has to pick one, and it usually picks a vector of length 1, with either sign. When NumPy prints \((-0.71, -0.71)\) where you wrote \((1, 1)\), nothing is wrong: it is the same line.
Check yourself
Recall
1. State the definition of an eigenvector and its eigenvalue.
Show answer
A non-zero vector \(\vect{v}\) with \({\mat{A}\vect{v}} = {\lambda\vect{v}}\) for some number \(\lambda\); that number is the eigenvalue belonging to \(\vect{v}\).
2. Why is the zero vector never called an eigenvector?
Show answer
Because \({\mat{A}\vect{0}} = {\lambda\vect{0}}\) holds for every \(\lambda\), so it would make every number an eigenvalue.
3. What are the eigenvalues of the projection onto a line, and of the reflection across a line, in the plane?
Show answer
The projection: 1 (vectors on the line) and 0 (vectors it projects along). The reflection: 1 (the mirror line) and \(-1\) (the perpendicular line).
4. How do you check, with one multiplication, that \(\vect{v}\) is an eigenvector?
Show answer
Compute \(\mat{A}\vect{v}\) and see whether it is a multiple of \(\vect{v}\). If it is, the multiple is the eigenvalue.
5. Which test tells, in the plane, whether \(\vect{v}\) and \(\mat{A}\vect{v}\) lie on one line?
Show answer
With \(\vect{w} = \mat{A}\vect{v}\), the cross product \({v_1 w_2 - v_2 w_1}\) is zero: the determinant with columns \(\vect{v}\) and \(\vect{w}\) vanishes.
Exercises
1.★ For \(\mat{S} = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\), decide which of \((1, 1)\), \((1, -1)\) and \((2, 1)\) are eigenvectors, and give the eigenvalues.
Show solution
\({\mat{S}\,(1, 1)} = {(2 + 1,\; 1 + 2)} = (3, 3) = {3\,(1, 1)}\): an eigenvector with \(\lambda = 3\). \({\mat{S}\,(1, -1)} = {(2 - 1,\; 1 - 2)} = (1, -1)\): an eigenvector with \(\lambda = 1\). \({\mat{S}\,(2, 1)} = {(4 + 1,\; 2 + 2)} = (5, 4)\). The cross product is \({2 \cdot 4 - 1 \cdot 5} = 3 \neq 0\), so \((2, 1)\) is not an eigenvector.
2.★★ A matrix \(\mat{A}\) has the eigenvector \(\vect{v}\) with eigenvalue 3. Show that \(\vect{v}\) is an eigenvector of \(\mat{A}^2 = \mat{A}\mat{A}\) and find its eigenvalue. Check on the running \(\mat{A}\) with \(\vect{v} = (1, -2)\), using \(\mat{A}^2 = \begin{bmatrix} 18 & 7 \\ 14 & 11 \end{bmatrix}\).
Show solution
Apply \(\mat{A}\) twice and use the eigenvector equation each time:
So \(\vect{v}\) is an eigenvector of \(\mat{A}^2\) with eigenvalue 9. On the running \(\mat{A}\) the eigenvalue of \((1, -2)\) is 2, so the same steps predict \(2^2 = 4\), and indeed \({\mat{A}^2\,(1, -2)} = {(18 - 14,\; 14 - 22)} = (4, -8) = {4\,(1, -2)}\).
3.★★★ Show that a rotation of the plane by \(90^\circ\), \(\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\), has no real eigenvector, first by geometry and then with the cross-product test.
Show solution
Geometry. The rotation turns every non-zero vector by a right angle, so its image is perpendicular to it and never on its line.
Algebra. The rotation sends \((v_1, v_2)\) to \(\vect{w} = (-v_2, v_1)\). The cross product is
which is the squared length of \(\vect{v}\) and so is positive for every non-zero \(\vect{v}\). It is never zero, so no non-zero vector stays on its line. Lesson M03.1.4 finds the eigenvalues this rotation does have: complex ones.
Summary card
An eigenvector is a direction a matrix only stretches; the eigenvalue is the stretch.
M03.1.1-F1
Kept on their line, only stretched.
Definition.\({\mat{A}\vect{v}} = {\lambda\vect{v}}\) with \(\vect{v} \neq \vect{0}\).
A line, not an arrow. Every \(c\,\vect{v}\) with \(c \neq 0\) has the same \(\lambda\).
Check. One product \(\mat{A}\vect{v}\); in the plane, \({v_1 w_2 - v_2 w_1} = 0\).
Eigenvalue from vector.\(\lambda = \frac{\vect{v} \cdot \mat{A}\vect{v}}{\vect{v} \cdot \vect{v}}\).
Running \(\mat{A}\).\((1, 1)\) with 5 and \((1, -2)\) with 2.
Sources and next steps
Sources. Each was opened and checked against this lesson on 15 November 2026.
Gilbert Strang, Eigenvalues and eigenvectors, MIT OpenCourseWare 18.06SC, lecture 21, and its lecture summary. Eigenvectors are the vectors for which \(Ax\) is parallel to \(x\); a projection has eigenvalues 1 and 0, and the matrix with rows \((0, 1)\) and \((1, 0)\) has eigenvectors \((1, 1)\) and \((1, -1)\) with eigenvalues 1 and \(-1\).
Dan Margalit and Joseph Rabinoff, Interactive Linear Algebra, Section 5.1 (open textbook, Georgia Tech). The definition, with eigenvectors non-zero by definition, and the reflection whose mirror line has eigenvalue 1 and whose perpendicular line has eigenvalue \(-1\).
Grant Sanderson, Eigenvectors and eigenvalues, 3Blue1Brown, Linear Algebra, chapter 14. Eigenvectors as vectors that stay on their own span; a scaling makes every vector an eigenvector, and a rotation of the plane has none.
Sheldon Axler, Linear Algebra Done Right, 4th edition (open access), Section 5A. Definition 5.8 requires an eigenvector to be non-zero, and the discussion before it links eigenvalues to one-dimensional subspaces that the operator maps into themselves.