After I got the filtered vcf file of snps with gatk pipeline, I tried to run PCA with gcta. afterwords, I tried to find the explained variation percentage for each PCs(principal components). what I'm confused is that the eigenvalue results I get are always the same number as the sample size. I thought that the amount of possible PCs were the same as the variable dimension I have (which is the number of snps called, about 17000000 in this case) and there should be the same amount of eigenvalues related to it. Of course there could be same eigenvalues and PCs that explain small variation are useless, but isn't it possible that there could be 17000000 PCs and eigenvalues? So I thought when I want to get the explained variation percentage of PC1, I had to divide it by the some of 17000000 eigenvalues. could someone explain why this is wrong and why I always get the same number of eigenvalues as the sample size?
Thank you for the intuitive explanation. As I thought about it more, I found that the number of eigenvalues are same as dimension size of covariance matirx and the dimension of covariance matrix is same as the number of row or column of data matrix. so when the sample size is smaller than the variable dimension, maximum number of eigenvalue is the same as sample size and when the sample size is bigger, the opposite. am I right?