unary function

{{Short description|Function that takes one argument}}

{{Multiple issues|

{{one source |date=May 2024}}

{{No footnotes|date=December 2024}}

}}

In mathematics, a unary function is a function that takes one argument. A unary operator belongs to a subset of unary functions, in that its codomain coincides with its domain. In contrast, a unary function's domain need not coincide with its range.

Examples

The successor function, denoted \operatorname{succ}, is a unary operator. Its domain and codomain are the natural numbers; its definition is as follows:

:

\begin{align}

\operatorname{succ} : \quad & \mathbb{N} \rightarrow \mathbb{N} \\

& n \mapsto (n + 1)

\end{align}

In some programming languages such as C, executing this operation is denoted by postfixing {{code|++}} to the operand, i.e. the use of {{code|n++}} is equivalent to executing the assignment n:= \operatorname{succ}(n).

Many of the elementary functions are unary functions, including the trigonometric functions, logarithm with a specified base, exponentiation to a particular power or base, and hyperbolic functions.

See also

Bibliography

  • [http://www.cs.ucl.ac.uk/staff/W.Langdon/FOGP Foundations of Genetic Programming]

{{Authority control}}

Category:Functions and mappings

Category:Types of functions

*

{{maths-stub}}