Functions, High-School Edition

Size: px
Start display at page:

Download "Functions, High-School Edition"

Transcription

1 Functions

2 What is a function?

3 Functions, High-School Edition

4 f(x) = x 4 5x source:

5 source:

6 Functions, High-School Edition In high school, functions are usually given as objects of the form f (x) = x3 +3 x x+7 1 x 137 What does a function do? It takes in as input a real number. It outputs a real number except when there are vertical asymptotes or other discontinuities, in which case the function doesn't output anything.

7 Functions, CS Edition

8 int flipuntil(int n) { int numheads = 0; int numtries = 0; while (numheads < n) { if (randomboolean()) numheads++; numtries++; } return numtries; }

9 Functions, CS Edition In programming, functions might take in inputs, might return values, might have side effects, might never return anything, might crash, and might return different values when called multiple times.

10 What's Common? Although high-school math functions and CS functions are pretty different, they have two key aspects in common: They take in inputs. They produce outputs. In math, we like to keep things easy, so that's pretty much how we're going to define a function.

11 Rough Idea of a Function: A function is an object f that takes in an input and produces exactly one output. x f f(x) (This is not a complete definition we'll revisit this in a bit.)

12 High School versus CS Functions In high school, functions usually were given by a rule: f(x) = 4x + 15 In CS, functions are usually given by code: int factorial(int n) { int result = 1; for (int i = 1; i <= n; i++) { result *= i; } return result; } What sorts of functions are we going to allow from a mathematical perspective?

13 Dikdik Nubian Ibex Sloth

14

15 but also

16 f(x) = x 2 + 3x 15

17 f (n)={ n/2 (n+1)/2 if n is even otherwise Functions like like these these are are called piecewise functions.

18 To define a function, you will typically either draw a picture, or give a rule for determining the output.

19 In mathematics, functions are deterministic. That is, given the same input, a function must always produce the same output. The following is a perfectly valid piece of C++ code, but it s not a valid function under our definition: int randomnumber(int numoutcomes) { return rand() % numoutcomes; }

20 One Challenge

21 f(x) = x 2 + 2x + 5 f( 3 ) = = 20 f( 0 ) = = 5 f( 3 ) =?

22 f(x) = x 2 + 2x + 5 f( 3 ) = = 20 f( 0 ) = = 5 f( 3 ) =?

23 f(x) = x 2 + 2x + 5 f( 3 ) = = 20 f( 0 ) = = 5 f( 3 ) =?

24 f(x) = x 2 + 2x + 5 f( 3 ) = = 20 f( 0 ) = = 5 f( 3 ) =?

25 f( ) = f( ) = 137?

26 We need to make sure we can't apply functions to meaningless inputs.

27 Domains and Codomains Every function f has two sets associated with it: its domain and its codomain. A function f can only be applied to elements of its domain. For any x in the domain, f(x) belongs to the codomain. The The function function must must be be defined defined for for every every element element of of the the domain. domain. Domain Codomain The The output output of of the the function function must must always always be be in in the the codomain, codomain, but but not not all all elements elements of of the the codomain codomain must must be be produced produced as as outputs. outputs.

28 Domains and Codomains Every function f has two sets associated with it: its domain and its codomain. A function f can only be applied to elements of its domain. For any x in the domain, f(x) belongs to the codomain. The The domain domain of of this this function function is is R. R. Any Any real real number number can can be be provided provided as as input. input. The The codomain codomain of of this this function function is is R. R. Everything Everything produced produced is is a a real real number, number, but but not not all all real real numbers numbers can can be be produced. produced. double absolutevalueof(double x) { if (x >= 0) { return x; } else { return -x; } }

29 Domains and Codomains If f is a function whose domain is A and whose codomain is B, we write f : A B. Think of this like a function prototype in C++. Return Return type type Argument Argument type type Argument Argument type type Return Return type type B f(a arg); f : A B Function Function name name Function Function name name

30 The Official Rules for Functions Formally speaking, we say that f : A B if the following two rules hold. First, f must be obey its domain/codomain rules: a A. b B. f(a) = b ( Every input in A maps to some output in B. ) Second, f must be deterministic: a₁ A. a₂ A. (a₁ = a₂ f(a₁) = f(a₂)) ( Equal inputs produce equal outputs. ) If you re ever curious about whether something is a function, look back at these rules and check! For example: Can a function have an empty domain? Can a function have an empty codomain?

31 Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain to some element of the codomain. Examples: f(n) = n + 1, where f : Z Z g(x) = sin x, where g : R R Notice that we're giving both a rule and the domain/codomain.

32 Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain to some element of the codomain. Examples: f(n) = n + 1, where f : Z Z g(x) = sin x, where g : R R Notice that we're giving both a rule and the domain/codomain.

33 Is This a Function From A to B? Stanford Cardinal Berkeley Blue Michigan Gold Arkansas White A B

34 Is This a Function From A to B? California Dover New York Sacramento Delaware Albany Washington DC A B

35 Is This a Function From A to B? م ح ر م ص ف ر ر بيع األو ل ر بيع الثاني ج مادى األولى ج مادى اآلخرة ر ج ب ش ع بان ر م ضان شو ال ذو القعدة عيد الفطر عيد األضحى A ذو الحجة B

36 Combining Functions

37 f : People Places g : Places Prices Keith Josh Mountain View San Francisco Far Too Much King's Ransom Divya Teresa Julian Redding, CA Barrow, AK Palo Alto A Modest Amount More Than You d Expect People Places Prices h : People Prices h(x) = g(f(x))

38 Function Composition Suppose that we have two functions f : A B and g : B C. Notice that the codomain of f is the domain of g. This means that we can use outputs from f as inputs to g. x f f(x) g g(f(x))

39 Function Composition Suppose that we have two functions f : A B and g : B C. The composition of f and g, denoted g f, is a function where g f : A C, and (g f)(x) = g(f(x)). A few things to notice: The The name name of of the the function function is is g g f. f. When When we we apply apply it it to to an an input input x, x, we we write write (g (g f)(x). f)(x). I I don't don't know know why, why, but but that's that's what what we we do. do. The domain of g f is the domain of f. Its codomain is the codomain of g. Even though the composition is written g f, when evaluating (g f)(x), the function f is evaluated first.

40 Time-Out for Announcements!

41 Applications are now open for Google s 2019 student scholarships. Selected student will each receive a $10,000 scholarship for the academic year and be invited to attend the annual Google Scholars' Retreat at the Googleplex next summer. Here is a list of open scholarships that you can share with your students: Women Techmakers Scholars Program ( is open to current undergraduate or graduate students who will be studying at a university in the United States or Canada for the academic year. We strongly encourage people who identify as female to apply. Deadline: December 6, 2018 Generation Google Scholarship ( is open to current undergraduate or graduate students who will be studying at a university in the United States or Canada for the academic year. We strongly encourage students from historically underrepresented groups, including Black/African American, Hispanic/Latino, American Indian, or Filipino/Native Hawaiian/Pacific Islander, to apply. Deadline: December 6, 2018 Google Lime Scholarship ( open to current undergraduate or graduate students with disabilities who will be studying at a university in the United States or Canada for the academic year. Deadline: December 9, 2018 Google Student Veterans of America Scholarship ( is open to current undergraduate or graduate student veterans who will be studying at a university in the United States for the academic year. Deadline: November 1, 2018 For questions and complete details on all of our scholarships, please visit

42 Problem Set Three Problem Set Two was due today at 2:30PM. Want to use late days? Submit the assignment by Sunday at 2:30PM. Problem Set Three goes out today. The checkpoint is due on Monday at 2:30PM. The remaining problems are due Friday at 2:30PM. Play around with binary relations, functions, their properties, and their applications! As usual, feel free to ask questions! Ask on Piazza! Stop by office hours!

43 Extra Practice Problems We ve posted a set of ten extra practice problems to the course website, with solutions. Feel free to use these to help solidify your understanding of concepts or to practice techniques. We re happy to discuss these questions in office hours there s no stakes on them.

44 Your Questions

45 I went to the career fair and just felt so inadequate after. How do you keep from letting those situations get to you? How should I decide between working for a smaller startup or a big company? How much do resumes matter in the tech industry? Are career fairs helpful and necessary? I didn t go because I was scared. I worry if I never attend one it will be difficult to get a job. What s do you think? I m I m going going to to give give a a meta-answer meta-answer to to this this one! one!

46 Can you answer a more diverse set of questions on here beyond career advice? This area seems to be overrepresented, and there's many interesting others! Yes, Yes, absolutely! absolutely! I ll I ll turn turn that that back back around around and and ask ask for for all all y all y all to to ask ask questions questions on on other other topics topics as as well. well.

47 How do I feel like I can belong in CS? I find it really hard when all of the CS professors I've had at Stanford are men I m I m going going to to split split this this into into two two separate separate questions questions one one about about belonging belonging and and one one about about faculty faculty diversity diversity rather rather than than take take on on the the two two together. together. Want Want to to talk talk about about the the two two in in tandem? tandem? Come Come talk talk to to me me in in office office hours, hours, or or me me and and let s let s set set up up a a time time to to chat chat oneon-one. oneon-one. I I want want to to hear hear your your thoughts! thoughts! We We have have some some stellar stellar female female faculty faculty that that we ve we ve hired hired in in the the past past few few years years and and I d I d be be happy happy to to make make introductions introductions if if you d you d like. like. You You can can also also get get involved involved in in the the hiring hiring process; process; the the department department solicits solicits input input from from students students about about faculty faculty candidates. candidates. As As for for community community the the fact fact that that CS CS is is so so big big cuts cuts both both ways. ways. The The major major is is fairly fairly heterogeneous heterogeneous and and there there are are lots lots of of communities communities to to reach reach out out to. to. Fun Fun fact fact there there are are more more women women majoring majoring in in CS CS than than in in any any other other major major at at Stanford. Stanford. Check Check out out groups groups like like WiCS, WiCS, SOLE, SOLE, SBSE, SBSE, etc. etc. if if this this is is something something you re you re interested interested in! in!

48 Back to CS103!

49 Special Types of Functions

50 Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto

51 Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune Pluto

52 Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune

53 Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune

54 Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune

55 Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune

56 Injective Functions A function f : A B is called injective (or one-to-one) if the following statement is true about f: a₁ A. a₂ A. (a₁ a₂ f(a₁) f(a₂)) ( If the inputs are different, the outputs are different. ) The following first-order definition is equivalent and is often useful in proofs. a₁ A. a₂ A. (f(a₁) = f(a₂) a₁ = a₂) ( If the outputs are the same, the inputs are the same. ) A function with this property is called an injection. How does this compare to our second rule for functions?

57 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₀, n₁ N where f(n₀) = f(n₁). We will prove that n₀ = n₁. Since f(n₀) = f(n₁), we see that 2n₀ + 7 = 2n₁ + 7. This in turn means that so n₀ = n₁, as required. 2n₀ = 2n₁,

58 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₀, n₁ N where f(n₀) = f(n₁). We will prove that n₀ = n₁. Since f(n₀) = f(n₁), we see that 2n₀ + 7 = 2n₁ + 7. This in turn means that so n₀ = n₁, as required. 2n₀ = 2n₁,

59 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₀, n₁ N where f(n₀) = f(n₁). We will prove that n₀ = n₁. What Since What does f(n₀) does it = f(n₁), it mean mean for we see for the that the function function f f to to be be injective? 2n₀ + 7 = 2n₁ + 7. This n₀ in turn means that n₀ N. N. n₁ n₁ N. N. (( f(n₀) f(n₀) = f(n₁) f(n₁) n₀ n₀ = n₁ n₁ )) 2n₀ = 2n₁, n₀ n₀ N. N. n₁ n₁ N. N. (( n₀ n₀ n₁ n₁ f(n₀) f(n₀) f(n₁) f(n₁) )) so n₀ = n₁, as required. Therefore, we'll we'll pick pick arbitrary arbitrary n₀, n₀, n₁ n₁ N where where f(n₀) f(n₀) = f(n₁), f(n₁), then then prove prove that that n₀ n₀ = n₁. n₁.

60 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₀, n₁ N where f(n₀) = f(n₁). We will prove that n₀ = n₁. What Since What does f(n₀) does it = f(n₁), it mean mean for we see for the that the function function f f to to be be injective? 2n₀ + 7 = 2n₁ + 7. This n₁ in turn means that n₁ N. N. n₂ n₂ N. N. (( f(n₁) f(n₁) = f(n₂) f(n₂) n₁ n₁ = n₂ n₂ )) 2n₀ = 2n₁, n₁ n₁ N. N. n₂ n₂ N. N. (( n₁ n₁ n₂ n₂ f(n₁) f(n₁) f(n₂) f(n₂) )) so n₀ = n₁, as required. Therefore, we'll we'll pick pick arbitrary arbitrary n₀, n₀, n₁ n₁ N where where f(n₀) f(n₀) = f(n₁), f(n₁), then then prove prove that that n₀ n₀ = n₁. n₁.

61 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₀, n₁ N where f(n₀) = f(n₁). We will prove that n₀ = n₁. What Since What does f(n₀) does it = f(n₁), it mean mean for we see for the that the function function f f to to be be injective? 2n₀ + 7 = 2n₁ + 7. This n₁ in turn means that n₁ N. N. n₂ n₂ N. N. (( f(n₁) f(n₁) = f(n₂) f(n₂) n₁ n₁ = n₂ n₂ )) 2n₀ = 2n₁, n₁ n₁ N. N. n₂ n₂ N. N. (( n₁ n₁ n₂ n₂ f(n₁) f(n₁) f(n₂) f(n₂) )) so n₀ = n₁, as required. Therefore, we'll we'll pick pick arbitrary arbitrary n₀, n₀, n₁ n₁ N where where f(n₀) f(n₀) = f(n₁), f(n₁), then then prove prove that that n₀ n₀ = n₁. n₁.

62 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₀, n₁ N where f(n₀) = f(n₁). We will prove that n₀ = n₁. What Since What does f(n₀) does it = f(n₁), it mean mean for we see for the that the function function f f to to be be injective? 2n₀ + 7 = 2n₁ + 7. This n₁ in turn means that n₁ N. N. n₂ n₂ N. N. (( f(n₁) f(n₁) = f(n₂) f(n₂) n₁ n₁ = n₂ n₂ )) 2n₀ = 2n₁, n₁ n₁ N. N. n₂ n₂ N. N. (( n₁ n₁ n₂ n₂ f(n₁) f(n₁) f(n₂) f(n₂) )) so n₀ = n₁, as required. Therefore, we'll we'll pick pick arbitrary arbitrary n₁, n₁, n₂ n₂ N where where f(n₁) f(n₁) = f(n₂), f(n₂), then then prove prove that that n₁ n₁ = n₂. n₂.

63 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₀, n₁ N where f(n₀) = f(n₁). We will prove that n₀ = n₁. What Since What does f(n₀) does it = f(n₁), it mean mean for we see for the that the function function f f to to be be injective? 2n₀ + 7 = 2n₁ + 7. This n₁ in turn means that n₁ N. N. n₂ n₂ N. N. (( f(n₁) f(n₁) = f(n₂) f(n₂) n₁ n₁ = n₂ n₂ )) 2n₀ = 2n₁, n₁ n₁ N. N. n₂ n₂ N. N. (( n₁ n₁ n₂ n₂ f(n₁) f(n₁) f(n₂) f(n₂) )) so n₀ = n₁, as required. Therefore, we'll we'll pick pick arbitrary arbitrary n₁, n₁, n₂ n₂ N where where f(n₁) f(n₁) = f(n₂), f(n₂), then then prove prove that that n₁ n₁ = n₂. n₂.

64 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₀, n₁ N where f(n₀) = f(n₁). We will prove that n₀ = n₁. What Since What does f(n₀) does it = f(n₁), it mean mean for we see for the that the function function f f to to be be injective? 2n₀ + 7 = 2n₁ + 7. This n₁ in turn means that n₁ N. N. n₂ n₂ N. N. (( f(n₁) f(n₁) = f(n₂) f(n₂) n₁ n₁ = n₂ n₂ )) 2n₀ = 2n₁, n₁ n₁ N. N. n₂ n₂ N. N. (( n₁ n₁ n₂ n₂ f(n₁) f(n₁) f(n₂) f(n₂) )) so n₀ = n₁, as required. Therefore, we'll we'll pick pick arbitrary arbitrary n₁, n₁, n₂ n₂ N where where f(n₁) f(n₁) = f(n₂), f(n₂), then then prove prove that that n₁ n₁ = n₂. n₂.

65 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₀, n₁ N where f(n₀) = f(n₁). We will prove that n₀ = n₁. What Since What does f(n₀) does it = f(n₁), it mean mean for we see for the that the function function f f to to be be injective? 2n₀ + 7 = 2n₁ + 7. This n₁ in turn means that n₁ N. N. n₂ n₂ N. N. (( f(n₁) f(n₁) = f(n₂) f(n₂) n₁ n₁ = n₂ n₂ )) 2n₀ = 2n₁, n₁ n₁ N. N. n₂ n₂ N. N. (( n₁ n₁ n₂ n₂ f(n₁) f(n₁) f(n₂) f(n₂) )) so n₀ = n₁, as required. Therefore, we'll we'll pick pick arbitrary arbitrary n₁, n₁, n₂ n₂ N where where f(n₁) f(n₁) = f(n₂), f(n₂), then then prove prove that that n₁ n₁ = n₂. n₂.

66 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₁, n₂ N where f(n₁) = f(n₂). We will prove that n₁ = n₂. Since f(n₀) = f(n₁), we see that 2n₀ + 7 = 2n₁ + 7. This in turn means that so n₀ = n₁, as required. 2n₀ = 2n₁,

67 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₁, n₂ N where f(n₁) = f(n₂). We will prove that n₁ = n₂. Since f(n₁) = f(n₂), we see that 2n₁ + 7 = 2n₂ + 7. This in turn means that so n₀ = n₁, as required. 2n₀ = 2n₁,

68 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₁, n₂ N where f(n₁) = f(n₂). We will prove that n₁ = n₂. Since f(n₁) = f(n₂), we see that 2n₁ + 7 = 2n₂ + 7. This in turn means that so n₀ = n₁, as required. 2n₁ = 2n₂

69 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₁, n₂ N where f(n₁) = f(n₂). We will prove that n₁ = n₂. Since f(n₁) = f(n₂), we see that 2n₁ + 7 = 2n₂ + 7. This in turn means that so n₁ = n₂, as required. 2n₁ = 2n₂

70 Injective Functions Theorem: Let f : N N be defined as f(n) = 2n + 7. Then f is injective. Proof: Consider any n₁, n₂ N where f(n₁) = f(n₂). We will prove that n₁ = n₂. Since f(n₁) = f(n₂), we see that 2n₁ + 7 = 2n₂ + 7. This in turn means that so n₁ = n₂, as required. 2n₁ = 2n₂ Good Good exercise: exercise: Repeat Repeat this this proof proof using using the the other other definition definition of of injectivity! injectivity!

71 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). Let x₀ = -1 and x₁ = +1. Then and f(x₀) = f(-1) = (-1) 4 = 1 f(x₁) = f(1) = 1 4 = 1, so f(x₀) = f(x₁) even though x₀ x₁, as required.

72 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). Let x₀ = -1 and x₁ = +1. Then and f(x₀) = f(-1) = (-1) 4 = 1 f(x₁) = f(1) = 1 4 = 1, so f(x₀) = f(x₁) even though x₀ x₁, as required.

