Pyroelectricity (from the Greek pyr, fire, and electricity) is the property of certain crystals which are naturally electrically polarized and as a result contain large electric fields. The most important example is the gallium nitride semiconductor. The large electric fields in this material are unwanted for Light emitting diodes (LEDs), but are very helpful for the fabrication of power transistors. Alternatively, pyroelectricity is interpreted as the ability of certain materials to generate a temporary voltage when they are heated or cooled. The change in temperature modifies the positions of the atoms slightly within the crystal structure, such that the polarization of the material changes. This polarization change gives rise to a voltage across the crystal. If the temperature stays constant at its new value, the pyroelectric voltage gradually disappears due to leakage current (the leakage can be due to electrons moving through the crystal, ions moving through the air, current leaking through a voltmeter attached across the crystal, etc.).
Pyroelectricity should not be confused with thermoelectricity: In a typical demonstration of pyroelectricity, the whole crystal is changed from one temperature to another, and the result is a temporary voltage across the crystal. In a typical demonstration of thermoelectricity, one part of the device is kept at one temperature and the other part at a different temperature, and the result is a permanent voltage across the device as long as there is a temperature difference.
Pyroelectricity can be visualized as one side of a triangle, where each corner represents energy states in the crystal: kinetic, electrical and thermal energy. The side between electrical and thermal corners represents the pyroelectric effect and produces no kinetic energy. The side between kinetic and electrical corners represents the piezoelectric effect and produces no heat.