MATH 22 FUNCTIONS: COMPOSITION & INVERSES. Lecture N: 10/16/2003. Mad world! mad kings! mad composition! Shakespeare, King John, II:1

Similar documents
Cartesian Products and Relations

Section 4.4 Functions. CS 130 Discrete Structures

A function is a special kind of relation. More precisely... A function f from A to B is a relation on A B such that. f (x) = y

Functions Functions and Modeling A UTeach/TNT Course

Today s Topics. Methods of proof Relationships to logical equivalences. Important definitions Relationships to sets, relations Special functions

(So SamID 1 ( ) = Ken W. Smith.)

9/21/2018. Properties of Functions. Properties of Functions. Properties of Functions. Properties of Functions. Properties of Functions

4.1 Real-valued functions of a real variable

447 HOMEWORK SET 1 IAN FRANCIS

Seminaar Abstrakte Wiskunde Seminar in Abstract Mathematics Lecture notes in progress (27 March 2010)

Introduction to Functions

Notes. Functions. Introduction. Notes. Notes. Definition Function. Definition. Slides by Christopher M. Bourke Instructor: Berthe Y.

Functions If (x, y 1 ), (x, y 2 ) S, then y 1 = y 2

Functions as Relations

Selected problems from past exams

0 Sets and Induction. Sets

LAMC Advanced Circle May 21, Jason O Neill and Brad Dirks

MATH 22 FUNCTIONS: ORDER OF GROWTH. Lecture O: 10/21/2003. The old order changeth, yielding place to new. Tennyson, Idylls of the King

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Inverse Functions

3 FUNCTIONS. 3.1 Definition and Basic Properties. c Dr Oksana Shatalov, Spring

MATH 22. Lecture G: 9/23/2003 QUANTIFIERS & PIGEONHOLES

9/21/17. Functions. CS 220: Discrete Structures and their Applications. Functions. Chapter 5 in zybooks. definition. definition

3 FUNCTIONS. 3.1 Definition and Basic Properties. c Dr Oksana Shatalov, Fall

3 FUNCTIONS. 3.1 Definition and Basic Properties. c Dr Oksana Shatalov, Fall

MAT115A-21 COMPLETE LECTURE NOTES

MATH 22 HAMILTONIAN GRAPHS. Lecture V: 11/18/2003

Week Some Warm-up Questions

Name (print): Question 4. exercise 1.24 (compute the union, then the intersection of two sets)

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

Solutions to Homework Problems

CS 220: Discrete Structures and their Applications. Functions Chapter 5 in zybooks

2 Functions. 2.1 What is a function?

FOUNDATIONS & PROOF LECTURE NOTES by Dr Lynne Walling

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant).

Chapter 7. Functions and onto. 7.1 Functions

Introduction to Proofs

REVIEW FOR THIRD 3200 MIDTERM

and problem sheet 6

8. TRANSFORMING TOOL #1 (the Addition Property of Equality)

Section 7.2: One-to-One, Onto and Inverse Functions

= x iy. Also the. DEFINITION #1. If z=x+iy, then the complex conjugate of z is given by magnitude or absolute value of z is z =.

Section Summary. Definition of a Function.

RELATIONS AND FUNCTIONS

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

Functions. is the INPUT and is called the DOMAIN. is the OUTPUT and is called the RANGE.

Math 300: Final Exam Practice Solutions

Lecture 4: Constructing the Integers, Rationals and Reals

(1) Which of the following are propositions? If it is a proposition, determine its truth value: A propositional function, but not a proposition.

Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations

COMPOSITION OF FUNCTIONS

Day 15. Tuesday June 12, 2012

Math 42, Discrete Mathematics

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Functions

f(x) x

Func%ons. function f to the element a of A. Functions are sometimes called mappings or transformations.

1. Continuous Functions between Euclidean spaces

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Functions. Given a function f: A B:

30. TRANSFORMING TOOL #1 (the Addition Property of Equality)

SUPPLEMENTARY NOTES: CHAPTER 1

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

The Fundamental Group

FUNCTIONS - PART 2. If you are not familiar with any of the material below you need to spend time studying these concepts and doing some exercises.

CHAPTER 0: BACKGROUND (SPRING 2009 DRAFT)

