Arg max
In mathematics, the arguments of the maxima (abbreviated arg max or argmax) are the points, or elements, of the domain of some function at which the function values are maximized. In contrast to global maxima, which refers to the largest "outputs" of a function, arg max refers to the "inputs", or arguments, at which the function outputs are as large as possible. Definition. Given an arbitrary set a totally ordered set and a function, the formula_1 over some subset formula_2 of formula_3 is defined by If formula_5 or formula_2 is clear from the context, then formula_2 is often  left out, as in formula_8 In other words, formula_1 is the set of points formula_10 for which formula_11 attains the function's largest value (if it exists). formula_12 may be the empty set, a singleton, or contain multiple elements. In the fields of convex analysis and variational analysis, a slightly different definition is used in the special case where formula_13 are the extended real numbers. In this case, if formula_14 is identically equal to formula_15 on formula_2 then formula_17 (that is, formula_18) and otherwise formula_19 is defined as above, where in this case formula_19 can also be written as: where  it is emphasized that this equality involving formula_22 holds when formula_14 is not identically formula_15 on Arg min. The notion of formula_25 (or formula_26), which stands for argument of the minimum, is defined analogously. For instance, are points formula_10 for which formula_11 attains its smallest value. It is the complementary operator of In the special case where formula_30 are the extended real numbers, if formula_14 is identically equal to formula_32 on formula_2 then formula_34 (that is, formula_35) and otherwise formula_36 is defined as above and moreover, in this case (of formula_14 not identically equal to formula_32) it also satisfies: Examples  and properties. For example, if formula_11 is formula_41 then formula_14 attains its maximum value of formula_43 only at the point formula_44 Thus The formula_1 operator is different from the formula_47 operator. The formula_47 operator, when given the same function, returns the of the function instead of the that cause that function to reach that value; in other words Like formula_51 max may be the empty set (in which case the maximum is undefined) or a singleton, but unlike formula_51 formula_53 may not contain multiple elements: for example, if formula_11 is formula_55 then formula_56 but formula_57 because the function attains the  same value at every element of formula_58 Equivalently, if formula_59 is the maximum of formula_60 then the formula_1 is the level set of the maximum: We can rearrange to give the simple identity If the maximum is reached at a single point then this point is often referred to as formula_51 and formula_1 is considered a point, not a set of points. So, for example, (rather than the singleton set formula_67), since the maximum value of formula_68 is formula_69 which occurs for formula_70 However, in case the maximum is reached at many points, formula_1 needs to be considered a of  points. For example because the maximum value of formula_73 is formula_74 which occurs on this interval for formula_75 or formula_76 On the whole real line Functions need not in general attain a maximum value, and hence the formula_1 is sometimes the empty set; for example, formula_79 since formula_80 is unbounded on the real line. As another example, formula_81 although formula_82 is bounded by formula_83 However, by the extreme value theorem, a continuous real-valued function on a closed interval has a maximum, and thus a nonempty formula_58