73 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₀ -1 and = +1. Then x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) f(x₁)) f(x₁)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) f(x₁)) f(x₁)) x₀ x₀ Z. Z. x₁ x₁ f(x₁) Z. = Z. (x₀ f(1) (x₀ = x₁ x₁ 1 4 = f(x₀) f(x₀) 1, f(x₁)) f(x₁)) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) f(x₁)) f(x₁)) so f(x₀) x₀ x₀ = f(x₁) Z. Z. x₁ x₁ even Z. Z. though (x₀ (x₀ x₁ x₀ x₁ (f(x₀) x₁, (f(x₀) as required. f(x₁))) f(x₁))) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) = f(x₁)) f(x₁)) Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but f(x₀) = f(x₁). Can we do that? f(x₀) = f(x₁). Can we do that?

74 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₁ -1 and x₁ = +1. Then x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) f(x₁)) f(x₁)) x₀ x₀ Z. Z. x₁ x₁ f(x₁) Z. = Z. (x₀ f(1) (x₀ = x₁ x₁ 1 4 = f(x₀) f(x₀) 1, f(x₁)) f(x₁)) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) f(x₁)) f(x₁)) so f(x₀) x₀ x₀ = f(x₁) Z. Z. x₁ x₁ even Z. Z. though (x₀ (x₀ x₁ x₀ x₁ (f(x₀) x₁, (f(x₀) as required. f(x₁))) f(x₁))) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) = f(x₁)) f(x₁)) Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but f(x₀) = f(x₁). Can we do that? f(x₀) = f(x₁). Can we do that?