Writing proofs. Tim Hsu, San José State University. May 31, Definitions and theorems 3. 2 What is a proof? 3. 3 A word about definitions 4

a. See the textbook for examples of proving logical equivalence using truth tables. b. There is a real number x for which f (x) < 0. (x 1) 2 > 0.

CS100: DISCRETE STRUCTURES

MATH 13 FINAL EXAM SOLUTIONS

Real Analysis. Joe Patten August 12, 2018

9 FUNCTIONS. 9.1 The Definition of Function. c Dr Oksana Shatalov, Fall

Section Summary. Definition of a Function.

CHAPTER 3: THE INTEGERS Z

Math 4606, Summer 2004: Inductive sets, N, the Peano Axioms, Recursive Sequences Page 1 of 10

Section 4.6 Negative Exponents

Inverse Functions. One-to-one. Horizontal line test. Onto

MATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017

Basics of Proofs. 1 The Basics. 2 Proof Strategies. 2.1 Understand What s Going On

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2:

Math 10850, fall 2017, University of Notre Dame

Math 4603: Advanced Calculus I, Summer 2016 University of Minnesota Notes on Cardinality of Sets

Chapter Summary. Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.

5 + 9(10) + 3(100) + 0(1000) + 2(10000) =

2.1 Definition. Let n be a positive integer. An n-dimensional vector is an ordered list of n real numbers.

Chapter Summary. Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Computability

Functions and cardinality (solutions) sections A and F TA: Clive Newstead 6 th May 2014

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

1 FUNCTIONS _ 5 _ 1.0 RELATIONS

RED. Name: Math 290 Fall 2016 Sample Exam 3

One-to-one functions and onto functions

SCHOOL OF BUSINESS, ECONOMICS AND MANAGEMENT BUSINESS MATHEMATICS / MATHEMATICAL ANALYSIS

Lecture 4.1: Homomorphisms and isomorphisms

CSE 331 Winter 2018 Reasoning About Code I

Supplementary Material for MTH 299 Online Edition

CIS 375 Intro to Discrete Mathematics Exam 3 (Section M001: Green) 6 December Points Possible

Rings If R is a commutative ring, a zero divisor is a nonzero element x such that xy = 0 for some nonzero element y R.

The symmetric group R + :1! 2! 3! 1. R :1! 3! 2! 1.

Functions. If x 2 D, then g(x) 2 T is the object that g assigns to x. Writing the symbols. g : D! T

Functions and one-to-one

Transcription:

MATH 22 Lecture N: 10/16/2003 FUNCTIONS: COMPOSITION & INVERSES Mad world! mad kings! mad composition! Shakespeare, King John, II:1 Copyright 2003 Larry Denenberg

Administrivia http://denenberg.com/lecturen.pdf Next Thursday s lecture will be, in part, a review for the next exam. Email questions or topics in advance to nobodylistening@blackhole.com. Warning: Problem 18 of 5.6 continues to (e) on the next column! Project 4: Grader pounds me, I pound you: This is your last warning! You can t manipulate non-equations. if p, then q is always true when p is false.

A Formal Peculiarity Consider the function f 1 : Z Æ Z where f 1 (x) = x 2. This function is neither one-to-one nor onto. Now consider f 2 : Z Æ { 0, 1, 4,...} where f 2 (x) = x 2. This function also is not one-to-one, but is onto. (We ve already noted the sensitivity of onto-ness to codomain.) But what, formally, are f 1 and f 2? Well, they re sets of ordered pairs, like any function. Look at this set: S = { (x, y) x Œ Z and y = x 2 } Here are some elements of S: (3,9) (0,0) ( 5,25) (5,25) ( 2,4) (9,81)... and so forth. Which of these functions is the set S? Answer: Both are! But how can it be that f 1 = S = f 2, that is, f 1 and f 2 are the same identical object (a set), yet f 1 isn t surjective and f 2 is surjective? Answer: There s no good answer. Grimaldi s formal definition of function doesn t encode the codomain. Grimaldi would say f 1 f 2, since they have different codomains, but is silent on what that means formally. Bottom line: Don t be confused. Understanding is more important than formalism.

