Eigenvectors, Eigenvalues and Orthogonality

This is a quick write up on eigenvectors, eigenvalues, orthogonality and the like. These topics have not been very well covered in the handbook, but are important from an examination point of view.

Eigenvectors, eigenvalues and orthogonality

Before we go on to matrices, consider what a vector is. A vector is a matrix with a single column. The easiest way to think about a vector is to consider it a data point. For example, if eigen001 is a vector, consider it a point on a 2 dimensional Cartesian plane. If there are three elements, consider it a point on a 3-dimensional Cartesian system, with each of the points representing the x, y and z coordinates. This data point, when joined to the origin, is the vector. It has a length (given by eigen003 , for a 3 element column vector); and a direction, which you could consider to be determined by its angle to the x-axis (or any other reference line).

Just to keep things simple, I will take an example from a two dimensional plane. These are easier to visualize in the head and draw on a graph. For vectors with higher dimensions, the same analogy applies.

Consider the points (2,1) and (4,2) on a Cartesian plane. These are plotted below. The vectors that these represent are also plotted – the vector eigen001 is the thinner black line, and the vector for eigen005 is the thick green line.

eigen_two_points

One of the things to note about the two vectors above is that the longer vector eigen005 appears to be a mere extension of the other eigen001 vector. As if someone had just stretched the first line out by changing its length, but not its direction. In fact in the same way we could also say that the smaller line is merely the contraction of the larger one, ie, the two are some sort of ‘multiples’ of each other (the larger one being the double of the smaller one, and the smaller one being half of the longer one). We take one of the two lines, multiply it by something, and get the other line. That something is a 2 x 2 matrix. In other words, there is a matrix out there that when multiplied by eigen001 gives us eigen005. Let us call that matrix A.

For this matrix A, eigen001 is an eigenvector. The extent of the stretching of the line (or contracting) is the eigenvalue.

Now without calculations (though for a 2×2 matrix these are simple indeed), this A matrix is eigen009.


To explain this more easily, consider the following:

eigen

That is really what eigenvalues and eigenvectors are about. In other words, Aw = λw, where w is the eigenvector, A is a square matrix, w is a vector and λ is a constant.

One issue you will immediately note with eigenvectors is that any scaled version of an eigenvector is also an eigenvector, ie eigen013 are all eigenvectors for our matrix A = eigen009. So it is often common to ‘normalize’ or ‘standardize’ the eigenvectors by using a vector of unit length. One can get a vector of unit length by dividing each element of the vector by the square root of the length of the vector. In our example, we can get the eigenvector of unit length by dividing each element of eigen001 by eigen015. So our eigenvector with unit length would be eigen017.

Calculating the angle between vectors: What is a ‘dot product’?

The dot product of two matrices is the sum of the product of corresponding elements – for example, if eigen019 and eigen021 are two vectors X and Y, their dot product is ac + bd.
Or, X.Y = ac + bd

Now dot product has this interesting property that if X and Y are two vectors with identical dimensions, and |X| and |Y| are their lengths (equal to the square root of the sum of the squares of their elements), then

eigen023.

Or in English,


eigen025

Now if the vectors are of unit length, ie if they have been standardized, then the dot product of the vectors is equal to cos θ, and we can reverse calculate θ from the dot product.

Example: Orthogonality

Consider the following vectors:

eigen027. Their dot product is 2*-1 + 1*2 = 0. If theta be the angle between these two vectors, then this means cos(θ)=0.  Cos θ is zero when θ is 90 degrees.  Therefore these are perpendicular. And you can see this in the graph below.

eigen_perpendicular

For the exam, note the following common values of cosθ :

  1. Cos(90 degrees) = 0 which means that if the dot product is zero, the vectors are perpendicular or orthogonal. Note that the vectors need not be of unit length.
  2. Cos(0 degrees) = 1, which means that if the dot product of two unit vectors is 1, the vectors are overlapping, or in the same direction
  3. Cos(60 degrees) = 0.5, which means if the dot product of two unit vectors is 0.5, the vectors have an angle of 60 degrees between them.


If nothing else, remember that for orthogonal (or perpendicular) vectors, the dot product is zero, and the dot product is nothing but the sum of the element-by-element products.

Why is all of this important for risk management?
Very briefly, here are the practical applications of the above theory:

  • Correlation and covariance matrices that are used for market risk calculations need to be positive definite (otherwise we could get an absurd result in the form of negative variance). IN order to determine if a matrix is positive definite, you need to know what its eigenvalues are, and if they are all positive or not. This is why eigenvalues are important. And you can’t get eignevalues without eigenvectors, making eigenvectors important too.
  • Orthogonality, or perpendicular vectors are important in principal component analysis (PCA) which is used to break risk down to its sources. PCA identifies the principal components that are vectors perpendicular to each other. That is why the dot product and the angle between vectors is important to know about.