By now, you’ve seen a few important types of factor models. You know that the goal of factor models is to model roughly things you think have a similar underlying effect on your variables of interest. You want to represent a variable or variables in terms of several important underlying variables or factors. In our case, we are trying to represent a large number of similar variables that returns time series of several financial assets in terms of a smaller number of common underlying factors. There’s another way to do this that relies on the machine learning method, principal components analysis or PCA. PCA is a technique you can use to represent your data set in terms of hidden latent features or dimensions, and potentially reduce the number of dimensions of your data set by dropping the least informative dimensions. We’ll show you what we mean by that. If you’ve been reading about machine learning or artificial intelligence, you may have heard of this method before because it’s used widely across all types of industries and fields. What we’re going to do now is refresh the math you’ll need to understand PCA and then explain in detail how this method is typically used for risk modeling and finance. Let’s start by reviewing some of the important math we’ll need to learn PCA.