Jump to content

Unary function

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fakescientist8000 (talk | contribs) at 15:17, 16 December 2024 (Adding local short description: "Function that takes one argument", overriding Wikidata description "function that takes one argument. In computer science, a unary operator is a subset of unary function"). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 , is a unary operator. Its domain and codomain are the natural numbers; its definition is as follows:

In some programming languages such as C, executing this operation is denoted by postfixing ++ to the operand, i.e. the use of n++ is equivalent to executing the assignment .

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

References