# Mathematical Functions¶

A function in mathematics1 is a relation between a value in a domain and a value in a codomain across a range. In programming terms, this means that mathematical functions are single-arity and pure. In other words, they take a single value and, given the same value, always produce the same output.

f : Domain \rightarrow Codomain

## Language¶

• A Programmers Introduction to Mathematics
• Topic: Maths
• Codomain
• In Maths1, the codomain of a function is the set to which it's output belongs. The exact set of a functions output is known as its range.
• Range
• In Maths1, the range of a function is the set of all possible outputs within the Codomain. This might be smaller than the codomain itself if the function is not injective.
• Domain
• Polynomial
• A polynomial is a function with $n$ coefficients, where $n$ is known as the degree. A single-variable polynomial $f$ has the form
• Injectivity
• In set theory, injectivity is a property of a function. Given a function $f : A \\rightarrow B$, if when supplied with every input in $A$ $f$ produces every possible output in $B$ then $f$ is injective.
• Language: Function over a set
• In maths, for a given function, it can be said to operate 'over' a set in the case that its domain and codomain are in the same set. For example the function $f : \\mathbb{R} \\rightarrow \\mathbb{R}$ could be said to be a function over reals.