Why are only the extremely low frequencies of electromagnetic radiation able to penetrate the earth and sea? Wikipedia classifies ELF (Extremely Low Frequency) radiation as between 3 Hz and 300 Hz, and ULF (Ultra Low Frequency) from 300 Hz to 3 kHz. Both ranges can penetrate the earth and sea.  What is the physics behind why this is so?
What would be the ideal frequency then to scan up to 500 feet underground for metal detection, a sort of underground metal detection radar?
 A: The physics of the attenuation is that of the physics in conductive materials. The skin depth is a conductor is (see Wikipedia at https://en.m.wikipedia.org/wiki/Skin_effect), 
$d = \sqrt(2/\mu_0\sigma\omega)$
See also a simple derivation online at http://farside.ph.utexas.edu/teaching/315/Waves/node65.html
Seawater is still a good conductor, as shown there, with conductivity of 5 (ohms-meters)$^{-1}$. The skin depth arises because the charged particles in the medium will tend to cancel the electric field, and eventually do. The higher the conductivity clearly the smaller the skin depths. You have to solve the Maxwell equations with the approximations for a good conductor and you get the wavelength dependence. The article shows the derivation which is basic electromagnetism. It's standard also in textbooks, see it for instance in Jackson. Intuitive interpretation (though better to do the math, you won't misinterpret) is that the electromagnetic energy per unit depth is less at higher wavelengths, the changes are partially scaled by wavelength.
With $\sigma$ the conductivity and $\omega = 2\pi f$, and f the frequency. For lower frequency f the skin depth is higher, greater penetration or distance before attenuation. $\mu_0$ Is the vacuum permeability. Most or almost all the absorption is from the electric field at ELF frequencies so the magnetic properties of the conductor matter little. The derivation of the skin depth is in just about any electromagnetism book, in the most general case also. 
The earth is also a conductor, a geological conductor with typically starta that are arranged In a complex way. For lower frequencies like ELF the small scale arrangements have little effect because of wavelengths of a thousand and more kilometers, so an average conductivity is not too bad an approximation. i saw a good reference for the absoprtion through the earth by googling, but can't seem to find it again. 
So again low frequencies like ELF propagate better. 
By the way, they also propagate pretty good above ground, with the ground and the ionosphere forming a duct. Lots of papaer on the physics and propagation for these waves.
A: The reason for this is frequency attenuation. Electromagnetic radiations, when penetrating through the media, interact with the media and attenuate. The higher-frequency, the faster the attenuation effect. Thus, low-frequency radiations such as VLF, ULF, etc., can penetrate into the medium much deeper than high-frequency ones. However, the drawback is that low-frequency radiations usually give us low-resolution signals.
