The Hodrick-Prescott (HP) filter is a commonly used tool in macroeconomics used to extract a trend component from a time series. In this paper, we derive a new representation of the transformation of the data that is implied by the HP filter. This representation highlights that the HP filter is a symmetric weighted average plus a number of adjustments that are important near the beginning and end of the sample. The representation allows us to carry out a rigorous analysis of properties of the HP filter without using the ARMA-based approximation that has been used previously in the literature. Using this new representation, we characterize the large T behavior of the HP filter and find conditions under which it is asymptotically equivalent to a symmetric weighted average with weights independent of sample size. We also find that the cyclical component of the HP filter possesses weak dependence properties when the HP filter is applied to a stationary mixing process, a linear deterministic trend process, or a process with a unit root. This provides the first formal justification of the use of the HP filter as a tool to achieve weak dependence in a time series. In addition, a large smoothing parameter approximation to the HP filter is derived, and using this approximation, we find an alternative justification for the procedure given in Ravn and Uhlig (2002) for adjusting the smoothing parameter for the data frequency.