In mathematics, the maximum and minimum of a function, known collectively as extrema, are the largest and smallest value that the function takes at a point either within a given neighborhood (local or relative extremum) or on the function domain in its entirety (global or absolute extremum). Pierre de Fermat was one of the first mathematicians to propose a general technique for finding maxima and minima.