Scientists have solved a cosmic mystery by finding evidence that supermassive black holes prevent stars forming in some smaller galaxies.