This document presents a hierarchical clustering algorithm for wireless sensor networks. It begins with introductions to wireless sensor networks and their architecture. It then discusses routing protocols, applications, quality of service aspects, and types of clustering for wireless sensor networks. The main body of the document describes the evolution of hierarchical clustering, and presents the hierarchical clustering algorithm and a dynamic energy efficient hierarchical routing algorithm. It provides details on the simulation methods and concludes that hierarchical clustering and routing algorithms can efficiently reduce energy consumption in sensor nodes.