In this paper, we study the relationship between the cocenter and the representation theory of affine Hecke algebras. The approach is based on the interaction between the rigid cocenter, an important subspace of the cocenter, and the dual object in representation theory, the rigid quotient of the Grothendieck group of finite dimensional representations.