# Variables' weights using PCA

I have recently read a paper where the authors applied PCA to determine the weights of the variables used to calculate a composite index. In the methodology, they mentioned that for a set of $$N$$ variables $$x_i .... x_n$$ with $$Q$$ principle components, the weight of each variable can be computed using the following formula:

$$w_i = \frac {\sum_{i=1}^{N} \sum_{j=1}^{Q} D_{ij}^2 \cdot \lambda_j}{\sum_{j=1}^{Q} D_{ij}^2 \cdot \lambda_j}$$

where $$\lambda$$ is the eigenvalues vector and $$D$$ is the eigenvectors matrix. I'm not sure how the derived the weights and why are they squaring the eigenvectors in the formula above? and is there a more intuitive way to calculate the weight associated with each variable? I'm looking for something in the form of: $$Composite\_index = \sum_{i=1}^{N} w_i x_i$$

The paper I'm referring to is:

Zona, A., Kammouh, O., & Cimellaro, G. P. (2020). Resourcefulness quantification approach for resilient communities and countries. International Journal of Disaster Risk Reduction, 46, 101509.