In P1.B5 you saw that a matrix warps the whole plane: most arrows are turned and stretched at the same time. In P1.B8 you met a number, the determinant, that tells you how much area is stretched. But a single number cannot say how the plane is warped. Is there a simpler way to see what a matrix does?
There is, and it comes from asking: are there any directions that the matrix does not turn? If a matrix sends an arrow to a longer, shorter or reversed arrow along the same line, the arrow is easy to understand: the matrix just multiplies it by a number. Those special directions and their numbers are the eigenvectors and eigenvalues (from the German eigen, “own” or “characteristic”: they are the matrix’s own directions). This lesson shows how to find them, what they tell you, and why they predict what happens when you apply a matrix again and again.
A direction that only stretches
Take the symmetric matrix of P1.B8:
Apply it to three vectors:
The first vector is turned: points along the -axis, and points somewhere else. But lands on , the same direction, three times as long, and lands on itself. These two directions are the only ones that does not turn.
That is the definition. A non-zero vector is an eigenvector of a square matrix if
for some number , called its eigenvalue (the Greek letter lambda). So is an eigenvector of with eigenvalue , and is one with eigenvalue . Only square matrices have eigenvectors: must have the same length as to be compared with it.
Why is the zero vector excluded? Because is true for every matrix and every , so it would tell you nothing. Notice the difference: the vector is never an eigenvector, but the number is allowed as an eigenvalue (you will see what it means below).
The widget draws the eigen-directions of any matrix. It starts with the matrix above.
Things to try:
- At the start, the green solid line runs along with and the dashed one along with . The vector is on neither, so the pink points a different way, closer to the line.
- Press Put v on eigen-direction 1. Now is on the same line, three times as long, and the status says “Av = λv with λ = 3”. Press Put v on eigen-direction 2: .
- Press Diagonal ( and ): the eigen-directions are the two axes. Press Triangular: the directions are for and for , and they are not perpendicular.
- Press Shear: there is only one green line. Press Rotate 30°: there is none, and the status says so. Press Scale (2I): every direction is an eigen-direction.
- Press Project ( and ) and put on eigen-direction 2: is the zero vector (a squash). Press Reflect ( and ) and do the same: (a flip).
- Start from Symmetric and use the sliders to make and equal, non-zero and different from : the two green lines stay perpendicular. Then make them different (for example , ): the lines are no longer perpendicular.
Intuition
Picture the plane as a sheet of rubber with a grid printed on it. A matrix grabs the sheet and deforms it: stretching, squashing, turning, shearing. Most printed arrows end up pointing a new way. But for many matrices there are one or two lines through the origin that stay lines: arrows along them are only made longer, shorter, or reversed. Those lines are the eigen-directions, and they are the “grain” of the deformation.
The analogy breaks in three places. A sheet of rubber cannot be turned over by pulling, but a negative eigenvalue flips an arrow to the other side of the origin. Some deformations have no such grain at all: a rotation turns every direction. And in a shear there is one grain line, not two.
Math
with . Here is , is a vector, and is a scalar (a plain number). The equation can be rearranged to , which is how you solve for them (next sections).
The set of all vectors with , together with , is the eigenspace of . For the matrix above, the eigenspace of is the line .
Code
import numpy as np
A = np.array([[2, 1], [1, 2]])
print(A @ np.array([1, 1])) # [3 3] = 3 * (1, 1)
print(A @ np.array([1, -1])) # [ 1 -1] = 1 * (1, -1)
print(A @ np.array([1, 0])) # [2 1] is not a multiple of (1, 0)The NumPy section below shows how to ask the computer for all the eigenvectors at once.
What the eigenvalue tells you
Along an eigen-direction the matrix is just multiplication by a number, so says exactly what happens to that line:
- : stretched (like above).
- : left alone (like above).
- : shrunk towards the origin.
- : flipped to the other side of the origin, and stretched or shrunk by .
- : squashed onto the origin. Every vector on that line is sent to , so the line is part of the null space (P1.B7). A square matrix has eigenvalue exactly when it squashes something, that is, when and it has no inverse (P1.B8, P1.B9).
An eigenvector is a direction, not one special arrow. If then for any number ,
so every non-zero multiple of , including , is an eigenvector with the same . , and are all eigenvectors for . That is why the widget draws a line, and why software returns eigenvectors scaled to length (with an arbitrary sign).
Different eigenvalues give different directions. Suppose were a multiple of , say , with eigenvalues and . Then , but also . So , which forces . Eigenvectors for different eigenvalues are never on the same line (in higher dimensions, they are linearly independent).
Finding eigenvalues of a 2×2 matrix
Start from and move everything to one side: . We want a non-zero that sends to . A matrix does that only if it squashes the plane, and P1.B8 says that happens exactly when its determinant is :
This is the characteristic equation. For :
So the eigenvalues solve
where and .
Example. For the trace is and the determinant is , so and or . (The widget shows this equation for every matrix.)
Then find the eigenvector for each by solving :
- : . Both rows say , so and .
- : . Both rows say , so .
In both cases the two rows are copies of each other. That is not a coincidence: is singular, so its rows are dependent. If your two rows are not multiples of each other, you have made an arithmetic slip in . It is also a quick check: always confirm with .
Trace and determinant give a shortcut. The two roots of add up to the trace and multiply to the determinant. So for a matrix:
For the example, and . This is the fact that P1.B8 previewed: the determinant is the product of the eigenvalues, which makes sense because the matrix stretches one direction by and another by , so areas are multiplied by . If you know the trace and the determinant, look for two numbers with that sum and product. And if , one eigenvalue is .
The quadratic formula gives , and the number under the root, , decides the case:
- positive: two different real eigenvalues, so two eigen-directions;
- zero: one repeated eigenvalue;
- negative: no real eigenvalues. The matrix has no real eigen-directions: it turns every direction.
Bigger matrices work the same way: is a polynomial of degree , so an matrix has at most eigenvalues (counting repeats, and allowing complex ones there are exactly ), and for any square matrix the sum of the eigenvalues is the trace and their product is the determinant. For instance, has eigenvalues , and , with sum and product . For large matrices software does not solve the polynomial: there is no general formula (using roots and the four basic operations) for the roots of a polynomial of degree or more, so it uses iterative numerical methods.
A gallery of matrices
Here is every kind of behaviour you can meet. All of them are presets in the widget, so try each one.
- Diagonal, : the eigenvalues are the diagonal entries and , with eigenvectors and . It stretches by and shrinks to half.
- Triangular, : , so the eigenvalues are again the diagonal entries (this holds for every triangular matrix). The eigenvectors are for and for : check . They are not perpendicular.
- Projection onto the line , : trace , , so and or . The line is kept () and is squashed to (). This is the projection of P1.B5 and P1.B11, and every eigenvalue of a projection is or .
- Reflection in the line , : trace , , so and or . is kept and is flipped to .
- Scaling by 2, : for every , so every direction is an eigen-direction. The eigenvalue is repeated, and is the zero matrix.
- Shear, : , so twice. But forces , so the only eigen-direction is . A matrix with too few eigen-directions is called defective. Notice that a repeated eigenvalue does not always mean a defect: has the same repeated eigenvalue and every direction.
- Rotation by , : trace , , so , which has no real solution. No real direction is kept. (A rotation by or is or , which keep every line. Any other rotation turns every direction.)
So a real matrix has two eigen-directions, or one (a defective matrix such as a shear), or every direction (a multiple of ), or none (complex eigenvalues).
Go deeper Complex eigenvalues: what a rotation does have
For the quarter turn the equation has the complex solutions and , where . The vector , which has a complex entry, satisfies , so it is an eigenvector for . It is not an arrow in the real plane, which is why the plane has no real eigen-direction. A rotation by an angle has eigenvalues , both of size (the matrix keeps lengths), and the angle of the complex number is the turn. Applying the rotation times multiplies the eigenvalue times, and says four quarter turns bring you back.
In general a real matrix with a complex eigenvalue pair behaves over many steps like a spiral: on average it turns by the angle of per step and scales by per step (exactly so for a pure turn-and-scale matrix; for other matrices the turn and stretch vary from vector to vector). NumPy returns such eigenvalues as complex numbers. They matter in practice (the eigenvalues of recurrent networks can be complex), but this lesson only needs the real picture.
New matrices from old
If with , then the same is an eigenvector of these related matrices, with these eigenvalues:
- , , …: , , … Indeed .
- : . And : .
- , if is invertible: . (An invertible matrix has no zero eigenvalue, so this is always defined.) For the inverse has eigenvalues and .
One more fact: has the same eigenvalues as (the characteristic equation is the same, because ), but usually different eigenvectors. For the triangular matrix above, has eigenvector for , while has for .
The rules above do not extend to sums and products of different matrices: the eigenvalues of are not the sums of eigenvalues, and those of are not the products (see the mistakes at the end).
Applying a matrix again and again
Now the idea that makes eigenvectors so useful. If happens to be an eigenvector, : applying the matrix times just multiplies by each time. For any other , write it as a mix of the two eigenvectors, . Since acts on each part by its own number,
For and this is
The second part never changes size (its is ), but the first part is multiplied by every step. The first steps are , , , and by it is : almost exactly along . The part with the biggest takes over. This is what the next widget shows.
Things to try:
- At the start ( of this lesson, ) move the slider from to . The pink arrow swings to the solid green line, the ratio of lengths approaches , and the angle to the line falls towards .
- Press Growing ( and ): the length grows slowly, about times per step. Press Shrinking ( and ): everything fades to the origin. Press Flipping ( and ): the arrow also jumps to the other side of the origin at every step.
- Tick Direction only to see the swing even when the lengths become huge.
- Put exactly on a green line (for the first matrix, or ): it never leaves the line. On the second line it will never swing, because it has no part along the first.
- Press Shear and drag off the horizontal green line (for example to ): twice, yet the length keeps growing, and the direction creeps towards the one green line only slowly. Press Spiral: no real eigen-direction, and the vector turns while it shrinks. Press Reflect ( and ): the two sizes tie, so nothing wins.
What this says about . For a matrix whose eigenvalues are real and different:
- : that part grows by about per step.
- : that part shrinks towards .
- : that part keeps its size.
If every eigenvalue has , then for every . If at least one has , a typical (one with some part along that direction) grows without bound. The largest is called the spectral radius of . For the first widget matrix, grows like , and (eigenvalues and ) shrinks the first part by per step.
A warning from the shear. For the eigenvalue is , so you might expect nothing to grow. But , and : the length grows in proportion to . When there are too few eigenvectors (a defective matrix), the clean picture “each part is multiplied by its own ” no longer describes everything.
Why this matters for deep learning. A deep network, or a recurrent network that reuses the same weight matrix at every time step, multiplies by over and over. In a simplified network with no nonlinearity, the signal after steps is , and the gradient sent back through steps is multiplied by the transpose of the same number of times, so over many steps its size follows the eigenvalues: if the spectral radius is above the gradient tends to explode, and if it is below it vanishes (for a non-symmetric the size over a few steps can behave differently, as the shear showed). Real networks have activation functions, which change the details (P4.16 and P6.6 treat them), but the eigenvalue picture explains why the same matrix applied many times is dangerous, and why careful initialization (P4.12) aims to keep the scale near .
Go deeper Power iteration: finding the biggest eigenvalue by repeated multiplication
The swing you just saw is an algorithm. Start with any non-zero vector, multiply by , divide by the length (so the numbers stay small), and repeat. The vector approaches the eigenvector of the largest , and (for a unit vector and a symmetric ) approaches that eigenvalue. This works when one eigenvalue has strictly the largest size and the start has some part along its eigenvector; the error shrinks by about the ratio per step, here .
Runs real Python in your browser. First run downloads about 9 MB (once; your browser keeps it).
You should see the vector approach and the estimate approach (after step 1 the vector is and the estimate is ). Power iteration is the idea behind computing a PageRank-style score and the top principal direction of large data sets when only a few eigenvectors are needed. (Practical libraries use more refined methods.)
Diagonalisation: eigenvectors as a new set of axes
Put the eigenvectors in the columns of a matrix , and the eigenvalues on the diagonal of (capital lambda). Since , multiplying by gives the columns , which is the same as (the columns of scaled, P1.B6):
If has an inverse, which needs independent eigenvectors, then
This is diagonalisation. For our matrix, , and , and multiplying out gives back .
Read it right to left, as in P1.B6: converts a vector into eigen-coordinates (how much of each eigenvector it contains, as in P1.B7), stretches each coordinate by its own , and converts back. In the eigen-coordinates the matrix is just a diagonal stretch, the simplest map there is.
That makes powers cheap, because the inner pairs cancel:
For : , so , and you only had to raise two numbers to a power.
When can you diagonalise? When there are independent eigenvectors. That is certain if the eigenvalues are all different (different eigenvalues give independent eigenvectors). It can also happen with a repeated eigenvalue: is already diagonal. It fails for a defective matrix such as the shear: it has only the direction , so there is no second independent eigenvector and would have no inverse. For a rotation it fails with real numbers (it works with complex ones).
Symmetric matrices: the best-behaved case
P1.B10 promised this. A real matrix is symmetric if (P1.B10). The spectral theorem says that for a real symmetric matrix:
- All the eigenvalues are real (no complex surprises).
- Eigenvectors for different eigenvalues are perpendicular.
- There is always a full set of perpendicular unit eigenvectors, even when an eigenvalue repeats.
Put those unit eigenvectors in the columns of . They are orthonormal, so is an orthogonal matrix and (P1.B10), and diagonalisation becomes
with no inverse to compute. For , and . In words: a symmetric matrix stretches space along perpendicular directions and does nothing else. (A general matrix can also shear.)
The same fact written as a sum shows where P1.B11 comes in. With unit eigenvectors and ,
and each is the projection matrix onto the line of (P1.B11; the first one is the projection of the gallery). A symmetric matrix is a weighted sum of projections onto perpendicular directions, weighted by the eigenvalues. Compare the non-symmetric triangular matrix, whose eigenvectors and are not perpendicular, and the rotation, with no real eigenvectors at all.
Go deeper Why a symmetric matrix has perpendicular eigenvectors and real eigenvalues
Perpendicular. Let be symmetric with and , where . P1.B10 showed that can be moved across a dot product: . So , that is . Since , .
Real, for . For the number under the square root is , so the square root is real and both eigenvalues are real. The proof for every size is a little longer and is left out here. The statement that there is always a full orthonormal set, even for a repeated eigenvalue, is also not proved here.
Positive definite matrices and the eigenvalue test
P1.B10 called a symmetric matrix positive semi-definite if for every , and said that and covariance matrices always are. Eigenvalues give a clean test. For a real symmetric :
- Positive semi-definite every eigenvalue is .
- Positive definite ( for every non-zero ) every eigenvalue is .
The reason: for a unit eigenvector, , so a negative eigenvalue gives a direction where is negative. Conversely, writing any as with the perpendicular unit eigenvectors, , which cannot be negative if both are .
This also explains why is positive semi-definite: for a unit eigenvector with eigenvalue , . An eigenvalue appears exactly when , a direction the data never uses.
Ridge regression (P1.B9’s promise). In P1.B9, a feature that was twice another gave , with trace and determinant , so its eigenvalues are and (the direction is squashed). Ridge adds (here is the ridge strength, not an eigenvalue), and the rule from earlier says every eigenvalue goes up by , with the same eigenvectors. With ridge strength the eigenvalues become and : none is , so the matrix is invertible (its determinant is , exactly what P1.B9 computed). In general, a positive semi-definite has eigenvalues , so has eigenvalues for any ridge strength : it is always invertible. It also improves the ratio of largest to smallest eigenvalue, which is the condition number of a symmetric positive definite matrix (from infinite to here, a number P1.B13 explains).
Covariance and PCA (P3.C3). The covariance matrix of a data set is symmetric and positive semi-definite. Take . The variance of the data along a unit direction is (P1.B10, P1.D7). Along it is , and along it is : the eigenvalues. Over all unit directions, the variance is largest along the eigenvector of the largest eigenvalue, and the eigenvalues add up to the trace , the total variance. PCA is exactly this eigen-decomposition of the covariance matrix of the centred data, and P3.C3 builds on it.
Curvature (P1.C8). For a function of several variables, the Hessian matrix of second derivatives is symmetric, and its eigenvalues are the curvatures along its perpendicular eigen-directions: at a point where the gradient is zero (and no eigenvalue is ), all positive means a bowl, all negative a hill, mixed signs a saddle.
Eigenvalues are not singular values
For a symmetric positive semi-definite matrix, the stretch factors of P1.B13 (singular values) are the eigenvalues. For other matrices, they are not. The shear has eigenvalues and , but it stretches the vector to , and its largest stretch over all directions is , with the other stretch (these are the singular values; their product is ). A rotation has complex eigenvalues but singular values and . Eigenvalues only describe directions that stay on their own line, so they miss what a non-symmetric matrix does to other directions. Singular values describe the largest and smallest stretch over all directions, and they exist for non-square matrices too, which have no eigenvalues. P1.B13 develops them.
Try it in NumPy
np.linalg.eig(A) returns two things: an array of eigenvalues, and a matrix whose columns are the matching unit-length eigenvectors, so the eigenvector for vals[i] is vecs[:, i]. The order of the eigenvalues is not guaranteed, and the sign of each eigenvector is arbitrary. For a symmetric matrix use np.linalg.eigh: it is faster and more accurate, returns real numbers, sorts the eigenvalues from small to large, and gives perpendicular eigenvectors. It reads only one triangle of the matrix, so give it a matrix that really is symmetric: for any other matrix it silently returns wrong answers.
Runs real Python in your browser. First run downloads about 9 MB (once; your browser keeps it).
What to expect:
- The eigenvalues are and , and
A @ vequalslambda * vfor both columns. The order, and the signs of the eigenvector columns, can differ on your machine (for exampleeigmay list the eigenvalues as or ). The numbers and and the directions and do not change. - The trace equals the sum and the determinant equals the product of the eigenvalues.
eighreturns the eigenvalues in the order , andTruefor both checks: and .
The second cell runs the awkward cases of the gallery.
Runs real Python in your browser. First run downloads about 9 MB (once; your browser keeps it).
- For the rotation NumPy returns the complex pair , printed like
0.+1.jand0.-1.j(Python writes asj). The eigenvectors also have complex entries. - For the shear it returns and , and two eigenvector columns that are almost the same direction: the second is , rounding noise. That is how a defective matrix shows up: the matrix of eigenvectors is (nearly) singular, so you cannot invert it to diagonalise. The exact tiny digits depend on the machine.
- The projection gives and (
eigvalshiseighwithout the vectors).
Where you will meet it next
- PCA (P3.C3). The principal components are the eigenvectors of the covariance matrix, sorted by eigenvalue. The SVD of P1.B13 gives the same directions in a more stable way.
- Exploding and vanishing gradients (P4.16, P6.6). A gradient that passes through the same weight matrix many times is scaled by powers of its eigenvalues, as in the power steps above. Gradient clipping and careful initialization (P4.12) try to keep the scale under control.
- Learning rates and conditioning (P1.F3, P1.F5). The curvature of a loss in different directions is given by the eigenvalues of its Hessian (P1.C8). The box below connects this to the bowl of P1.F3.
- Ridge regression (P3.A6). Adding lifts every eigenvalue of by , as above.
- Singular values and the SVD (P1.B13). For a general matrix, the eigen-ideas are replaced by singular values and two sets of perpendicular directions.
- Markov chains. The long-run behaviour of a random walk on states is an eigenvector with eigenvalue (see the box). PageRank, the original web-ranking idea, is a stationary distribution of this kind (a random-surfer Markov chain).
Go deeper Gradient descent is repeated multiplication by a matrix
P1.F3 ran gradient descent on . Its gradient is , which equals for the diagonal matrix (the Hessian, P1.C8). So one step with learning rate is
and the matrix has eigenvalues and along the two axes, the factors of P1.F3. With they are and , exactly the numbers in that lesson: the -part flips sign and shrinks slowly, the -part shrinks smoothly. Gradient descent on this bowl converges when both and , which means : at the second factor is exactly (bouncing forever), the “cap” that P1.F3 found. The steepest direction, the largest eigenvalue , sets the cap; the shallowest, , sets the slow speed. The ratio of the largest to smallest eigenvalue, , is the condition number of the bowl. The fastest choice for this bowl is , which makes both factors have size (the larger the ratio, the closer to this best speed is, and the slower the descent). This exact picture is for a quadratic bowl; for a general loss, the Hessian changes from place to place, but near a minimum the same reasoning applies.
Go deeper A Markov chain settles on an eigenvector
Suppose the weather is sunny or rainy. After a sunny day, tomorrow is sunny with probability ; after a rainy day, tomorrow is sunny with probability . Put each row of probabilities in a matrix, so that each row adds to :
A row vector of probabilities (sunny, rainy) becomes after one day. A distribution that does not change, , is called stationary. Transposing, : it is an eigenvector of with eigenvalue . Here the trace is and the determinant is , so the eigenvalues are and , and the eigenvector for is : check . The other eigenvalue, , has size below , so as in the power steps its part fades like , and every starting distribution approaches . (After days both rows of are about .) For a larger chain the same idea holds under conditions (for example, that every state can eventually reach every other and that the chain does not cycle with a fixed period) that a probability course explains.
Common mistakes
Check your understanding
Let . Which of these is an eigenvector of ?
, so is an eigenvector. and are not multiples of the vectors they came from, and the zero vector is excluded by definition.
A real matrix has trace and determinant . What are its eigenvalues?
The eigenvalues add up to the trace and multiply to the determinant, and , . The pair adds to , the pair adds to , and adds to .
A real matrix has an eigenvalue . Which statement must be true?
An eigenvalue means for some non-zero , so the matrix squashes a direction: and there is no inverse. It does not have to be the zero matrix (a projection has eigenvalues and ), a rotation has determinant , and the vector is itself an eigenvector.
is a real symmetric matrix, and and are eigenvectors of with different eigenvalues. What is true of and ?
This is the spectral theorem: eigenvectors of a real symmetric matrix that belong to different eigenvalues have dot product . The option saying the angle can be anything describes non-symmetric matrices, such as .
A real diagonalisable matrix has eigenvalues and . A vector has a non-zero part along both eigen-directions. What happens to as grows large?
The part along the direction is multiplied by each step and grows, while the part along the direction shrinks, so the first part takes over. The vector does not shrink to zero (the factor is above ), it does not follow the direction, and it does not stay still.
Which real matrix has exactly one eigen-direction?
The shear has twice but only the direction . keeps every direction, the diagonal matrix has two (the axes), and the quarter turn has none.
is a real symmetric matrix with eigenvalues and . Is it positive semi-definite?
Positive semi-definite needs every eigenvalue to be at least . For a unit eigenvector of , . Symmetry, a positive trace and a positive largest eigenvalue are not enough.
Exercises
- Find the eigenvalues and eigenvectors of and check one of them.
Show answer
Trace , , so and or . For : gives , so ; check . For : gives , so ; check . - Without solving anything, give the eigenvalues of , then find the eigenvectors.
Show answer
It is triangular, so the eigenvalues are the diagonal entries and . For : gives , so (check: ). For : gives , so (check: ). - A matrix has eigenvalues and . Give its trace and determinant, and the eigenvalues of , and .
Show answer
Trace and . has and . exists since is not an eigenvalue, and has and . has and . - Find the eigenvalues and eigenvectors of and say what the eigenvalue means.
Show answer
Trace , , so or . For : gives , so ; check . For : gives ; check . The eigenvalue means the line through is squashed to the origin: , the rank is and there is no inverse. - Show that has no real eigen-directions. What does it do to the plane?
Show answer
Trace , , so and the number under the root is : no real solution. (The eigenvalues are .) The matrix is a rotation combined with a stretch by , so it turns every direction. - For which values of does have more than one eigen-direction?
Show answer
The eigenvalue is twice, and forces when : only the direction . For the matrix is and every direction works. So only . - Diagonalise as and use it to find .
Show answer
Trace , , so and , with unit eigenvectors and . Then . - Decide whether each symmetric matrix is positive semi-definite: and .
Show answer
The first has trace and , so eigenvalues and , both positive: positive definite. The second has trace and , so eigenvalues and : not positive semi-definite. For example gives . - Gradient descent on (Hessian eigenvalues and ) uses , then . What are the per-step factors on the and parts, and what happens?
Show answer
The factors are and . At : and , so becomes exactly after one step and shrinks by per step: it converges. At : and . Since , the part flips sign and grows by per step: it diverges. - A matrix has eigenvalues and . For a vector with parts along both, by what factor has the first part grown compared with the second after steps? How many steps double the ratio?
Show answer
The ratio of the two parts is multiplied by per step, so after steps it has grown by (separately, and ). Doubling the ratio takes about steps. - Explain why a square matrix with a non-zero vector in its null space has the eigenvalue .
Show answer
with , which is the definition with . By P1.B7, a square matrix has a non-zero null vector exactly when its columns are dependent, that is when . - Code: predict, then check with
np.linalg.eig, the eigenvalues of .Show answer
Trace , , so and . NumPy prints the complex pair0.+1.jand0.-1.j(the order may differ). It is a quarter turn in the other direction, so no real eigen-direction exists.