A presentation of the theory behind the Rayleigh-Ritz (R-R) method, as well as a discussion of the choice of admissible functions and the use of penalty methods, including recent developments such as using negative inertia and bi-penalty terms. While presenting the mathematical basis of the R-R method, the authors also give simple explanations and analogies to make it easier to understand. Examples include calculation of natural frequencies and critical loads of structures and structural components, such as beams, plates, shells and solids. MATLAB codes for some common problems are also supplied.