75 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₁ -1 and x₁ = +1. Then x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) f(x₁)) f(x₁)) x₀ x₀ Z. Z. x₁ x₁ f(x₁) Z. = Z. (x₀ f(1) (x₀ = x₁ x₁ 1 4 = f(x₀) f(x₀) 1, f(x₁)) f(x₁)) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) f(x₁)) f(x₁)) so f(x₀) x₀ x₀ = f(x₁) Z. Z. x₁ x₁ even Z. Z. though (x₀ (x₀ x₁ x₀ x₁ (f(x₀) x₁, (f(x₀) as required. f(x₁))) f(x₁))) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) = f(x₁)) f(x₁)) Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but f(x₀) = f(x₁). Can we do that? f(x₀) = f(x₁). Can we do that?

76 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₁ -1 and x₁ = +1. Then x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) x₀ x₀ Z. Z. x₁ x₁ f(x₁) Z. Z. = (x₀ (x₀ f(1) = x₁ x₁ 1 4 = f(x₀) f(x₀) 1, f(x₁)) f(x₁)) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) f(x₁)) f(x₁)) so f(x₀) x₀ x₀ = f(x₁) Z. Z. x₁ x₁ even Z. though Z. (x₀ (x₀ x₁ x₀ x₁ (f(x₀) x₁, (f(x₀) as required. f(x₁))) f(x₁))) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) = f(x₁)) f(x₁)) Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but f(x₀) = f(x₁). Can we do that? f(x₀) = f(x₁). Can we do that?

77 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₁ -1 and x₁ = +1. Then x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ f(x₁) Z. Z. = (x₁ (x₁ f(1) = x₂ x₂ 1 4 = f(x₁) f(x₁) 1, f(x₂)) f(x₂)) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) f(x₁)) f(x₁)) so f(x₀) x₀ x₀ = f(x₁) Z. Z. x₁ x₁ even Z. though Z. (x₀ (x₀ x₁ x₀ x₁ (f(x₀) x₁, (f(x₀) as required. f(x₁))) f(x₁))) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) = f(x₁)) f(x₁)) Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but f(x₀) = f(x₁). Can we do that? f(x₀) = f(x₁). Can we do that?

78 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₁ -1 and x₁ = +1. Then x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ f(x₁) Z. Z. = (x₁ (x₁ f(1) = x₂ x₂ 1 4 = f(x₁) f(x₁) 1, f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) so f(x₀) x₀ x₀ = f(x₁) Z. Z. x₁ x₁ even Z. though Z. (x₀ (x₀ x₁ x₀ x₁ (f(x₀) x₁, (f(x₀) as required. f(x₁))) f(x₁))) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) = f(x₁)) f(x₁)) Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but f(x₀) = f(x₁). Can we do that? f(x₀) = f(x₁). Can we do that?

79 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₁ -1 and x₁ = +1. Then x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ f(x₁) Z. Z. = (x₁ (x₁ f(1) = x₂ x₂ 1 4 = f(x₁) f(x₁) 1, f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) so f(x₀) x₁ x₁ = f(x₁) Z. Z. x₂ x₂ even Z. though Z. (x₁ (x₁ x₂ x₀ x₂ (f(x₁) x₁, (f(x₁) as required. f(x₂))) f(x₂))) x₀ x₀ Z. Z. x₁ x₁ Z. Z. (x₀ (x₀ x₁ x₁ f(x₀) f(x₀) = f(x₁)) f(x₁)) Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but f(x₀) = f(x₁). Can we do that? f(x₀) = f(x₁). Can we do that?

80 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₁ -1 and x₁ = +1. Then x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ f(x₁) Z. Z. = (x₁ (x₁ f(1) = x₂ x₂ 1 4 = f(x₁) f(x₁) 1, f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) so f(x₀) x₁ x₁ = f(x₁) Z. Z. x₂ x₂ even Z. though Z. (x₁ (x₁ x₂ x₀ x₂ (f(x₁) x₁, (f(x₁) as required. f(x₂))) f(x₂))) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) = f(x₂)) f(x₂)) Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but Therefore, we need to find x₀, x₁ Z such that x₀ x₁, but f(x₀) = f(x₁). Can we do that? f(x₀) = f(x₁). Can we do that?

81 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₁ -1 and x₁ = +1. Then x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ f(x₁) Z. Z. = (x₁ (x₁ f(1) = x₂ x₂ 1 4 = f(x₁) f(x₁) 1, f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) so f(x₀) x₁ x₁ = f(x₁) Z. Z. x₂ x₂ even Z. though Z. (x₁ (x₁ x₂ x₀ x₂ (f(x₁) x₁, (f(x₁) as required. f(x₂))) f(x₂))) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) = f(x₂)) f(x₂)) Therefore, we need to find x₁, x₂ Z such that x₁ x₂, but f(x₁) = f(x₂). Therefore, we need to find x₁, x₂ Z such that x₁ x₂, but f(x₁) = f(x₂). Can we do that? Can we do that?

82 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₁ -1 and x₁ = +1. Then x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ f(x₁) Z. Z. = (x₁ (x₁ f(1) = x₂ x₂ 1 4 = f(x₁) f(x₁) 1, f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) so f(x₀) x₁ x₁ = f(x₁) Z. Z. x₂ x₂ even Z. though Z. (x₁ (x₁ x₂ x₀ x₂ (f(x₁) x₁, (f(x₁) as required. f(x₂))) f(x₂))) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) = f(x₂)) f(x₂)) Therefore, we need to find x₁, x₂ Z such that x₁ x₂, but f(x₁) = f(x₂). Therefore, we need to find x₁, x₂ Z such that x₁ x₂, but f(x₁) = f(x₂). Can we do that? Can we do that?

83 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₁ -1 and x₁ = +1. Then x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ f(x₁) Z. Z. = (x₁ (x₁ f(1) = x₂ x₂ 1 4 = f(x₁) f(x₁) 1, f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) so f(x₀) x₁ x₁ = f(x₁) Z. Z. x₂ x₂ even Z. though Z. (x₁ (x₁ x₂ x₀ x₂ (f(x₁) x₁, (f(x₁) as required. f(x₂))) f(x₂))) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) = f(x₂)) f(x₂)) Therefore, we need to find x₁, x₂ Z such that x₁ x₂, but f(x₁) = f(x₂). Therefore, we need to find x₁, x₂ Z such that x₁ x₂, but f(x₁) = f(x₂). Can we do that? Can we do that?

84 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₀ and x₁ such that x₀ x₁, but f(x₀) = f(x₁). What does it mean for f to be injective? What does it mean for f to be injective? Let x₀ = x₁ -1 and x₁ = +1. Then x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) f(x₀) = f(-1) = (-1) 4 = 1 What is the negation of this statement? What is the negation of this statement? and x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ f(x₁) Z. Z. = (x₁ (x₁ f(1) = x₂ x₂ 1 4 = f(x₁) f(x₁) 1, f(x₂)) f(x₂)) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) f(x₂)) f(x₂)) so f(x₀) x₁ x₁ = f(x₁) Z. Z. x₂ x₂ even Z. though Z. (x₁ (x₁ x₂ x₀ x₂ (f(x₁) x₁, (f(x₁) as required. f(x₂))) f(x₂))) x₁ x₁ Z. Z. x₂ x₂ Z. Z. (x₁ (x₁ x₂ x₂ f(x₁) f(x₁) = f(x₂)) f(x₂)) Therefore, we need to find x₁, x₂ Z such that x₁ x₂, but f(x₁) = f(x₂). Therefore, we need to find x₁, x₂ Z such that x₁ x₂, but f(x₁) = f(x₂). Can we do that? Can we do that?

