# What do the arrows in a PCA biplot mean?

Consider the following PCA biplot:

library(mvtnorm)
set.seed(1)
x  <- rmvnorm(2000, rep(0, 6), diag(c(5, rep(1,5))))
x  <- scale(x, center=T, scale=F)
pc <- princomp(x)
biplot(pc)


There are a bunch of red arrows plotted, what do they mean? I knew that the first arrow labelled with "Var1" should be pointing the most varying direction of the data-set (if we think them as 2000 data points, each being a vector of size 6). I also read from somewhere, the most varying direction should be the direction of the 1st eigen vector.

However, reading into the code of biplot in R. The line about the arrows is:

if(var.axes)
arrows(0, 0, y[,1L] * 0.8, y[,2L] * 0.8, col = col[2L],


Where y is the actually the loadings matrix, which is the eigenvector matrix. So it looks like the 1st arrow is actually pointing from (0, 0) to (y[1, 1], y[1, 2]). I understand that we are trying to plot a high dimensional arrow onto a 2D plane. That's why we are taking the 1st and 2nd element of the y[1, ] vector. However what I don't understand is:

Shouldn't the 1st eigenvector direction be the vector denoted by y[, 1], instead of y[1, ]? (Again, here y is the eigenvector matrix, obtained by PCA or by eigendecomposition of t(x) %*% x.) i.e. the eigenvectors should be column vectors, not those horizontal vectors.

Even though we are plotting them on 2D plane, we should draw the 1st direction to be from (0, 0) pointing to (y[1, 1], y[2, 1])?

• Also consider trying to utilize the formatting available to questions on the site, see the advanced markdown help. I see none of your previous questions have answers, and if you edit them to be slightly more readable they will bump to the top of the list and may attract answers. – Andy W Apr 25 '12 at 12:01
• @Andy W Excellent references – conjugateprior Apr 25 '12 at 13:27
• @Andy W: After reading your excellent references, I still think the R code biplot.princomp has a bug: the loading matrix (eigenvector matrix) should be transposed before being sent into biplot.princomp... Any thoughts? – Luna Apr 25 '12 at 16:28
• It looks like there is no bug. – chl Apr 28 '12 at 20:17
• @Andy W: do you want to put your comments into an "answer" so I can accept your answer? That's a great one! Thanks so much! – Luna Apr 29 '12 at 16:24