Omission & Warning Let S be any set. The identity function on S is the function I : S Æ S such that I(x) = x for all x Œ S. (I takes its input and spits it out unchanged as output.) The identity function is a bijection on S; we might also think of it as a first projection on S. Important example. Let S be a set and let * be a binary operation on S with an identity e. Suppose that for some x Œ S there is an element y in S such that x * y = y * x = e. Then we call y the inverse of x under *, and we write y = x 1. Example: The inverse of 8 under addition is 8, since 8 + 8 = 8 + 8 = 0. The inverse of 8 under multiplication is 1/8. 0 has no multiplicative inverse. To have inverses, a binary operation must have an identity (so min has no inverses). But some binary operations have identity but no inverses, e.g.» and «. The study of inverse elements is hugely important. But we re not studying them here! We re studying inverses of functions. These are inverses of composition considered as a binary operation, hence not unrelated, but inverses in the abstract are not on the program.

Preimages Let f be a function from X to Y. Recall the following: If f(x) = y, then y is the image of x If f(x) = y, then x is a preimage of y If A is a subset of the domain of f, then f(a) is the set consisting of all y such that y = f(x) for some x in A, and we call f(a) the image of A. We complete this duality with the following definition: Suppose that B is a subset of the codomain of f. Then the preimage of B is the set of all x such that f(x) = y for some y Œ B. We write f 1 (B) for the preimage of B. (If B consists of a single point B = {y}, we write f 1 (y).) [blackboard picture of preimage] Example: Suppose g : {cities} Æ {states} is the statelocated-in function. Then g 1 ( {MA,NE} ) = {Natick, Newton, Omaha, Grand Island,...}. Also, g 1 (IA) = { Council Bluffs, Des Moines,... } Example: Suppose f is the floor function Îx. Then f 1 ( {0, 1, 2} ) = [0,3) f 1 ( {5, 7} ) = [5,6)» [7,8)

Examples & Theorems Example: Let h : {states} Æ {cities} be the capitalof function. Then h 1 ( {Montpelier, Helena} ) = {Montana, Vermont} h 1 (Omaha) = Example: Let i : R Æ R be the function i(x) = x 2 + 10. Then i 1 (R ) = i 1 (R + ) = R and i 1 ([0,10]) = { 0 }. As with images, the preimage of a set is always a set, even if some of these sets have only one element. E.g., if f is our familiar +1 function, then f 1 (7) really means f 1 ({7}) and equals {6}, not 6. Here are a few simple results on preimages, similar to but simpler than the corresponding theorem on images. Let f : X Æ Y and let B 1 and B 2 be subsets of Y. Then f 1 (B 1 «B 2 ) = f 1 (B 1 ) «f 1 (B 2 ) f 1 (B 1» B 2 ) = f 1 (B 1 )» f 1 (B 2 ) f 1 ( B 1 ) = f 1 (B 1 ) Proofs in the text, where G also gives a zillion examples of preimages, mostly with numerical functions. (But he does it in a way sure to confuse you, as we ll soon see.)

Functional Composition We think of a function as a box that takes an input and produces an output. To compose two functions means to connect the output of the first to the input of the second! [Blackboard picture] Consider again the squaring function f 1 (which takes any x to x 2 ) and the +1 function f 2 (which takes x to x+1). Suppose I take 5, shove it through f 1, then take the output and put it through f 2. The result is 26. If I wrap these two functions together and consider it as a single function, I get a new function that takes any input x and produces output x 2 +1. In symbols, f 1 (x) = x 2 and f 2 (x) = x+1. So the new composite function is f 2 (f 1 (x)) = x 2 + 1. We call this new function f 2 after f 1 and write it f 2 o f 1. Given two functions f and g the new function f o g is defined as follows: (f o g)(x) = f(g(x)) [The notation can be a little confusing: seeing f o g you might think that f operates first. Read the symbol o as after and you won t get confused. The other thing that you MUST keep in mind is that f o g is a new function that stands on its own, just like 8 in 5+3 = 8.]

