Are you wanting to know how to compute the singular value decomposition (SVD) which is most of what principal components analysis (PCA) is?
There are plenty of numerical analysis textbooks that cover this: Matrix Computations (currently 4th edition) by Golub & Van Loan is probably the best first reference. You could also see my "Numerical Analysis: A Graduate Course" Chap. 2, esp. pp. 172-174. Other books cover this well: Trefethen & Bau is also a good book & covers this (Chap V, Lecture 31).
The mathematics behind PCA are e.g. nicely explaint in this post (https://towardsdatascience.com/the-mathematics-behind-principal-component-analysis-fff2d7f4b643).