DISCRETE MATHEMATICAL FUNCTIONS Suppose we have: And I ask you to describe the yellow function. What’s a function? Notation: f: RR, f(x) = -(1/2)x - 25 domain co-domain f(x) = -(1/2)x - 25 FUNCTIONS Definition: a function f : A B is a subset of AxB where a A, ! b B and <a,b> f. FUNCTIONS A collection of points! Definition: a function f : A B is a subset of AxB where a A, ! b B and <a,b> f. A point! B B A A FUNCTIONS A = {Michael, Tito, Janet, Cindy, Bobby} B = {Katherine Scruse, Carol Brady, Mother Teresa} Let f: A B be defined as f(a) = mother(a). Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa FUNCTIONS - IMAGE & PREIMAGE What about the range? For any set S A, image(S) = {b : a S, f(a) = b} image(S) = f(S) So, image({Michael, Tito}) = {Katherine Scruse} image(A) = B - {Mother Teresa} Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa Some say it means codomain, others say, image. Since it’s ambiguous, we don’t use it at all. FUNCTIONS - IMAGE & PREIMAGE preimage(S) = f-1(S) For any S B, preimage(S) = {a: b S, f(a) = b} So, preimage({Carol Brady}) = {Cindy, Bobby} preimage(B) = A Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa Every b B has at most 1 preimage. FUNCTIONS - INJECTION A function f: A B is one-to-one (injective, an injection) if a,b,c, (f(a) = b f(c) = b) a = c Not one-to-one Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa FUNCTIONS - SURJECTION Every b B has at least 1 preimage. A function f: A B is onto (surjective, a surjection) if b B, a A f(a) = b Not onto Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa FUNCTIONS - BIJECTION A function f: A B is bijective if it is one-to-one and onto. Every b B has exactly 1 preimage. Isaak Bri Lynette Aidan Evan Cinda Dee Deb Katrina Dawn An important implication of this characteristic: The preimage (f-1) is a function! FUNCTIONS - EXAMPLES Suppose f: R+ R+, f(x) = x2. Is f one-to-one? yes Is f onto? yes Is f bijective? yes FUNCTIONS - EXAMPLES Suppose f: R R+, f(x) = x2. Is f one-to-one? Is f onto? yes Is f bijective? no no FUNCTIONS - EXAMPLES Suppose f: R R, f(x) = x2. Is f one-to-one? Is f onto? no no Is f bijective? no FUNCTIONS - COMPOSITION Let f:AB, and g:BC be functions. Then the composition of f and g is: (g o f)(x) = g(f(x))