The thermodynamic irreversibility sources of a steady-flow, vapor-compression, water-to-water heat pump are analyzed. The three main components in the system (condenser, evaporator, and reciprocating compressor) are considered in detail. The heat transfers and mass flows in these three components are analyzed on the basis of energy- and mass-balance theories. The irreversibilities due to heat transfer across a finite temperature difference and mass flow across a finite pressure drop in each component are calculated according to the second law of thermodynamics. An experimental heat pump using R-22 is used as a test system for applying the analysis. Pressure, temperature, mass-flow rate, and power-consumption data are used to evaluate the irreversibilities of the system operating in steady state. Optimization of the water-flow rate in both the condenser and evaporator has been determined for this system to minimize the power consumption for a given load and inlet water temperature. The results show that an increase in the heat-transfer coefficient for the heat exchangers, even with an increase in pressure drop, will decrease the irreversible loss substantially.