The Rayleigh-Ritz Method