學海無涯,思境無維;數乃六藝,理之始也。
或有一得足矣 愚千慮

Function

Function/mapping/map/transformation

f:AdomainBcodomain

Function. A function from a set A into a set B is a relation from A into B such that each element of A is related to exactly one element of the set B. The set A is called the domain of the function and the set B is called the codomain.

  • one-to-one or many-to-one
  • one-to-many is not allowed
    (a,b),(a,c)f,b=c

Functions between two sets (domain and codomain)

f:AB

There are

BA different possible functions between A(domain) and B(codomain).

f:ABf(x)=x2f={(x,x2)xA,x2B}

Image of an element of the domain

f:ABaAf(a)B

f(a) is called the image of the
a
elment in
A
under the function
f
.

Range of a function

f:XYf(X) the range of f

The range of a function is the set of images of it's codomain.

f(X)={yxX,y=f(x)}

Characteristic Function

SA,xAχS(x)={1,xS0,xS

Kernel

f:ABKA×AK={(x,y)x,yA,f(x)=f(y)}

Kernel is an equivalence relation.

  • reflexive
    xA,f(x)=f(x)(x,x)K
  • symmetric
    x,yA,f(x)=f(y)f(y)=f(x)(x,y)K(y,x)K
  • transitive
    x,y,zA,f(x)=f(y),f(y)=f(z),f(x)=f(z)(x,y)K,(y,z)K(x,z)K

Properties of Functions

Injection (one-to-one)

f:ABa,bA,ab,f(a)f(b)a,bA,f(a)=f(b)a=b

Surjection (onto)

f:ABbB,aA,b=f(a)

Bijection (one-to-one and onto)

A function is a bijection if it's one-to-one and onto.

Counting

Cardinality

Two sets have the same cardinality

exists a bijection
f
between the two sets.

Cardinality = the number of elements in a set

Countable Set

If a set is finite or has the same cardinality as the set of positive integers, it is called a countable set.

countablly infinite

The Pigeonhole Principle

{X,Yfinite setf:XY|X|>n|Y|,n1bY,n+1 elements  X are mapped to b

Function Composition

{f:ABg:BC{gf:ACgf(x)=g(f(x))

Function Composition is associative

{f:ABg:BCh:CDh(gf)=(hg)f

Powers of Functions

f:ABf1=f(a)fn+1=f(fn(x))

The composition of injections is an injection

{f:ABg:BCf,ginjectiongfinjection

The composition of surjections is a surjection

{f:ABg:BCf,gsurjectiongfsurjection

Indentity Function

iA:AA,aA,i(a)=a

Inverse Functions

f:AAg:AAgf=fg=iAg=f1,f=g1
f1
undo what
f
does.

Bijections have inverses

f:ABf1f is a bijection

Permutaion

A bijection of a set into itself is called a permuation of a.

Inverse of a function

{f:ABg:BAgf=iA,fg=iB

tags: math function