Yesterday I asked a question on the existence of local extrema, and have received conflicting comments [here](https://math.stackexchange.com/questions/2761995/the-existence-of-local-maximum-and-minimum-of-a-real-valued-function?noredirect=1#comment5699107_2761995). Now from this discussion I'm not sure whether global extrema are necessary local extrema, for a continuous function defined in a metric space. Is this a matter of style / author? or is there a definitive answer?

I would appreciate any references too.