Ultraviolet and infrared light are both different forms of electromagnetic radiating, self-propagating waves that consist of alternating electric and magnetic fields. Despite this basic similarity, there are also some important differences.
Electromagnetic radiation has both particle-like and wave-like properties. Like a wave, it has a frequency, a period and a wavelength; like a particle it comes in discrete units or packets of energy called photons. The energy of a photon of electromagnetic radiation is given by the formula E = hν, where ν is the frequency of the electromagnetic radiation in Hertz and h is Planck's constant. The wavelength and the frequency are related by the formula c = νλ, where λ is the wavelength; consequently, the greater the frequency, the smaller the wavelength.
The difference between ultraviolet light and infrared is that ultraviolet has a greater frequency and a shorter wavelength. The wavelength of infrared light is between 1 millimeter and 750 nanometers, while the wavelength of ultraviolet is between 400 nanometers and 10 nanometers. The intervening wavelengths between 400 and 750 nanometers are visible light.
Because it has a higher frequency, it follows from E = hν that ultraviolet has a higher energy than infrared; consequently, it can impart more energy to electrons that absorb a photon of ultraviolet. Ultraviolet carries sufficient energy to disrupt certain chemical bonds, so when it strikes DNA (the molecule in your cells that stores genetic information) it can cause mutations. Accumulated mutations and DNA damage can potentially lead to skin cancer.