85 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₁ and x₂ such that x₁ x₂, but f(x₁) = f(x₂). Let x₀ = -1 and x₁ = +1. Then and f(x₀) = f(-1) = (-1) 4 = 1 f(x₁) = f(1) = 1 4 = 1, so f(x₀) = f(x₁) even though x₀ x₁, as required.

86 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₁ and x₂ such that x₁ x₂, but f(x₁) = f(x₂). Let x₁ = -1 and x₂ = +1. Then and f(x₀) = f(-1) = (-1) 4 = 1 f(x₁) = f(1) = 1 4 = 1, so f(x₀) = f(x₁) even though x₀ x₁, as required.

87 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₁ and x₂ such that x₁ x₂, but f(x₁) = f(x₂). Let x₁ = -1 and x₂ = +1. and f(x₁) = f(-1) = (-1) 4 = 1 f(x₁) = f(1) = 1 4 = 1, so f(x₀) = f(x₁) even though x₀ x₁, as required.

88 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₁ and x₂ such that x₁ x₂, but f(x₁) = f(x₂). Let x₁ = -1 and x₂ = +1. and f(x₁) = f(-1) = (-1) 4 = 1 f(x₂) = f(1) = 1 4 = 1, so f(x₀) = f(x₁) even though x₀ x₁, as required.

89 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₁ and x₂ such that x₁ x₂, but f(x₁) = f(x₂). Let x₁ = -1 and x₂ = +1. and f(x₁) = f(-1) = (-1) 4 = 1 f(x₂) = f(1) = 1 4 = 1, so f(x₁) = f(x₂) even though x₁ x₂, as required.

90 Injective Functions Theorem: Let f : Z N be defined as f(x) = x 4. Then f is not injective. Proof: We will prove that there exist integers x₁ and x₂ such that x₁ x₂, but f(x₁) = f(x₂). Let x₁ = -1 and x₂ = +1. and f(x₁) = f(-1) = (-1) 4 = 1 f(x₂) = f(1) = 1 4 = 1, so f(x₁) = f(x₂) even though x₁ x₂, as required.

91 Injections and Composition

92 Injections and Composition Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is an injection. Our goal will be to prove this result. To do so, we're going to have to call back to the formal definitions of injectivity and function composition.

93 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that g(f(a₁)) g(f(a₂)), as required.

94 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that g(f(a₁)) g(f(a₂)), as required.

95 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that g(f(a₁)) g(f(a₂)), as required.

96 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that g(f(a₁)) g(f(a₂)), as required.

