Skip to content

Mathematical function

A function gives one output for each allowed input. Read its notation, domain, codomain and range, and distinguish model rules from market certainty.

A mathematical function assigns exactly one output to every allowed input. The notation f:D→Ef:D\to E names the function ff, its input set DD and its target set EE; f(x)f(x) means the value assigned to input xx, not ff multiplied by xx.
A profit model, a transaction-fee schedule and an option payoff can all be functions. The useful question is always the same: what information must be supplied before this rule gives one unambiguous result?

A quantity goes in; a profit comes out

Suppose a hypothetical trading project has a fixed gross margin of USD 2 per share, a total quantity-related cost of 0.01q20.01q^2 USD, and an already incurred setup cost of USD 5. Let qq be the numerical quantity of shares, allowing fractional shares between 0 and 200. Its modelled net profit, measured in USD, is

Π(q)=2q−0.01q2−5,q∈[0,200].\Pi(q)=2q-0.01q^2-5,\qquad q\in[0,200].

The linear coefficient has units USD per share and the quadratic coefficient has units USD per share squared. Both terms therefore produce USD amounts. Substituting 50 shares gives

Π(50)=100−25−5=70 USD.\Pi(50)=100-25-5=70\text{ USD}.

At zero quantity the result is negative USD 5 because the setup cost has already been incurred. Choosing not to start the project would be a separate decision outside this model. The margin and cost coefficients are stipulated assumptions, not measured market prices or a promise about realised profit.

Hypothetical profit curve on 0 to 200 shares: 50 and 150 shares each produce USD 70; 100 shares produce USD 95; both endpoint quantities produce negative USD 5.
Hypothetical profit curve on 0 to 200 shares: 50 and 150 shares each produce USD 70; 100 shares produce USD 95; both endpoint quantities produce negative USD 5.
Original synthetic model. Each quantity determines one profit, although different quantities can give the same profit. The curve assumes fractional shares and an incurred setup cost.

Three sets describe this function:

SetMeaningIn this model
DomainAllowed inputsQuantities from 0 to 200 shares
CodomainDeclared target set containing every outputAll real-valued USD amounts
RangeOutputs actually attainedEvery USD amount from −5 to 95

The range follows from rewriting the rule as

Π(q)=95−0.01(q−100)2.\Pi(q)=95-0.01(q-100)^2.
On the stated interval, the squared term runs from 0 to 10,000, so profit runs from USD 95 down to negative USD 5 and takes every value in between. If only whole shares were allowed, the domain would instead be the integers from 0 to 200 and the range would be a finite set. The formula alone does not specify the whole function.

Single output does not mean unique input

The model gives Π(50)=Π(150)=70\Pi(50)=\Pi(150)=70. This is a valid function: the rule forbids one input having two outputs, but permits two inputs sharing an output. Consequently, asking “which quantity produced USD 70?” has two answers. An inverse function requires an appropriate restriction before it can recover a unique quantity.

A graph records the pairs (x,f(x))(x,f(x)). For a real-valued function of one real input, a vertical line meets that graph at most once. By contrast, the relation y2=xy^2=x permits both y=2y=2 and y=−2y=-2 at x=4x=4, so it does not define a single-valued function of xx without choosing a branch.

Functions need not arrive as formulas. A complete lookup table, a graph or a precise verbal rule can define one. Nor must an input or output be a single number: a multivariable pricing function can take a tuple of spot, strike, time, volatility and rates. Holding those other inputs fixed is what makes a graph against spot alone meaningful.

A function can represent an uncertain quantity

“Exactly one output per input” does not imply predictable markets. A random variable is itself a function: it assigns a numerical value to each possible outcome in a probability model, with a measurability condition that makes probabilities well defined. Before the outcome is known, its assigned value may be uncertain.
Likewise, the profit rule above gives a definite answer under its assumptions; uncertainty about future margins or costs requires additional inputs or a probabilistic model. Combining rules into stages leads to a composite function. The free full lesson Transformations, Compositions, and Building New Functions develops those operations, including how their domains fit together.

Sources

Last updated
  • functions
  • domain
  • codomain
  • range
  • models
  • units
← Back to the glossaryBack to top ↑