In short
f(x) = \max\{g(x),\, h(x)\} takes the larger of the two values at every x — its graph traces the higher of the two curves. f(x) = \min\{g(x),\, h(x)\} takes the smaller value — its graph traces the lower curve. Where g and h cross, the max/min function switches from one curve to the other, often creating a sharp corner.
Two friends run a tea stall together. Ravi earns a flat rate of Rs 200 per day. Priya earns Rs 50 per day plus Rs 30 for every cup she sells. On a slow day (4 cups), Priya earns 50 + 30 \times 4 = 170 — less than Ravi. On a busy day (10 cups), she earns 50 + 30 \times 10 = 350 — more than Ravi.
Suppose each day's earnings go to whoever earned more. The daily payout is:
where x is the number of cups sold. For small x, the flat rate 200 is larger. For large x, the variable rate 50 + 30x is larger. They are equal when 200 = 50 + 30x, giving x = 5. The payout graph is made of two line segments joined at a corner at x = 5.
That is the core idea of \max and \min functions: at each input, compare the values and pick the higher (or lower) one.
How \max\{g(x), h(x)\} works
Given two functions g and h, both defined at some point x:
Graphically, you draw both curves and at every x, keep the one that is higher. The result is a piecewise function that follows one curve, then switches to the other at the crossing points.
Take two simple functions: g(x) = x and h(x) = 2 - x. These are straight lines that cross at x = 1 (where x = 2 - x, so 2x = 2, so x = 1; both equal 1 there).
For x < 1: g(x) = x < 2 - x = h(x), so \max = h(x) = 2 - x. For x \ge 1: g(x) = x \ge 2 - x = h(x), so \max = g(x) = x.
The result is a V-shaped graph. The minimum value of \max\{x, 2 - x\} is 1, occurring at x = 1. This is the point where the two functions are equal.
How \min\{g(x), h(x)\} works
The \min function works identically, but picks the lower curve:
Using the same two functions g(x) = x and h(x) = 2 - x:
For x < 1: g(x) = x < 2 - x = h(x), so \min = g(x) = x. For x \ge 1: g(x) = x \ge 2 - x = h(x), so \min = h(x) = 2 - x.
Notice the duality: \max produces a V opening upward (valley at the crossing point), while \min produces a V opening downward (peak at the crossing point). The crossing point is always a corner in both graphs.
A useful identity connecting max, min, and absolute value
There is a beautiful algebraic relationship:
Check it: if a \ge b, then |a - b| = a - b, so \max = \frac{a + b + a - b}{2} = a. Correct. And \min = \frac{a + b - a + b}{2} = b. Correct.
This identity is powerful because it lets you rewrite max/min functions as algebraic expressions involving absolute values, which you already know how to graph.
For example: \max\{x, 2 - x\} = \frac{x + (2-x) + |x - (2-x)|}{2} = \frac{2 + |2x - 2|}{2} = 1 + |x - 1|. That is the V-shape with vertex at (1, 1) — exactly the graph from the figure above.
Graphing technique: the intersection-first method
To sketch \max\{g(x), h(x)\} or \min\{g(x), h(x)\}:
Step 1. Sketch both g(x) and h(x) on the same axes.
Step 2. Find all intersection points — solve g(x) = h(x). These are where the max/min function switches from one curve to the other.
Step 3. Between consecutive intersection points, determine which function is greater (test any convenient point in each interval).
Step 4. For \max: trace the higher curve in each interval. For \min: trace the lower curve. Mark the corners at each intersection point.
Domain and range of max/min functions
The domain of \max\{g(x), h(x)\} is the intersection of the domains of g and h — you need both functions to be defined at x to compare them.
The range requires more care. The range of \max\{g, h\} is not simply the union of the ranges. You need to consider which function is active in which interval.
For \max\{g, h\}: the minimum value is the value at the crossing point (if the curves cross), or the minimum of the larger function (if they don't cross). The maximum value is the larger of the two individual maxima.
For \min\{g, h\}: the maximum value is the value at the crossing point, and the minimum value is the smaller of the two individual minima.
Two worked examples
Example 1: Max of a line and a parabola
Sketch the graph of f(x) = \max\{x + 1,\; x^2 - 1\} and find its range.
Step 1. Find the intersections. Set x + 1 = x^2 - 1:
At x = -1: both equal 0. At x = 2: both equal 3. The crossing points are (-1, 0) and (2, 3).
Why: these intersection points divide the x-axis into three intervals: (-\infty, -1), (-1, 2), and (2, \infty).
Step 2. Determine which function is larger in each interval. Test x = 0 (middle interval): g(0) = 1, h(0) = -1. So g(x) = x + 1 is larger on (-1, 2). Test x = 3: g(3) = 4, h(3) = 8. So h(x) = x^2 - 1 is larger on (2, \infty). Test x = -2: g(-2) = -1, h(-2) = 3. So h(x) = x^2 - 1 is larger on (-\infty, -1).
Why: testing one point in each interval is enough, since the functions are continuous and only switch dominance at intersection points.
Step 3. Assemble the max function:
Why: the max follows the parabola on the outer intervals and the line in the middle.
Step 4. Find the range. The minimum value of f is 0, at x = -1 (where both functions equal 0). As x \to \pm\infty, f(x) \to \infty (the parabola dominates). The range is [0, \infty).
Result: f(x) = \max\{x+1, x^2-1\} follows the parabola outside [-1, 2] and the line between -1 and 2. Range: [0, \infty).
The sharp corners at (-1, 0) and (2, 3) are where the max function switches from one curve to the other. At these points, both functions give the same value, so the transition is continuous but not smooth — the slope changes abruptly.
Example 2: Min of two quadratics
Find the graph and range of f(x) = \min\{x^2,\; 4 - (x-2)^2\}.
Step 1. Understand the two functions. The first is g(x) = x^2, a parabola opening upward with vertex at (0, 0). The second is h(x) = 4 - (x-2)^2, a parabola opening downward with vertex at (2, 4).
Why: h(x) is the parabola (x-2)^2 reflected in the x-axis and shifted up by 4. Its vertex is at (2, 4) and it opens downward.
Step 2. Find the intersections. Set x^2 = 4 - (x-2)^2:
So x = 0 or x = 2. At x = 0: both equal 0. At x = 2: g(2) = 4 and h(2) = 4. The crossing points are (0, 0) and (2, 4).
Why: two crossing points divide the real line into three intervals to analyse.
Step 3. Determine which is smaller in each interval. Test x = 1 (middle interval): g(1) = 1, h(1) = 4 - 1 = 3. So g(x) = x^2 is smaller on (0, 2). Test x = -1: g(-1) = 1, h(-1) = 4 - 9 = -5. So h is smaller on (-\infty, 0). Test x = 3: g(3) = 9, h(3) = 4 - 1 = 3. So h is smaller on (2, \infty).
Why: the min follows g (the upward parabola) between the crossings and h (the downward parabola) outside them.
Step 4. Find the range. The downward parabola h decreases without bound as |x| \to \infty, so the min function also decreases without bound: the range extends to -\infty. The maximum value of f occurs at the crossing points: f(0) = 0 and f(2) = 4. Between the crossings, f follows g(x) = x^2, which reaches x^2 = 1 at x = 1. But the crossing-point values 0 and 4 are both achieved, and the curve between them reaches all values from 0 to 4. However, outside the crossings, h drops arbitrarily low. The maximum value of f is 4 (at x = 2). The range is (-\infty, 4].
Result: f(x) = \min\{x^2, 4-(x-2)^2\} follows the upward parabola on [0, 2] and the downward parabola outside. Range: (-\infty, 4].
The min function creates a smooth arch between the crossings (following x^2) and then plunges downward outside (following the downward parabola). The transition at the crossing points is continuous — both parabolas give the same value there.
Connection to absolute value
The max and min of two functions can always be written using absolute values:
Another useful relationship: \max\{g, h\} + \min\{g, h\} = g + h. This means if you know one, you can find the other by subtraction.
And there is a complementary identity: \max\{g, h\} - \min\{g, h\} = |g - h|. The "gap" between the max and min at any point equals the absolute difference of the two functions.
Common confusions
-
"\max\{g(x), h(x)\} is always greater than both g and h." It is not greater than both — it equals the larger one and is greater than (or equal to) the smaller one. At the crossing points, all three are equal.
-
"The graph of \max\{g, h\} has a cusp at every crossing." A corner appears only if g and h have different slopes at the crossing point. If they are tangent to each other (same value and same slope), the transition is smooth. For two lines with different slopes, there is always a corner.
-
"The domain of \max\{g, h\} is the union of the domains." It is the intersection, not the union. Both functions must be defined at x for the comparison to be possible.
-
"\max\{g, h\} cannot have a minimum value." It can. The minimum of \max\{g, h\} occurs at or near the crossing points, where the max function is forced as low as possible (the two curves are close together).
-
"\min\{x^2, 1\} is just 1 for large x." No — for |x| > 1, x^2 > 1, so \min\{x^2, 1\} = 1. For |x| \le 1, x^2 \le 1, so \min\{x^2, 1\} = x^2. The confusion is reversed: \min picks the smaller value, which is 1 when x^2 is large. This is correct. The function is bounded above by 1.
Going deeper
If you can sketch the graphs of \max\{g, h\} and \min\{g, h\} for any two given functions, identify the crossing points, and find the domain and range, you have the essentials. The material below explores extensions and connections.
Max and min of more than two functions
The same idea extends to three or more functions:
At each x, the value is the largest among all n functions. The graph traces the "upper envelope" of all the curves — the topmost curve at every point. The min traces the "lower envelope."
For three linear functions y = x, y = -x + 4, and y = 1, the max function is a piecewise linear curve that forms the roof of the triangle formed by the three lines. This kind of construction appears in linear programming and optimization.
Connection to |f(x)|
The absolute value of a function can be expressed as a max:
This makes graphical sense: |f(x)| keeps the positive parts and flips the negative parts up, which is the same as choosing the higher of f(x) and -f(x) at every point. When f(x) > 0, f(x) > -f(x), so the max is f(x). When f(x) < 0, -f(x) > f(x), so the max is -f(x).
Interactive: max and min builder
Drag the intersection point to see how the max and min graphs change as two lines pivot.
Where this leads next
Max and min functions are piecewise-defined by nature, connecting to several topics you will encounter next.
- Graphs of Basic Functions — the parent functions that serve as building blocks for max/min constructions.
- Ways to Define Functions — piecewise functions, which is exactly what max/min produces.
- Graph Transformations — Reflections — the absolute value transformation y = |f(x)| is equivalent to \max\{f(x), -f(x)\}.
- Bounded Functions — \min\{f(x), M\} is a standard way to cap a function at a maximum value M, creating a bounded function.
- Quadratic Expression and Function — many max/min problems involve comparing quadratics, as in the worked examples above.