Eigenvectors made easy
So, I was reading this post on using Graph Theory to determine “influencers” on Facebook → http://20bits.com/articles/graph-theory-part-iii-facebook/ ** and I think I finally figured out those damn Eigenvectors. It’s pretty simple once you grok it.
Basically every matrix has something called “orientation” built in. The value for this “orientation” property is either zero (technically it has infinite eigenvectors all of which cancel out to get a net orientation of zero) or finite. If it’s finite, we call this orientation the Eigenvector.
So what does “orientation” mean? Simple. Let’s take a sample matrix that shows the relationship between me, you, a kitty and a T.Rex. Here’s how the relationships are:
- I like you and kitty but don’t like T.Rex.
- You like me and kitty and is not exactly fascinated by T.Rex.
- Kitty likes no one, especially scared of T.Rex.
- T.Rex likes everyone (as food).
- No one can “like” themselves - we are frowning upon narcissism here.
Let’s denote “Like” by the number 1 and “Don’t like” by 0. We also give everyone ID numbers: I’m 1, you’re 2, kitty is 3 and T.Rex is 4. IDs can be anything - 1000a, 1000b, 1000c and 1000d will work too. But let’s keep things simple.
Ok, let’s take the relationships and make a simple matrix out of it…
Me (1) You(2) Kitty(3) T.Rex(4)
Me (1) 0 1 1 0
You (2) 1 0 1 0
Kitty (3) 0 0 0 0
T.Rex (4) 1 1 1 0
Just by looking at this matrix you can intuitively figure out who has the maximum “influence” - kitty! Has 3 fans in you, me and T.Rex. Fortunately kitty doesn’t have the brain to exercise her influence, but moving on. After kitty is the second-spot tie between you and me, we each have 2 fans, each other and the lovely T.Rex. And last spot with the least influence goes to T.Rex.
So, the “orientation” of this matrix is kitty, me, you, T.Rex. We both are tied but I come first in IDs so I take precedence over you in the order. Let’s write this orientation in terms of the IDs: 3, 1, 2, 4… This is the Eigenvector.
That’s it! Don’t believe me? Here’s the Eigenvector values from Wolfram|Alpha^…
{ 1 , 1 , 0 , 2 }.
↑ ↑ ↑ ↑
1 2 3 4 ← IDs
Sorting the values in the Eigenvector, we get…
{ 0 , 1 , 1 , 2 }.
↑ ↑ ↑ ↑
3 1 2 4 ← IDs
Kitty, Me, You, and T.Rex. Hey! That’s the same order we intuitively figured out just a few minutes earlier. This is what Eigenvectors are all about - every matrix has “orientation” which is got by how each of the matrix elements are influenced by each other. If each element of the matrix is equally influenced by other elements then the net orientation is zero, and in a matrix where some elements are more heavily influenced by others, there is a net finite orientation - meaning the elements of the matrix can be sorted by the influence it feels from the other elements.
So sorting matrix elements by influence, where the hell can you use this Eigenvector thingy? Quite a lot of places, as it turns out. Here’s a few:
Google uses this to sort their webpages: PageRank (measures webpage influence) - http://williamcotton.com/pagerank-explained-with-javascript
Facebook uses this to sort their users: Social graph (measures social influence of each user and ranks them) - http://20bits.com/articles/graph-theory-part-iii-facebook/
Face recognition : Eigenfaces (measures the parts of the face that have the most influence in facial features) - http://en.wikipedia.org/wiki/Eigenface
Voice: Eigenvoice (Eigenvector = sorting by influence but here I have no idea what they are sorting. Let me know if you figure this out.)http://en.wikipedia.org/wiki/Kernel_Eigenvoice
And more like Eigenfunctions, Eigenspaces and so on.
Btw, Eigen means “own” in German and it happens to be the second German word I know after “Ich Will” (thanks Rammstein). It’s also called “characteristic” which makes sense because Eigenvector = orientation of the elements based on influence they have on each other and this is like a fingerprint for each matrix.
If you take a circle and write it as a matrix and try to find the Eigenvector you won’t get any net orientation - circles are symmetrical all around. Same story with squares. But ellipses have Eigenvectors and it’s oriented along their major axis, same with Parallelograms and Trapezoids.
Hope, this little explanation has helped you grok the concept. I left out the dry math but it’s on Wikipedia and it’s pretty grokkable too. Just understand that a matrix can be thought of as a bunch of vectors, so top row = (x1 x2) , bottom row = (y1 y2), if we take (x1,y1) and (x2,y2) as the vectors, the determinant of this matrix is the area on the graph that feels the combined effect of the vectors in the matrix etc., and the rest should be easy to follow.
—-
^ Link to Wolfram’s Eigenvector values for the You-me-kitty-T.Rex matrix.
Note: There are multiple Eigenvectors but their magnitudes (lambda. Eigenvector only shows the direction. Eigenvector & the lambda combined show both magnitude and direction) are not positive values so they don’t count, we take the Eigenvector values that are positive .
**
Get part 1 and 2 from the wayback machine.
