We have constructed an analytical model of AGN feedback and studied its implications for elliptical galaxies and galaxy clusters . The results show that momentum injection above a critical value will eject material from low mass elliptical galaxies , and leads to an X-ray luminosity , L _ { X } , that is \propto \sigma ^ { 8 - 10 } , depending on the AGN fuelling mechanism , where \sigma is the velocity dispersion of the hot gas . This result agrees well with both observations and semi-analytic models . In more massive ellipticals and clusters , AGN outflows quickly become buoyancy-dominated . This necessarily means that heating by a central cluster AGN redistributes the intracluster medium ( ICM ) such that the mass of hot gas , within the cooling radius , should be \propto L _ { X } ( < r _ { cool } ) / [ g ( r _ { cool } ) \sigma ] , where g ( r _ { cool } ) is the gravitational acceleration at the cooling radius . This prediction is confirmed using observations of seven clusters . The same mechanism also defines a critical ICM cooling time of \sim 0.5 Gyr , which is in reasonable agreement with recent observations showing that star formation and AGN activity are triggered below a universal cooling time threshold .