97 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). There There are are two two definitions definitions of of injectivity injectivity that that we we can can use use here: here: Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that a₁ a₁ g(f(a₁)) A. A. a₂ a₂ g(f(a₂)), A. A. as ((g ((g required. f)(a₁) f)(a₁) = (g (g f)(a₂) f)(a₂) a₁ a₁ = a₂) a₂) a₁ a₁ A. A. a₂ a₂ A. A. (a₁ (a₁ a₂ a₂ (g (g f)(a₁) f)(a₁) (g (g f)(a₂)) Therefore, Therefore, we ll we ll choose choose an an arbitrary arbitrary a₁, a₁, a₂ a₂ A where where a₁ a₁ a₂, a₂, then then prove prove that that (g (g f)(a₁) f)(a₁) (g (g f)(a₂). f)(a₂).

98 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). There There are are two two definitions definitions of of injectivity injectivity that that we we can can use use here: here: Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that a₁ a₁ g(f(a₁)) A. A. a₂ a₂ g(f(a₂)), A. A. as ((g ((g required. f)(a₁) f)(a₁) = (g (g f)(a₂) f)(a₂) a₁ a₁ = a₂) a₂) a₁ a₁ A. A. a₂ a₂ A. A. (a₁ (a₁ a₂ a₂ (g (g f)(a₁) f)(a₁) (g (g f)(a₂)) Therefore, Therefore, we ll we ll choose choose an an arbitrary arbitrary a₁, a₁, a₂ a₂ A where where a₁ a₁ a₂, a₂, then then prove prove that that (g (g f)(a₁) f)(a₁) (g (g f)(a₂). f)(a₂).

99 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). There There are are two two definitions definitions of of injectivity injectivity that that we we can can use use here: here: Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that a₁ a₁ g(f(a₁)) A. A. a₂ a₂ g(f(a₂)), A. A. as ((g ((g required. f)(a₁) f)(a₁) = (g (g f)(a₂) f)(a₂) a₁ a₁ = a₂) a₂) a₁ a₁ A. A. a₂ a₂ A. A. (a₁ (a₁ a₂ a₂ (g (g f)(a₁) f)(a₁) (g (g f)(a₂)) Therefore, Therefore, we ll we ll choose choose an an arbitrary arbitrary a₁, a₁, a₂ a₂ A where where a₁ a₁ a₂, a₂, then then prove prove that that (g (g f)(a₁) f)(a₁) (g (g f)(a₂). f)(a₂).

100 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that g(f(a₁)) g(f(a₂)), as required.

101 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that g(f(a₁)) g(f(a₂)), as required.

102 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that How g(f(a₁)) g(f(a₂)), How is as is (g required. (g f)(x) f)(x) defined? defined? (g (g f)(x) f)(x) = g(f(x)) g(f(x)) So So we we need need to to prove prove that that g(f(a₁)) g(f(a₁)) g(f(a₂)). g(f(a₂)).

103 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that How g(f(a₁)) g(f(a₂)), How is as is (g required. (g f)(x) f)(x) defined? defined? (g (g f)(x) f)(x) = g(f(x)) g(f(x)) So So we we need need to to prove prove that that g(f(a₁)) g(f(a₁)) g(f(a₂)). g(f(a₂)).

104 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that How g(f(a₁)) g(f(a₂)), How is as is (g required. (g f)(x) f)(x) defined? defined? (g (g f)(x) f)(x) = g(f(x)) g(f(x)) So So we we need need to to prove prove that that g(f(a₁)) g(f(a₁)) g(f(a₂)). g(f(a₂)).

105 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that How g(f(a₁)) g(f(a₂)), How is as is (g required. (g f)(x) f)(x) defined? defined? (g (g f)(x) f)(x) = g(f(x)) g(f(x)) So So we we need need to to prove prove that that g(f(a₁)) g(f(a₁)) g(f(a₂)). g(f(a₂)).

106 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that g(f(a₁)) g(f(a₂)), as required. a₁ f(a₁) g(f(a₁)) a₂ f(a₂) A B C g(f(a₂))

107 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that g(f(a₁)) g(f(a₂)), as required. a₁ f(a₁) g(f(a₁)) a₂ f(a₂) A B C g(f(a₂))

108 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that g(f(a₁)) g(f(a₂)), as required. a₁ f(a₁) g(f(a₁)) a₂ f(a₂) A B C g(f(a₂))

109 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that g(f(a₁)) g(f(a₂)), as required. a₁ f(a₁) g(f(a₁)) a₂ f(a₂) A B C g(f(a₂))

110 Theorem: If f : A B is an injection and g : B C is an injection, then the function g f : A C is also an injection. Proof: Let f : A B and g : B C be arbitrary injections. We will prove that the function g f : A C is also injective. To do so, consider any a₁, a₂ A where a₁ a₂. We will prove that (g f)(a₁) (g f)(a₂). Equivalently, we need to show that g(f(a₁)) g(f(a₂)). Since f is injective and a₁ a₂, we see that f(a₁) f(a₂). Then, since g is injective and f(a₁) f(a₂), we see that g(f(a₁)) g(f(a₂)), as required. a₁ f(a₁) g(f(a₁)) a₂ f(a₂) A B C Great Great exercise: exercise: Repeat Repeat this this proof proof using using the the other g(f(a₂)) other definition definition of of injectivity. injectivity.

111 Another Class of Functions

112 Lassen Peak California Mt. Hood Washington Mt. St. Helens Oregon Mt. Shasta

113 Surjective Functions A function f : A B is called surjective (or onto) if this first-order logic statement is true about f: b B. a A. f(a) = b ( For every output, there's an input that produces it ) A function with this property is called a surjection. How does this compare to our first rule of functions?

114 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let x = 2y. Then we see that So f(x) = y, as required. f(x) = f(2y) = 2y / 2 = y.

115 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let x = 2y. Then we see that So f(x) = y, as required. f(x) = f(2y) = 2y / 2 = y.

116 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let What x What = 2y. does does Then it it we mean mean see that for for f to to be be surjective? f(x) = f(2y) = 2y / 2 = y. y So f(x) = y, as required. y R. R. x x R. R. f(x) f(x) = y Therefore, we'll we'll choose choose an an arbitrary arbitrary y R, R, then then prove prove that that there there is is some some x R where where f(x) f(x) = y. y.

117 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let What x What = 2y. does does Then it it we mean mean see that for for f to to be be surjective? f(x) = f(2y) = 2y / 2 = y. y So f(x) = y, as required. y R. R. x x R. R. f(x) f(x) = y Therefore, we'll we'll choose choose an an arbitrary arbitrary y R, R, then then prove prove that that there there is is some some x R where where f(x) f(x) = y. y.

118 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let What x What = 2y. does does Then it it we mean mean see that for for f to to be be surjective? f(x) = f(2y) = 2y / 2 = y. y So f(x) = y, as required. y R. R. x x R. R. f(x) f(x) = y Therefore, we'll we'll choose choose an an arbitrary arbitrary y R, R, then then prove prove that that there there is is some some x R where where f(x) f(x) = y. y.

119 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let What x What = 2y. does does Then it it we mean mean see that for for f to to be be surjective? f(x) = f(2y) = 2y / 2 = y. y So f(x) = y, as required. y R. R. x x R. R. f(x) f(x) = y Therefore, we'll we'll choose choose an an arbitrary arbitrary y R, R, then then prove prove that that there there is is some some x R where where f(x) f(x) = y. y.

120 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let What x What = 2y. does does Then it it we mean mean see that for for f to to be be surjective? f(x) = f(2y) = 2y / 2 = y. y So f(x) = y, as required. y R. R. x x R. R. f(x) f(x) = y Therefore, we'll we'll choose choose an an arbitrary arbitrary y R, R, then then prove prove that that there there is is some some x R where where f(x) f(x) = y. y.

121 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let What x What = 2y. does does Then it it we mean mean see that for for f to to be be surjective? f(x) = f(2y) = 2y / 2 = y. y So f(x) = y, as required. y R. R. x x R. R. f(x) f(x) = y Therefore, we'll we'll choose choose an an arbitrary arbitrary y R, R, then then prove prove that that there there is is some some x R where where f(x) f(x) = y. y.

122 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let x = 2y. Then we see that So f(x) = y, as required. f(x) = f(2y) = 2y / 2 = y.

123 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let x = 2y. Then we see that So f(x) = y, as required. f(x) = f(2y) = 2y / 2 = y.

124 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let x = 2y. Then we see that So f(x) = y, as required. f(x) = f(2y) = 2y / 2 = y.

125 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let x = 2y. Then we see that So f(x) = y, as required. f(x) = f(2y) = 2y / 2 = y.

126 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let x = 2y. Then we see that So f(x) = y, as required. f(x) = f(2y) = 2y / 2 = y.

127 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let x = 2y. Then we see that So f(x) = y, as required. f(x) = f(2y) = 2y / 2 = y.

128 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let x = 2y. Then we see that So f(x) = y, as required. f(x) = f(2y) = 2y / 2 = y.

129 Surjective Functions Theorem: Let f : R R be defined as f(x) = x / 2. Then f(x) is surjective. Proof: Consider any y R. We will prove that there is a choice of x R such that f(x) = y. Let x = 2y. Then we see that So f(x) = y, as required. f(x) = f(2y) = 2y / 2 = y.

130 Composing Surjections

131 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. Consider any c C. Since g : B C is surjective, there is some b B such that g(b) = c. Similarly, since f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that g(f(a)) = g(b) = c, which is what we needed to show.

132 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. Consider any c C. Since g : B C is surjective, there is some b B such that g(b) = c. Similarly, since f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that g(f(a)) = g(b) = c, which is what we needed to show.

133 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. Consider any c C. Since g : B C is surjective, there is some b B such that g(b) = c. Similarly, since f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that g(f(a)) = g(b) = c, which is what we needed to show.

134 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. Consider any c C. Since g : B C is surjective, there is some b B such that g(b) = c. Similarly, since f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that g(f(a)) = g(b) = c, which is what we needed to show.

135 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. What What does does it it mean mean for for g f f : : A C to to be be surjective? surjective? Consider any c C. Since g : B C is surjective, there is some b B such c c that C. C. a a g(b) = A. A. c. (g (g Similarly, f)(a) f)(a) since = c f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that Therefore, Therefore, we'll we'll choose choose arbitrary arbitrary c c C and and prove prove that that there there is is some some a a g(f(a)) A such such = that that g(b) (g (g = c, f)(a) f)(a) = = c. c. which is what we needed to show.

136 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. What What does does it it mean mean for for g f f : : A C to to be be surjective? surjective? Consider any c C. Since g : B C is surjective, there is some b B such c c that C. C. a a g(b) = A. A. c. (g (g Similarly, f)(a) f)(a) since = c f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that Therefore, Therefore, we'll we'll choose choose arbitrary arbitrary c c C and and prove prove that that there there is is some some a a g(f(a)) A such such = that that g(b) (g (g = c, f)(a) f)(a) = = c. c. which is what we needed to show.

137 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. What What does does it it mean mean for for g f f : : A C to to be be surjective? surjective? Consider any c C. Since g : B C is surjective, there is some b B such c c that C. C. a a g(b) = A. A. c. (g (g Similarly, f)(a) f)(a) since = c f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that Therefore, Therefore, we'll we'll choose choose arbitrary arbitrary c c C and and prove prove that that there there is is some some a a g(f(a)) A such such = that that g(b) (g (g = c, f)(a) f)(a) = = c. c. which is what we needed to show.

138 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. Consider any c C. Since g : B C is surjective, there is some b B such that g(b) = c. Similarly, since f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that g(f(a)) = g(b) = c, which is what we needed to show.

139 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. Consider any c C. Since g : B C is surjective, there is some b B such that g(b) = c. Similarly, since f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that g(f(a)) = g(b) = c, which is what we needed to show. c a A B C b

140 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. Consider any c C. Since g : B C is surjective, there is some b B such that g(b) = c. Similarly, since f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that g(f(a)) = g(b) = c, which is what we needed to show. c a A B C b

141 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. Consider any c C. Since g : B C is surjective, there is some b B such that g(b) = c. Similarly, since f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that g(f(a)) = g(b) = c, which is what we needed to show. c a A B C b

142 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. Consider any c C. Since g : B C is surjective, there is some b B such that g(b) = c. Similarly, since f : A B is surjective, there is some a A such that f(a) = b. This means that there is some a A such that g(f(a)) = g(b) = c, which is what we needed to show. c a A B C b

143 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. Consider any c C. Since g : B C is surjective, there is some b B such that g(b) = c. Similarly, since f : A B is surjective, there is some a A such that f(a) = b. Then we see that g(f(a)) = g(b) = c, which is what we needed to show. c a A B C b

144 Theorem: If f : A B is surjective and g : B C is surjective, then g f : A C is also surjective. Proof: Let f : A B and g : B C be arbitrary surjections. We will prove that the function g f : A C is also surjective. To do so, we will prove that for any c C, there is some a A such that (g f)(a) = c. Equivalently, we will prove that for any c C, there is some a A such that g(f(a)) = c. Consider any c C. Since g : B C is surjective, there is some b B such that g(b) = c. Similarly, since f : A B is surjective, there is some a A such that f(a) = b. Then we see that g(f(a)) = g(b) = c, which is what we needed to show. c a A B C b

145 Injections and Surjections An injective function associates at most one element of the domain with each element of the codomain. A surjective function associates at least one element of the domain with each element of the codomain. What about functions that associate exactly one element of the domain with each element of the codomain?

146 Katniss Everdeen Elsa Hermione Granger

147 Bijections A function that associates each element of the codomain with a unique element of the domain is called bijective. Such a function is a bijection. Formally, a bijection is a function that is both injective and surjective. Bijections are sometimes called one-toone correspondences. Not to be confused with one-to-one functions.

148 Bijections and Composition Suppose that f : A B and g : B C are bijections. Is g f necessarily a bijection? Yes! Since both f and g are injective, we know that g f is injective. Since both f and g are surjective, we know that g f is surjective. Therefore, g f is a bijection.

149 Inverse Functions

150 Katniss Everdeen Elsa Hermione Granger

151 Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune

152 Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune

153 Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune

154 Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune

155 Mt. Lassen California Mt. Hood Washington Mt. St. Helens Oregon Mt. Shasta

156 Mt. Lassen California Mt. Hood Washington Mt. St. Helens Oregon Mt. Shasta

Outline for Today. Modeling transformations between sets. Injections, surjections, and bijections.

Outline for Today. Modeling transformations between sets. Injections, surjections, and bijections. Functions Outline for Today Functions Special Classes of Functions Modeling transformations between sets. Injections, surjections, and bijections. Cardinality Revisiting our first lecture with our new

More information

The Pigeonhole Principle & Functions

The Pigeonhole Principle & Functions The Pigeonhole Principle & Functions Outline for Today Special Quantifiers The Pigeonhole Principle Proving results are true just by counting. Functions Quantifying over sets. Modeling transformations

More information

The Pigeonhole Principle & Functions

The Pigeonhole Principle & Functions The Pigeonhole Principle & Functions Outline for Today Special Quantifiers The Pigeonhole Principle Proving results are true just by counting. Functions Quantifying over sets. Modeling transformations

More information

Mathematical Logic Part Three

Mathematical Logic Part Three Mathematical Logic Part Three Recap from Last Time What is First-Order Logic? First-order logic is a logical system for reasoning about properties of objects. Augments the logical connectives from propositional

More information

Relations and Functions

Relations and Functions Relations and Functions Recap from Last Time Reflexivity Some relations always hold from any element to itself. Examples: x = x for any x. A A for any set A. x ₖ x for any x. Relations of this sort are

More information

Mathematical Logic Part Three

Mathematical Logic Part Three Mathematical Logic Part Three Recap from Last Time What is First-Order Logic? First-order logic is a logical system for reasoning about properties of objects. Augments the logical connectives from propositional

More information

Order Relations and Functions

Order Relations and Functions Order Relations and Functions Problem Session Tonight 7:00PM 7:50PM 380-380X Optional, but highly recommended! x is larger than y x is tastier than y x is faster than y x is a subset of y x divides y x

More information

Mathematical Logic Part Three

Mathematical Logic Part Three Mathematical Logic Part Three Recap from Last Time What is First-Order Logic? First-order logic is a logical system for reasoning about properties of objects. Augments the logical connectives from propositional

More information

Outline for Today. What is an Implication? Negations and their Applications. Proof by Contrapositive. Proof by Contradiction

Outline for Today. What is an Implication? Negations and their Applications. Proof by Contrapositive. Proof by Contradiction Indirect Proofs Outline for Today What is an Implication? Understanding a key type of mathematical statement. Negations and their Applications How do you show something is not true? Proof by Contrapositive

More information

Outline for Today. What is an Implication? Negations and their Applications. Proof by Contrapositive. Proof by Contradiction

Outline for Today. What is an Implication? Negations and their Applications. Proof by Contrapositive. Proof by Contradiction Indirect Proofs Outline for Today What is an Implication? Understanding a key type of mathematical statement. Negations and their Applications How do you show something is not true? Proof by Contrapositive

More information

Recap from Last Time

Recap from Last Time Cardinality Recap from Last Time Domains and Codomains Every function f has two sets associated with it: its domain and its codomain. A function f can only be applied to elements of its domain. For any

More information

CS103 Handout 08 Spring 2012 April 20, 2012 Problem Set 3

CS103 Handout 08 Spring 2012 April 20, 2012 Problem Set 3 CS103 Handout 08 Spring 2012 April 20, 2012 Problem Set 3 This third problem set explores graphs, relations, functions, cardinalities, and the pigeonhole principle. This should be a great way to get a

More information

Discrete Structures Proofwriting Checklist

Discrete Structures Proofwriting Checklist CS103 Winter 2019 Discrete Structures Proofwriting Checklist Cynthia Lee Keith Schwarz Now that we re transitioning to writing proofs about discrete structures like binary relations, functions, and graphs,

More information

Outline for Today. Revisiting our first lecture with our new techniques! How do we know when two sets have the same size?

Outline for Today. Revisiting our first lecture with our new techniques! How do we know when two sets have the same size? Cardinality Outline for Today Recap from Last Time Equal Cardinalities How do we know when two sets have the same size? Ranking Cardinalities Revisiting our first lecture with our new techniques! When

More information

CS103 Handout 22 Fall 2012 November 30, 2012 Problem Set 9

CS103 Handout 22 Fall 2012 November 30, 2012 Problem Set 9 CS103 Handout 22 Fall 2012 November 30, 2012 Problem Set 9 In this final problem set of the quarter, you will explore the limits of what can be computed efficiently. What problems do we believe are computationally

More information

Day 15. Tuesday June 12, 2012

Day 15. Tuesday June 12, 2012 Day 15 Tuesday June 12, 2012 1 Properties of Function So far we have talked about different things we can talk about with respect to a function. So far if f : A B we have the following features: A domain:

More information

1 / 9. Due Friday, May 11 th at 2:30PM. There is no checkpoint problem. CS103 Handout 30 Spring 2018 May 4, 2018 Problem Set 5

1 / 9. Due Friday, May 11 th at 2:30PM. There is no checkpoint problem. CS103 Handout 30 Spring 2018 May 4, 2018 Problem Set 5 1 / 9 CS103 Handout 30 Spring 2018 May 4, 2018 Problem Set 5 This problem set the last one purely on discrete mathematics is designed as a cumulative review of the topics we ve covered so far and a proving

More information

Math 300: Final Exam Practice Solutions

Math 300: Final Exam Practice Solutions Math 300: Final Exam Practice Solutions 1 Let A be the set of all real numbers which are zeros of polynomials with integer coefficients: A := {α R there exists p(x) = a n x n + + a 1 x + a 0 with all a

More information

Math 31 Lesson Plan. Day 2: Sets; Binary Operations. Elizabeth Gillaspy. September 23, 2011

Math 31 Lesson Plan. Day 2: Sets; Binary Operations. Elizabeth Gillaspy. September 23, 2011 Math 31 Lesson Plan Day 2: Sets; Binary Operations Elizabeth Gillaspy September 23, 2011 Supplies needed: 30 worksheets. Scratch paper? Sign in sheet Goals for myself: Tell them what you re going to tell

More information

Sets, Functions and Relations

Sets, Functions and Relations Chapter 2 Sets, Functions and Relations A set is any collection of distinct objects. Here is some notation for some special sets of numbers: Z denotes the set of integers (whole numbers), that is, Z =

More information

CS103 Handout 09 Fall 2012 October 19, 2012 Problem Set 4

CS103 Handout 09 Fall 2012 October 19, 2012 Problem Set 4 CS103 Handout 09 Fall 2012 October 19, 2012 Problem Set 4 This fourth problem set explores propositional and first-order logic, along with its applications. Once you've completed it, you should have a

More information

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Inverse Functions

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Inverse Functions Math 300 Introduction to Mathematical Reasoning Autumn 2017 Inverse Functions Please read this pdf in place of Section 6.5 in the text. The text uses the term inverse of a function and the notation f 1

More information

Complexity Theory Part I

Complexity Theory Part I Complexity Theory Part I Outline for Today Recap from Last Time Reviewing Verifiers Nondeterministic Turing Machines What does nondeterminism mean in the context of TMs? And just how powerful are NTMs?

More information

Announcements. Problem Set 1 out. Checkpoint due Monday, September 30. Remaining problems due Friday, October 4.

Announcements. Problem Set 1 out. Checkpoint due Monday, September 30. Remaining problems due Friday, October 4. Indirect Proofs Announcements Problem Set 1 out. Checkpoint due Monday, September 30. Grade determined by attempt rather than accuracy. It's okay to make mistakes we want you to give it your best effort,

More information

Textbook: Explorations: An Introduction to Astronomy, 4 th Edition by: Thomas T. Arny

Textbook: Explorations: An Introduction to Astronomy, 4 th Edition by: Thomas T. Arny Instructor: Brian Harker Office: SER 309 ( 797-2397 ) Email Address: brian.harker@gmail.com Class Hours: TR, 1:30pm 2:45pm in BUS 215 Office Hours: After class or by appointment Textbook: Explorations:

More information

Descriptive Statistics (And a little bit on rounding and significant digits)

Descriptive Statistics (And a little bit on rounding and significant digits) Descriptive Statistics (And a little bit on rounding and significant digits) Now that we know what our data look like, we d like to be able to describe it numerically. In other words, how can we represent

More information

1. Decide for each of the following expressions: Is it a function? If so, f is a function. (i) Domain: R. Codomain: R. Range: R. (iii) Yes surjective.

1. Decide for each of the following expressions: Is it a function? If so, f is a function. (i) Domain: R. Codomain: R. Range: R. (iii) Yes surjective. Homework 2 2/14/2018 SOLUTIONS Exercise 6. 1. Decide for each of the following expressions: Is it a function? If so, (i) what is its domain, codomain, and image? (iii) is it surjective? (ii) is it injective?

More information

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

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant). Sets and Functions 1. The language of sets Informally, a set is any collection of objects. The objects may be mathematical objects such as numbers, functions and even sets, or letters or symbols of any

More information

Binary Relations Part Two

Binary Relations Part Two Binary Relations Part Two Outline for Today Recap from Last Time Where are we, again? A Fundamental Theorem What do equivalence relations do? Strict Orders Representing prerequisites. Hasse Diagrams Drawing

More information

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Outline for Today Recap from Last Time What is NP-completeness again, anyway? 3SAT A simple, canonical NP-complete problem. Independent Sets Discovering a new NP-complete problem.

More information

Guide to Proofs on Sets

Guide to Proofs on Sets CS103 Winter 2019 Guide to Proofs on Sets Cynthia Lee Keith Schwarz I would argue that if you have a single guiding principle for how to mathematically reason about sets, it would be this one: All sets

More information

Featured Alumna Sarah Caudill ( 06)

Featured Alumna Sarah Caudill ( 06) Featured Alumna Sarah Caudill ( 06) As a high school student applying to colleges, I had a choice between Stetson and the University of Florida. I reasoned that I would receive a more personalized education

More information

Note: Please use the actual date you accessed this material in your citation.

Note: Please use the actual date you accessed this material in your citation. MIT OpenCourseWare http://ocw.mit.edu 18.06 Linear Algebra, Spring 2005 Please use the following citation format: Gilbert Strang, 18.06 Linear Algebra, Spring 2005. (Massachusetts Institute of Technology:

More information

Lecture 3: Sizes of Infinity

Lecture 3: Sizes of Infinity Math/CS 20: Intro. to Math Professor: Padraic Bartlett Lecture 3: Sizes of Infinity Week 2 UCSB 204 Sizes of Infinity On one hand, we know that the real numbers contain more elements than the rational

More information

How The Planets Cleaned Up Space

How The Planets Cleaned Up Space How The Planets Cleaned Up Space A Story about the Game Asteroid Written by Amanda Clément Illustrated by Patrick Scherr, Sue Clément, and André Clément A Note to the Parents, Teachers, and Caregivers

More information

Science Trail 2010: By: Megan Bucher & Allison Gallahan. Name:

Science Trail 2010: By: Megan Bucher & Allison Gallahan. Name: Science Trail 2010: By: Megan Bucher & Allison Gallahan Name: Introduction: Welcome to Manchester College! Today we will take a journey through the solar system. We hope you brought your sense of adventure

More information

MITOCW ocw f99-lec30_300k

MITOCW ocw f99-lec30_300k MITOCW ocw-18.06-f99-lec30_300k OK, this is the lecture on linear transformations. Actually, linear algebra courses used to begin with this lecture, so you could say I'm beginning this course again by

More information

Math 31 Lesson Plan. Day 5: Intro to Groups. Elizabeth Gillaspy. September 28, 2011

Math 31 Lesson Plan. Day 5: Intro to Groups. Elizabeth Gillaspy. September 28, 2011 Math 31 Lesson Plan Day 5: Intro to Groups Elizabeth Gillaspy September 28, 2011 Supplies needed: Sign in sheet Goals for students: Students will: Improve the clarity of their proof-writing. Gain confidence

More information

Finite Automata Part One

Finite Automata Part One Finite Automata Part One Computability Theory What problems can we solve with a computer? What problems can we solve with a computer? What kind of computer? Computers are Messy http://www.intel.com/design/intarch/prodbref/27273.htm

More information

The Inductive Proof Template

The Inductive Proof Template CS103 Handout 24 Winter 2016 February 5, 2016 Guide to Inductive Proofs Induction gives a new way to prove results about natural numbers and discrete structures like games, puzzles, and graphs. All of

More information

MITOCW ocw f99-lec09_300k

MITOCW ocw f99-lec09_300k MITOCW ocw-18.06-f99-lec09_300k OK, this is linear algebra lecture nine. And this is a key lecture, this is where we get these ideas of linear independence, when a bunch of vectors are independent -- or

More information

Sequences and Series

Sequences and Series Sequences and Series What do you think of when you read the title of our next unit? In case your answers are leading us off track, let's review the following IB problems. 1 November 2013 HL 2 3 November

More information

Classroom Activities/Lesson Plan

Classroom Activities/Lesson Plan Grade Band: Middle School Unit 18 Unit Target: Earth and Space Science Unit Topic: This Is the Solar System Lesson 3 Instructional Targets Reading Standards for Informational Text Range and Level of Text

More information

CHAPTER 0: BACKGROUND (SPRING 2009 DRAFT)

CHAPTER 0: BACKGROUND (SPRING 2009 DRAFT) CHAPTER 0: BACKGROUND (SPRING 2009 DRAFT) MATH 378, CSUSM. SPRING 2009. AITKEN This chapter reviews some of the background concepts needed for Math 378. This chapter is new to the course (added Spring

More information

How to write maths (well)

How to write maths (well) How to write maths (well) Dr Euan Spence 29 September 2017 These are the slides from a talk I gave to the new first-year students at Bath, annotated with some of the things I said (which appear in boxes

More information

University of Toronto MAT137Y1 Calculus! Test 2 1 December 2017 Time: 110 minutes

University of Toronto MAT137Y1 Calculus! Test 2 1 December 2017 Time: 110 minutes University of Toronto MAT137Y1 Calculus! Test 2 1 December 2017 Time: 110 minutes Please complete this cover page with ALL CAPITAL LETTERS. Last name......................................................................................

More information

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

Notes. Functions. Introduction. Notes. Notes. Definition Function. Definition. Slides by Christopher M. Bourke Instructor: Berthe Y. Functions Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Fall 2007 Computer Science & Engineering 235 Introduction to Discrete Mathematics Section 2.3 of Rosen cse235@cse.unl.edu Introduction

More information

MATH 341, Section 001 FALL 2014 Introduction to the Language and Practice of Mathematics

MATH 341, Section 001 FALL 2014 Introduction to the Language and Practice of Mathematics MATH 341, Section 001 FALL 2014 Introduction to the Language and Practice of Mathematics Class Meetings: MW 9:30-10:45 am in EMS E424A, September 3 to December 10 [Thanksgiving break November 26 30; final

More information

VOYAGE OF DISCOVERY TEACHER PAGE

VOYAGE OF DISCOVERY TEACHER PAGE Background This activity has two parts. The activity has two parts. Part I looks at the sizes of the planets and takes place in the classroom. Students predict the size of Earth and Jupiter and find foods

More information

Selected problems from past exams

Selected problems from past exams Discrete Structures CS2800 Prelim 1 s Selected problems from past exams 1. True/false. For each of the following statements, indicate whether the statement is true or false. Give a one or two sentence

More information

Section 4.4 Functions. CS 130 Discrete Structures

Section 4.4 Functions. CS 130 Discrete Structures Section 4.4 Functions CS 130 Discrete Structures Function Definitions Let S and T be sets. A function f from S to T, f: S T, is a subset of S x T where each member of S appears exactly once as the first

More information

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

MATH 22 FUNCTIONS: COMPOSITION & INVERSES. Lecture N: 10/16/2003. Mad world! mad kings! mad composition! Shakespeare, King John, II:1 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

More information

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

Today s Topics. Methods of proof Relationships to logical equivalences. Important definitions Relationships to sets, relations Special functions Today s Topics Set identities Methods of proof Relationships to logical equivalences Functions Important definitions Relationships to sets, relations Special functions Set identities help us manipulate

More information

Calculus of One Real Variable Prof. Joydeep Dutta Department of Economic Sciences Indian Institute of Technology, Kanpur

Calculus of One Real Variable Prof. Joydeep Dutta Department of Economic Sciences Indian Institute of Technology, Kanpur Calculus of One Real Variable Prof. Joydeep Dutta Department of Economic Sciences Indian Institute of Technology, Kanpur Lecture 08 Intermediate Value Theorem Welcome once again; as we continue moving

More information

Does it matter what you call an object? Does the public care so much? Were scientists made fun of, but not HP Computer Company?

Does it matter what you call an object? Does the public care so much? Were scientists made fun of, but not HP Computer Company? Is there anything wrong with this picture? 1 What is a planet? Why? Does it matter what you call an object? Does the public care so much? Were scientists made fun of, but not HP Computer Company? How?

More information

A Note on Turing Machine Design

A Note on Turing Machine Design CS103 Handout 17 Fall 2013 November 11, 2013 Problem Set 7 This problem explores Turing machines, nondeterministic computation, properties of the RE and R languages, and the limits of RE and R languages.

More information

Finite Automata Part One

Finite Automata Part One Finite Automata Part One Computability Theory What problems can we solve with a computer? What kind of computer? Computers are Messy http://www.intel.com/design/intarch/prodbref/27273.htm We need a simpler

More information

Geological Foundations of Environmental Sciences

Geological Foundations of Environmental Sciences Geological Foundations of Environmental Sciences David C. Elbert Office: Olin Hall 228 Department of Earth and Planetary Sciences Johns Hopkins University 3400 N. Charles St. Baltimore, MD 21218 Phone:

More information

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

MATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017 MATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017 Definition: A set A is finite if there exists a nonnegative integer c such that there exists a bijection from A

More information

NP-Completeness Part One

NP-Completeness Part One NP-Completeness Part One Recap from Last Time The Limits of Efficient Computation P NP R P and NP Refresher The class P consists of all problems decidable in polynomial time. The class NP consists of all

More information

FOUNDATIONS OF ALGEBRAIC GEOMETRY CLASS 2

FOUNDATIONS OF ALGEBRAIC GEOMETRY CLASS 2 FOUNDATIONS OF ALGEBRAIC GEOMETRY CLASS 2 RAVI VAKIL CONTENTS 1. Where we were 1 2. Yoneda s lemma 2 3. Limits and colimits 6 4. Adjoints 8 First, some bureaucratic details. We will move to 380-F for Monday

More information

Checkpoint Questions Due Monday, October 1 at 2:15 PM Remaining Questions Due Friday, October 5 at 2:15 PM

Checkpoint Questions Due Monday, October 1 at 2:15 PM Remaining Questions Due Friday, October 5 at 2:15 PM CS103 Handout 03 Fall 2012 September 28, 2012 Problem Set 1 This first problem set is designed to help you gain a familiarity with set theory and basic proof techniques. By the time you're done, you should

More information

Lecture 4: Constructing the Integers, Rationals and Reals

Lecture 4: Constructing the Integers, Rationals and Reals Math/CS 20: Intro. to Math Professor: Padraic Bartlett Lecture 4: Constructing the Integers, Rationals and Reals Week 5 UCSB 204 The Integers Normally, using the natural numbers, you can easily define

More information

Readings and Exercises

Readings and Exercises Nebraska Wesleyan University Math 4800: Research Experience Section 1 Spring 02016 Readings and Exercises Tuesday, January 19 Section 1 Exercise 1 Section 2 Exercise 1, 4ce Thursday, January 21 Section

More information

Announcements Monday, November 13

Announcements Monday, November 13 Announcements Monday, November 13 The third midterm is on this Friday, November 17. The exam covers 3.1, 3.2, 5.1, 5.2, 5.3, and 5.5. About half the problems will be conceptual, and the other half computational.

More information

Practice Second Midterm Exam III

Practice Second Midterm Exam III CS103 Handout 35 Fall 2018 November 2, 2018 Practice Second Midterm Exam III This exam is closed-book and closed-computer. You may have a double-sided, 8.5 11 sheet of notes with you when you take this

More information

MITOCW watch?v=ed_xr1bzuqs

MITOCW watch?v=ed_xr1bzuqs MITOCW watch?v=ed_xr1bzuqs The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

Math (P)Review Part I:

Math (P)Review Part I: Lecture 1: Math (P)Review Part I: Linear Algebra Computer Graphics CMU 15-462/15-662, Fall 2017 Homework 0.0 (Due Monday!) Exercises will be a bit harder / more rigorous than what you will do for the rest

More information

Math Topic: Unit Conversions and Statistical Analysis of Data with Categorical and Quantitative Graphs

Math Topic: Unit Conversions and Statistical Analysis of Data with Categorical and Quantitative Graphs Math Topic: Unit Conversions and Statistical Analysis of Data with Categorical and Quantitative Graphs Science Topic: s/dwarf s of our Solar System Written by: Eric Vignaud and Lexie Edwards Lesson Objectives

More information

The key is that there are two disjoint populations, and everyone in the market is on either one side or the other

The key is that there are two disjoint populations, and everyone in the market is on either one side or the other Econ 805 Advanced Micro Theory I Dan Quint Fall 2009 Lecture 17 So... two-sided matching markets. First off, sources. I ve updated the syllabus for the next few lectures. As always, most of the papers

More information

Talk Science Professional Development

Talk Science Professional Development Talk Science Professional Development Transcript for Grade 5 Scientist Case: The Water to Ice Investigations 1. The Water to Ice Investigations Through the Eyes of a Scientist We met Dr. Hugh Gallagher

More information

Lecture 10: Everything Else

Lecture 10: Everything Else Math 94 Professor: Padraic Bartlett Lecture 10: Everything Else Week 10 UCSB 2015 This is the tenth week of the Mathematics Subject Test GRE prep course; here, we quickly review a handful of useful concepts

More information

Instructor (Brad Osgood)

Instructor (Brad Osgood) TheFourierTransformAndItsApplications-Lecture26 Instructor (Brad Osgood): Relax, but no, no, no, the TV is on. It's time to hit the road. Time to rock and roll. We're going to now turn to our last topic

More information

Mathematical Logic Part Three

Mathematical Logic Part Three Mathematical Logic Part Three The Aristotelian Forms All As are Bs x. (A(x B(x Some As are Bs x. (A(x B(x No As are Bs x. (A(x B(x Some As aren t Bs x. (A(x B(x It It is is worth worth committing committing

More information

Mathematical Induction Part Two

Mathematical Induction Part Two Mathematical Induction Part Two Recap from Last Time Let P be some predicate. The principle of mathematical induction states that if If it starts true and it stays P(0) is true true and k ℕ. (P(k) P(k+1))

More information

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness Lecture 19 NP-Completeness I 19.1 Overview In the past few lectures we have looked at increasingly more expressive problems that we were able to solve using efficient algorithms. In this lecture we introduce

More information

Our Fun Sun. Source: Measuring the Diameter of the Sun, The Educator s Reference Desk Enchanted Learning

Our Fun Sun. Source: Measuring the Diameter of the Sun, The Educator s Reference Desk Enchanted Learning Our Fun Sun Subject: Science, Math Grades: 7 th 8 th Rational or Purpose: Students will develop an easy tool in which they are able to look at the sun and find out what its diameter is by a simple arithmetic

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 1 Course Web Page www3.cs.stonybrook.edu/ cse303 The webpage contains: lectures notes slides; very detailed solutions to

More information

Announcements. Final exam review session tomorrow in Gates 104 from 2:15PM 4:15PM Final Friday Four Square of the quarter!

Announcements. Final exam review session tomorrow in Gates 104 from 2:15PM 4:15PM Final Friday Four Square of the quarter! The Big Picture Problem Problem Set Set 99 due due in in the the box box up up front. front. Congrats Congrats on on finishing finishing the the last last problem problem set set of of the the quarter!

More information

What is Crater Number Density?

What is Crater Number Density? Ronald Wilhelm & Jennifer Wilhelm, University of Kentucky 2008 What is Crater Number Density? REAL Curriculum Crater Number Density Today we will learn some math that is necessary in order to learn important

More information

Guide to Proofs on Discrete Structures

Guide to Proofs on Discrete Structures CS103 Handout 17 Spring 2018 Guide to Proofs on Discrete Structures In Problem Set One, you got practice with the art of proofwriting in general (as applied to numbers, sets, puzzles, etc.) Problem Set

More information

ASTRO 114 Lecture Okay. What we re going to discuss today are what we call radiation laws. We ve

ASTRO 114 Lecture Okay. What we re going to discuss today are what we call radiation laws. We ve ASTRO 114 Lecture 15 1 Okay. What we re going to discuss today are what we call radiation laws. We ve been spending a lot of time talking about laws. We ve talked about gravitational laws, we ve talked

More information

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality Math 336-Modern Algebra Lecture 08 9/26/4. Cardinality I started talking about cardinality last time, and you did some stuff with it in the Homework, so let s continue. I said that two sets have the same

More information

CSC236 Week 3. Larry Zhang

CSC236 Week 3. Larry Zhang CSC236 Week 3 Larry Zhang 1 Announcements Problem Set 1 due this Friday Make sure to read Submission Instructions on the course web page. Search for Teammates on Piazza Educational memes: http://www.cs.toronto.edu/~ylzhang/csc236/memes.html

More information

Talk Science Professional Development

Talk Science Professional Development Talk Science Professional Development Transcript for Grade 4 Scientist Case: The Heavy for Size Investigations 1. The Heavy for Size Investigations, Through the Eyes of a Scientist We met Associate Professor

More information

4.1 Real-valued functions of a real variable

4.1 Real-valued functions of a real variable Chapter 4 Functions When introducing relations from a set A to a set B we drew an analogy with co-ordinates in the x-y plane. Instead of coming from R, the first component of an ordered pair comes from

More information

Sets and Functions. MATH 464/506, Real Analysis. J. Robert Buchanan. Summer Department of Mathematics. J. Robert Buchanan Sets and Functions

Sets and Functions. MATH 464/506, Real Analysis. J. Robert Buchanan. Summer Department of Mathematics. J. Robert Buchanan Sets and Functions Sets and Functions MATH 464/506, Real Analysis J. Robert Buchanan Department of Mathematics Summer 2007 Notation x A means that element x is a member of set A. x / A means that x is not a member of A.

More information

ASTRO 114 Lecture Okay. We re now gonna continue discussing and conclude discussing the entire

ASTRO 114 Lecture Okay. We re now gonna continue discussing and conclude discussing the entire ASTRO 114 Lecture 55 1 Okay. We re now gonna continue discussing and conclude discussing the entire universe. So today we re gonna learn about everything, everything that we know of. There s still a lot

More information

MITOCW ocw f99-lec05_300k

MITOCW ocw f99-lec05_300k MITOCW ocw-18.06-f99-lec05_300k This is lecture five in linear algebra. And, it will complete this chapter of the book. So the last section of this chapter is two point seven that talks about permutations,

More information

Just How Big Is Our Solar System?

Just How Big Is Our Solar System? Joseph Murray November 8-9, 2012 Just How Big Is Our Solar System? Purpose: Use a 5-E Learning Model to have students investigate the relative sizes and distances between our planets. The 5-E Learning

More information

Math Fundamentals for Statistics I (Math 52) Unit 7: Connections (Graphs, Equations and Inequalities)

Math Fundamentals for Statistics I (Math 52) Unit 7: Connections (Graphs, Equations and Inequalities) Math Fundamentals for Statistics I (Math 52) Unit 7: Connections (Graphs, Equations and Inequalities) By Scott Fallstrom and Brent Pickett The How and Whys Guys This work is licensed under a Creative Commons

More information

Nonregular Languages

Nonregular Languages Nonregular Languages Recap from Last Time Theorem: The following are all equivalent: L is a regular language. There is a DFA D such that L( D) = L. There is an NFA N such that L( N) = L. There is a regular

More information

Connectedness. Proposition 2.2. The following are equivalent for a topological space (X, T ).

Connectedness. Proposition 2.2. The following are equivalent for a topological space (X, T ). Connectedness 1 Motivation Connectedness is the sort of topological property that students love. Its definition is intuitive and easy to understand, and it is a powerful tool in proofs of well-known results.

More information

Habitable Planets. Version: December 2004 Alan Gould. Grades 5-8. Great Explorations in Math and Science

Habitable Planets. Version: December 2004 Alan Gould. Grades 5-8. Great Explorations in Math and Science Habitable Planets Trial edition of a Great Explorations in Math and Science (GEMS) activity developed with the NASA Kepler Mission Education and Public Outreach. Version: December 2004 Alan Gould Grades

More information

PROFESSOR: WELCOME BACK TO THE LAST LECTURE OF THE SEMESTER. PLANNING TO DO TODAY WAS FINISH THE BOOK. FINISH SECTION 6.5

PROFESSOR: WELCOME BACK TO THE LAST LECTURE OF THE SEMESTER. PLANNING TO DO TODAY WAS FINISH THE BOOK. FINISH SECTION 6.5 1 MATH 16A LECTURE. DECEMBER 9, 2008. PROFESSOR: WELCOME BACK TO THE LAST LECTURE OF THE SEMESTER. I HOPE YOU ALL WILL MISS IT AS MUCH AS I DO. SO WHAT I WAS PLANNING TO DO TODAY WAS FINISH THE BOOK. FINISH

More information

Cartesian Products and Relations

Cartesian Products and Relations Cartesian Products and Relations Definition (Cartesian product) If A and B are sets, the Cartesian product of A and B is the set A B = {(a, b) : (a A) and (b B)}. The following points are worth special

More information

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Please evaluate this course on Axess. Your comments really do make a difference. Announcements Problem Set 8 due tomorrow at 12:50PM sharp with one late day. Problem Set 9 out,

More information

Announcements Monday, November 13

Announcements Monday, November 13 Announcements Monday, November 13 The third midterm is on this Friday, November 17 The exam covers 31, 32, 51, 52, 53, and 55 About half the problems will be conceptual, and the other half computational

More information

Congratulations you're done with CS103 problem sets! Please evaluate this course on Axess!

Congratulations you're done with CS103 problem sets! Please evaluate this course on Axess! The Big Picture Announcements Problem Set 9 due right now. We'll release solutions right after lecture. Congratulations you're done with CS103 problem sets! Please evaluate this course on Axess! Your feedback

More information

Course Staff. Textbook

Course Staff. Textbook Course Staff CS311H: Discrete Mathematics Intro and Propositional Logic Instructor: Işıl Dillig Instructor: Prof. Işıl Dillig TAs: Jacob Van Geffen, Varun Adiga, Akshay Gupta Class meets every Monday,

More information