Set Theory/Relations

From testwiki
Revision as of 22:45, 5 March 2008 by imported>Skyc (Added theorem that the left and right inverse of a function are equal)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Ordered pairs

To define relations on sets we must have a concept of an ordered pair, as opposed to the unordered pairs the axiom of pair gives. To have a rigorous definition of ordered pair, we aim to satisfy one important property, namely, for sets a,b,c and d, (a,b)=(c,d)a=cb=d.

As it stands, there are many ways to define an ordered pair to satisfy this property. A simple definition, then is (a,b)={{a},{a,b}}. (This is true simply by definition. It is a convention that we can usefully build upon, and has no deeper significance.)

Template:Theorem and proof

Relations

Using the definiton of ordered pairs, we now introduce the notion of a binary relation.

The simplest definition of a binary relation is a set of ordered pairs. More formally, a set  R  is a relation if zRz=(x,y) for some x,y. We can simplify the notation and write (x,y)R or simply xRy.

We give a few useful definitions of sets used when speaking of relations.

  • The domain of a relation R is defined as dom R={xy,(x,y)R}, or all sets that are the initial member of an ordered pair contained in R.
  • The range of a relation R is defined as ran R={yx,(x,y)R}, or all sets that are the final member of an ordered pair contained in R.
  • The union of the domain and range, field R=dom Rran R, is called the field of R.
  • A relation R is a relation on a set X if field RX.
  • The inverse of R is the set R1={(y,x)(x,y)R}
  • The image of a set A under a relation R is defined as R[A]={yran RxA,(x,y)R}.
  • The preimage of a set B under a relation R is the image of B over R-1 or R1[B]={xdom RyB,(x,y)R}

It is intuitive, when considering a relation to seek to construct more relations from it, or to combine it with others.

We can compose two relations, R and S to form one relation SR={(x,z)y,(x,y)R(y,z)S}. So xRSz means that there is some y such that xRyySz.

We can define a few useful binary relations as examples:

  1. The Cartesian Product of two sets is A×B={(a,b)𝒫𝒫(AB)aAbB}, or the set where all elements of A are related to all elements of B. As an excercise, show that all relations from A to B are subsets of A×B. Notationally A×A is written A2
  2. The membership relation on a set A, A={(a,b)a,bA,ab}
  3. The identity relation on A, IA={(a,b)a,bA,a=b}

The following properties may or may not hold for a relation R on a set X:

  • R is reflexive if xRx holds for all x in X.
  • R is symmetric if xRy implies yRx for all x and y in X.
  • R is antisymmetric if xRy and yRx together imply that x=y for all x and y in X.
  • R is transitive if xRy and yRz together imply that xRz holds for all x, y, and z in X.
  • R is total if xRy, yRx, or both hold for all x and y in X.

Functions

Definitions

A function may be defined as a particular type of relation. We define a partial function f:XY as some mapping from a set X to another set Y that assigns to each xX no more than one yY. If on each xX, f assigns exactly one yY, then f is called total function or just function. The following definitions are commonly used when discussing functions.

  • If fX×Y and f is a function, then we can denote this by writing f:XY. The set X is known as the domain and the set Y is known as the codomain.
  • For a function f:XY, the image of an element xX is yY such that f(x)=y. Alternatively, we can say that y is the value of f evaluated at x.
  • For a function f:XY, the image of a subset A of X is the set {yY:f(x)=y for some xA}. This set is denoted by f(A). Be careful not to confuse this with f(x) for xX, which is an element of Y.
  • The range of a function f:XY is f(X), or all of the values yY where we can find an xX such that f(x)=y.
  • For a function f:XY, the preimage of a subset B of Y is the set {xX:f(x)B}. This is denoted by f1(B).

Properties of functions

A function f:XY is onto, or surjective, if for each yY exists xX such that f(x)=y. It is easy to show that a function is surjective if and only if its codomain is equal to its range. It is one-to-one, or injective, if different elements of X are mapped to different elements of Y, that is f(x)=f(y)x=y. A function that is both injective and surjective is intuitively termed bijective.

Composition of functions

Given two functions f:XY and g:YZ, we may be interested in first evaluating f at some xX and then evaluating g at f(x). To this end, we define the composition' of these functions, written gf, as

(gf)(x)=g(f(x))

Note that the composition of these functions maps an element in X to an element in Z, so we would write gf:XZ.

Inverses of functions

If there exists a function g:YX such that for f:XY, gf=IX, we call g a left inverse of f. If a left inverse for f exists, we say that f is left invertible. Similarly, if there exists a function h:YX such that fh=IY then we call h a right inverse of f. If such an h exists, we say that f is right invertible. If there exists an element which is both a left and right inverse of f, we say that such an element is the inverse of f and denote it by f1. Be careful not to confuse this with the preimage of f; the preimage of f always exists while the inverse may not. Proof of the following theorems is left as an exercise to the reader.

Theorem: If a function has both a left inverse g and a right inverse h, then g=h=f1.

Theorem: A function is invertible if and only if it is bijective.