Appropriateness We said: Given two functions f and g we can make a new function f o g. But this isn t true for any two functions; the output of g must be connectible to the input of f! For the function f o g to be defined, the codomain of g must be the domain of f. (Actually, it suffices that the range of g be a subset of the domain of f.) Formally: Suppose f : S Æ T and g : T Æ R are functions. Then g o f : S Æ R is the function that takes any x Œ S to g(f(x)). (But f o g is meaningless; (f o g)(x) would be f(g(x)), so x must be in T, but then g(x) Œ R and we can t take f(something in R)!) So, e.g., if f : {cities} Æ {states} is located-in, and g : {states} Æ Z is population of, then the function g o f : {cities} Æ Z takes any city c to the population of the state of c, e.g. (g o f)(omaha) 1.7M. But f o g is meaningless: what would (f o g)(ne) be? Of course, if f and g are both functions from S to S then both f o g and g o f are well-defined. Are they the same? If f is squaring, and g is increment, is f(g(x)) the same as g(f(x))?

More on Composition Example: Suppose f is state-located-in as above, and g : {states} Æ {cities} is the capital city of function. Then g o f : {cities} Æ{cities} maps any city to the city that s the capital of its state, e.g., (g o f)(medford) = Boston (g o f)(augusta) = Augusta Example: Suppose g : R Æ R is g(x) = x 2 + 0.5. Then floor o g is the function Îx 2 + 0.5, but g o floor is the function Îx 2 + 0.5. Are these the same? Example: Suppose g : R Æ R is g(x) = x 2 + 1. Then g o g : R Æ R is the function (g o g)(x) = g(g(x) = x 4 + 2x 2 + 2 We call this function g 2 ; by definition, g 2 = g o g. (Note that this definition makes sense only when the domain and codomain of g are the same.) We have g 2 (x) = g(g(x)). And g 3 = g 2 o g, so g 3 (x) = g(g(g(x))), and so forth recursively: for any n >1, g n is defined as g n 1 o g. These functions are the powers of g. Quirky point: The base case of the above recursive definition is implicitly g 1 = g. But what should g 0 be?

Associativity Theorem: Let h : A Æ B, g : B Æ C, and f : C Æ D be functions. Then (f o g) o h = f o (g o h). [explanation and intuitive proof by blackboard diagram] Proof: Let x be an element of A. We need to show that ((f o g) o h)(x) = (f o (g o h))(x) The left-hand side is, by definition, (f o g)(h(x)), which in turn is f(g(h(x))). The right-hand side is f((g o h)(x)) which is also f(g(h(x))). So the LHS and RHS are equal. Keep in mind that o is a closed binary operation, like addition or multiplication, since it takes two things and spits out another thing of the same type (which is what a closed binary operation is supposed to do). We ve just proven that o is an associative binary operation. And we saw earlier that o is not a commutative operation: In general, it s not true that f o g g o f. Question: Is o idempotent? Problem: Are there any functions such that f o g = g o f?

Simple Results If f and g are injective, then g o f is injective. Informal proof: If x and y are distinct, then f(x) and f(y) are distinct since f is injective. From this and the injectivity of g it follows that g(f(x)) and g(f(y)) are distinct. That is, if x and y are distinct then g(f(x)) and g(f(y)) are distinct, which is to say that g o f is injective. If f and g are onto, then g o f is onto. Even more informal proof: If f is onto then its domain maps to its entire codomain; same for g. Therefore g o f maps the domain of f first to the whole domain of g and then to the whole codomain of g, i.e., g o f is surjective. If f and g are bijections, then g o f is a bijection. Completely formal proof: Trivial, given the two results above. [To understand this completely you might find examples of functions such that f is injective but neither g nor f o g is injective. And the same thing in three other cases.]

Invertibility Once again, let f : Z Æ Z be the +1 function, and now consider the function g : Z Æ Z defined by g(x) = x 1. Notice that f(g(x)) = f(x 1) = (x 1)+1 = x for any x, that is, f o g is the identity function. Similarly, g o f is the identity function. In such a situation we say that g is the inverse of f; as a box, g undoes whatever f does, and f undoes whatever g does. In the example above the domain and codomain are the same. But we can be more general: Suppose f : X Æ Y is a function, and suppose g : Y Æ X is a function such that f(g(y)) = y for every y Œ Y, and g(f(x)) = x for every x Œ X. Said another way, f o g is the identity function on Y, and g o f is the identity function on X. Then we say that f is invertible and g is the inverse of f, and we write g = f 1. (Since the definition is symmetric, we can also say g is invertible, f is the inverse of g, and f = g 1.) (Technical point: I said suppose g is a function such that... but I didn t prove that there can be only one such function; maybe there there are several such functions g! But in fact if there is a g it must be unique; proof in G.)

Examples / Formalism Example: Suppose f : R Æ R is f(x) = 3x + 7. Then f 1 : R Æ R is the function f 1 (x) = (x 7)/3; note that f(f 1 (x)) = f 1 (f(x)) = x. [Both must hold!] Example: Suppose f : Z Æ E is the function f(x) = 2x. Then f 1 : E Æ Z is f 1 (x) = x/2. But f 1 : Z Æ Z with f 1 (x) = 2x is not invertible; there is no g : Z Æ Z such that g(f 1 (x)) = x and f 1 (g(x)) = x. (Try x = 3!) Formally, recall that a function is a set of ordered pairs. Then we form the converse of that set of ordered pairs by reversing each pair, i.e., we replace each (x,y) with (y,x). Of course the result may not be a function (why?). But if it is, then the original function is invertible, and the converse is the inverse function. Totally unilluminating. Caution: Do not confuse inverse with preimage, even though they use the same notation! The preimage of a set is defined for any function, but not all functions are invertible. We use the same notation for the following reason: If f is invertible, then for any set A the preimage of A under f is equal to the image of A under the inverse of f. So both are written f 1 (A).

Invertible = Bijective Suppose f : X Æ Y is invertible and that g : Y Æ X is its inverse. What can we say about f and g? First: f must be one-to-one; it s not possible that there are distinct x 1 and x 2 in X such that f(x 1 ) = f(x 2 ). Intuitively: If there were x 1 and x 2 that collapsed into the same y, how could g, given y, produce both of them? Formal proof: Suppose we are given x 1 and x 2 in X as above. So g(f(x 1 )) = g(f(x 2 )). But g(f(x 1 )) = x 1 and g(f(x 2 )) = x 2 by definition of inverse. So x 1 = x 2. QED Second: f must be onto; for each y Œ Y there must be some x Œ X such that f(x) = y. Proof: Since g is a function, for each y Œ Y we have g(y) Œ X. But then f(g(y)) = y by definition of inverse, and we ve found the x we need. We ve proved that every invertible function is bijective. It s also true that every bijective function is invertible! Sketch: Let f : X Æ Y be bijective. For each y Œ Y there is an x Œ X such that f(x) = y [since f is onto] and there is in fact exactly one such x [since f is 1-1]. So define a function g as follows: for each y Œ Y, let g(y) be that unique x. It s easy to prove that this g is the inverse of f.

An Important Theorem Suppose f : X Æ Y and g : Y Æ Z are both invertible functions. Then the function g o f : X Æ Z is also invertible, and in fact (g o f) 1 = f 1 o g 1. What does this theorem say? It says that if each step you go forward can be reversed, then you can also reverse the effect of going two steps forward. But you must take the reverse steps in backwards order! [blackboard picture] I strongly recommend that you prove this theorem yourself; it s not very hard, and it s a great exercise. We ll do one example: Let f : Z Æ Z be our old friend the +1 function, and let g : Z Æ E be the function that doubles its argument: g(x) = 2x, where E is the set of even integers. (Why did I put E here instead of Z?) Then g o f : Z Æ E is the function (g o f)(x) = 2x + 2 since g after f means add one then double. How do we invert this? Do we subtract one and halve? No indeed we must halve, then subtract one. f 1 is subtract one and g 1 is halve, so it must be that (g o f) 1, the inverse of g after f, is f 1 after g 1.

A Counting Theorem Suppose f : X Æ Y for finite sets X and Y such that X = Y. Then the following statements are equivalent: (a) f is invertible (b) f is bijective (c) f is injective (d) f is surjective (Remember what this means: These statements are either all true or all false. Said another way, if f possesses any of these properties, it possesses them all.) Recall how we prove a theorem of equivalent statements: we prove that (a) fi (b), that (b) fi (c), that (c) fi (d), and finally that (d) fi (a). Here things are simpler since we ve already proved (a) and (b) equivalent, and (b) implies both (c) and (d) by definition. So if we prove that (c) fi (b) and (d) fi (b) we re done. Details in G, using the Pigeonhole Principle. But here s the intuition: When two sets are of the same size, anything injective must be surjective since there can t be any extra elements in the codomain. And any surjection must be one-to-one since otherwise there aren t enough elements in the domain to cover the codomain. [proof by blackboard picture]