How to Rewrite max(t, 0) Using a Minimum
At a glance
- 1. Apply sign reversal
Use max(a, b) = -min(-a, -b) to turn the maximum into a minimum.
- 2. Substitute the terms
Set a = t and b = 0, giving max(t, 0) = -min(-t, 0).
- 3. Check both cases
For t at least zero the result is t; for t below zero it is zero.
For a real number , the expression is the positive part of : it equals when is nonnegative and equals when is negative. To write it using a minimum, use the general identity that a maximum is the negative of a minimum after both inputs are negated:
The minus sign outside the minimum is part of the identity. Simply changing max to min does not preserve the value.
Why the identity works
For any real numbers and ,
Negating reverses the order: if , then . Thus the smaller of and is ; negating that minimum gives , the original maximum. Taking and gives the desired formula.
You can also verify it by cases:
- If , then , so . Therefore .
- If , then , so . Therefore .
These are exactly the two values of .
Worked examples
Take . Then
For , the same expression gives
The formula also works at the boundary : both sides are zero.
Another equivalent form
A related identity is
If , the minimum is zero and the right side is . If , the minimum is and the right side is . This form can be useful when an expression already contains and .
Using the rewrite in optimization
The rewrite is an exact algebraic equality, so you can substitute wherever appears. For example, for ,
At , both expressions equal zero; at , both equal one.
Be careful about what the optimization model requires. The graph is often represented by the inequalities and . These describe the epigraph: they ensure is at least the maximum, but do not by themselves force equality. Equality follows in some models when the objective makes as small as possible; otherwise, additional modeling constraints may be needed. Replacing the maximum with its minimum identity changes none of these modeling requirements.
Common mistakes
- Dropping the outside minus: equals for positive , not .
- Negating only one input: The general identity requires negating both inputs before taking the minimum.
- Assuming a minimum of affine functions is interchangeable with a maximum: A minimum of affine functions is concave, while is convex. In general, you cannot express this positive-part function as a minimum of affine functions without the outside negative sign.
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.