A hydrocarbon containing formation may be treated using an in situ thermal process.
A mixture of hydrocarbons, H2, and/or other formation fluids may be
produced from the formation. Heat may be applied to the formation to raise a temperature
of a portion of the formation to a pyrolysis temperature. Heat may be applied to
the formation from heating elements positioned within wellbores. Portions of the
heater elements may be free to move within the wellbores to inhibit failure of
the heater elements due to thermal expansion.