a relation from A to B is a subset of AxB;
function is a special relation where every elment of A is the first element of exact one ordered pair.
a relation on a set A is a subset of AxA;
so,there are 2^n^2 relations for a set with n element. such as :n=3;relation:512
properties of relations
a relation R on a set A is called reflective if (a,a) 属于R foreveryelement a 属于A
a relation R on a set A is called symmetric if (b,a)属于R whenever (a,b) 属于R,
a relation R on a set A such that for all a,b属于A,if(a,b)属于R,and (b,a)属于R,then a=b is calledantisymmetric
a relation R on a set A is called transitive if whenever (a,b)属于R,(b,c)属于R,then (a,c)属于R for all a,b,c 属于A
combining relations
RoS: where the second element o