A function is some process that transforms elements from one set to another.
%%🖋 Edit in Excalidraw, and the dark exported image%%
Definition
Function ^definition
A function is some mapping that takes values from a set and transforms/maps them into values in another set . This is notated as:
- is known as the domain of the function.
- is known as the codomain of the function
This also means elements can be represented as a function of elements :
- is called the image of
- is the argument of
Because is defined on the domain , every element of must be mapped to some value in .
#todo unify function image and linear algebra image
Range
Range (of a function) ^definition-range
The range of a function is a subset of the codomain that contains exactly all the images of the domain. It is defined to be:
That is, it contains all the points that are the result of mapping the domain with .
%%🖋 Edit in Excalidraw, and the dark exported image%%
Arity
Arity ^definition-arity
The arity of a function, , is the number of arguments it takes or equivalently the dimension of its domain . That is, if we have:
then is an -ary function. Some unique cases are:
- : Nullary/constant function ()
- : Unary function ()
- : Binary Function ()
Properties
Injective
A function is said to be injective if it is one-to-one, i.e. there is only one value in that maps to . More precisely:
600 is injective in the drawing above, because even though not everything is mapped, there is only one, unique element in that maps to another unique element in . is not injective, because both and equal .
Graphically, if the function is a real that can be mapped on the Cartesian Plane, i.e. , then is injective if a horizontal line intersecting each value of y does not have multiple intersections with the function.

This one-to-one notion can be proved via linear algebra using the definition of injectivity in linear transformations. See: http://thejuniverse.org/PUBLIC/LinearAlgebra/MATH-232/Unit.8/Presentation.1/Section7B/oneone.html
Surjective
A function is surjective if every element of it’s codomain has at least one corresponding element in the domain, i.e. for every element in , there exists an element in such that . More precisely:
600 Here, is non-surjective because the element has no corresponding value in . , however, is surjective, because every element in has one or more corresponding elements in .
Bijective
A bijective function is one that is both injective and surjective. In other words, every element in must have one corresponding element in .
Function - Maths _1.excalidraw