Set Operations
Set Operations
The function f is injective if for all a and b in A, if f(a) = f(b), then a = b; that is, f(a) = f(b) implies a = b. Equivalently, if a b, then f(a) f(b). Eg. The function f : R R defined by f(x) = 2x + 1 is injective. The function g : R R defined by g(x) = x2 is not injective, because (for example) g(1) = 1 = g(1). However, if g is redefined so that its domain is the non-negative real numbers [0,+), then g is injective. - surjective: ton nh A surjective function is a function whose image is equal to its codomain. Equivalently, a function f with domain X and codomain Y is surjective if for every y in Y there exists at least one x in X with f(x) = y. Surjections are sometimes denoted by a two-headed rightwards arrow, as in f : X Y. Eg. The function f : R R defined by f(x) = 2x + 1 is surjective. The function g : R R defined by g(x) = x2 is not surjective, because there is no real number x such that x2 = 1. However, the function g : R R+ defined by g(x) = x2 (with restricted codomain) is surjective because for every y in the positive real codomain Y there is at least one x in the real domain X such that x2 = y. - bijective: song nh A bijection (bijective function) is a function which is both a surjection and an injection.1 Eg. The function f : R R defined by f(x) = 2x + 1 is bijective. - cardinality: lc lng The cardinality |S| of a set S is "the number of members of S." For example, if B = {blue, white, red}, |B| = 3. 1. Finite set 2. Infinite set - countable (m c) A set S is called countable if there exists an injective function f from S to the natural numbers. Eg. The set of prime numbers is countable, by mapping the n-th prime number to n: 2 maps to 1 3 maps to 2 5 maps to 3 7 maps to 4
1
Phn bit 2 cch gi khc v nh x one-to-one correspondence: song nh; one-to-one function: n nh.
4. Equal set set A and set B are equal set if the elements of set A is exactly the element of set B. Example: A = set of an even B = set of an integral multiples of 2 5. Equivalent set two sets are equivalent if there exists a one-to-one correspondence between elements of the two sets. Example: A = {1, 2, 3, 4, 5} - x coordinate B = {6, 7, 8, 9, 10} y coordinate then A is equivalent to B. We can construct the relation of set A and set B. { (1,6}, (2,7), (3,8), (4,4), (5,10) } 6. Subset If every member of set A is also a member of set B, then A is said to be a subset of B, written A B (also pronounced A is contained in B)2. Equivalently, we can write B A, read as B is a superset of A, B includes A, or B contains A. If A is a subset of, but not equal to, B, then A is called a proper subset of B, written A B (A is a proper subset of B) or B A (B is a proper superset of A). The empty set is a subset of every set and every set is a subset of itself. 7. Universal Set set which contains all objects, including itself. 8. Disjoint Set sets that has no common element ; if two sets have no element in common, the sets are called disjoint sets. 9. Special set
Note that the expression A B is used differently by different authors; some authors use them to mean the same as A B whereas other use them to mean the same as A B.
2
P or , denoting the set of all primes: P = {2, 3, 5, 7, 11, 13, 17, ...}. N or , denoting the set of all natural numbers: N = {1, 2, 3, . . .}. Z or , denoting the set of all integers (whether positive, negative or zero): Z = {... , 2, 1, 0, 1, 2, ...}. Q or , denoting the set of all rational numbers (that is, the set of all proper and improper fractions): Q = {a/b : a, b Z, b 0}. For example, 1/4 Q and 11/6 Q. R or , denoting the set of all real numbers. This set includes all rational numbers, together with all irrational numbers (that is, numbers which cannot be rewritten as fractions, such as , e, and 2, as well as numbers that cannot be defined). C or , denoting the set of all complex numbers: C = {a + bi : a, b R}. For example, 1 + 2i C.
Set operations (Cc php ton tp hp) 1. The union of two sets A and B is the collection of points which are in A or in B (or in both): AUB={x|xAvxB} 3 Example: A = {3, 4, 5, 6, 7} B = {2, 4, 6, 8, 10} A U B = {2, 3, 4, 5, 6, 7, 8, 10} 2. The intersection of A and B is written "A B". Formally, x A B iff x A and x B. 3. With any two sets A and B there is associated A third set C satisfying the property that C = { x|x A x B}. We denote the set symbolically as C = A B, and call C the relative complement or difference of A and B. Example: A = { a, b, c, d, e, f} B = { a, e, i, o, u} A B = {b, c, d, f} and B A = {i, o, u} 4. If A is a subset of U, then the set of an elements contained in U that are not elements of A is called the complement of A in U and is designated by then = {x|x U x A} Example: Consider the universal set of an counting nos. and the set A of counting numbers less than 100 then U = {1, 2, 3, 4, } A = { 1, 2, 3,99} = {100, 101, 103.} 5. The set product or cartesian product of two sets A and B is the set of an possible ordered pairs (a, b) where a is in A and b is in B. We symbolize this set of ordered pairs by A x B and write, A x B = {(a,b) | a A b B } Example: If A = {1, 2} and B = {x, y} then A x B = { (1, x), (1, y), (2, x) , (2, y}} and B x A = {(x, 1), (x, 2), (Y, 1), (Y, 2)}