The ramp function is a unary real function, whose graph is shaped like a ramp. It can be expressed by numerous definitions, for example "0 for negative inputs, output equals input for non-negative inputs". The term "ramp" can also be used for other functions obtained by scaling and shifting, and the function in this article is the unit ramp function (slope 1, starting at 0).
This function has numerous applications in mathematics and engineering, and goes by various names, depending on the context.
The ramp function (R(x) : ℝ → ℝ0+) may be defined analytically in several ways. Possible definitions are:
- A piecewise function:
- The max function:
- The mean of an independent variable and its absolute value (a straight line with unity gradient and its modulus):
- this can be derived by noting the following definition of max(a,b),
- for which a = x and b = 0
The ramp function has numerous applications in engineering, such as in the theory of digital signal processing.
In finance, the payoff of a call option is a ramp (shifted by strike price). Horizontally flipping a ramp yields a put option, while vertically flipping (taking the negative) corresponds to selling or being "short" an option. In finance, the shape is widely called a "hockey stick", due the shape being similar to an ice hockey stick.
- Proof: by the mean of definition 2, it is non-negative in the first quarter, and zero in the second; so everywhere it is non-negative.
Its derivative is the Heaviside function:
The ramp function satisfies the differential equation:
where δ(x) is the Dirac delta. This means that R(x) is a Green's function for the second derivative operator. Thus, any function, f(x), with an integrable second derivative, f″(x), will satisfy the equation: