We point out the connection between the Hardy inequality,
compact embedding of weighted function spaces and the properties of
the spectra of certain eigenvalue problems. Necessary and sufficient
conditions in terms of the Muckenhoupt function are formulated.