Mathematics Physics and quantum computing
[Across fields] Why does the Rayleigh quotient appear from PCA to quantum mechanics? (Rewritten from an earlier blog post)
Derive the Rayleigh quotient as a weighted average of eigenvalues and find its maximum and minimum. Explain why maximizing projected variance in PCA and minimizing ground-state energy in quantum mechanics share the same form. Use Python with two-dimensional data and a two-level system to plot how direction and relative phase change the quotient.

