Homework 3 and 4 Comments Proofs with functions

advertisement
Homework 3 and 4 Comments
Proofs with functions
! Prove the following two theorems:
Theorem. If A
Theorem. If A
f
f
! B and B
! B and B
g
g
! C are injective functions, then A
! C are surjective functions, then A
g◦f
g◦f
! C is injective.
! C is surjective.
Hint: use direct proofs and the definitions of injective and surjective functions in terms of elements:
Definition. A function A
A function A
f
f
! B is injective if for any elements a, a" ∈ A, if f (a) = f (a" ) then a = a" .
! B is surjective if for each b ∈ B there is some a ∈ A such that f (a) = b.
Solution
A good way to start is to draw little diagrams of dots mapping to dots, and to think about the definitions
of injectivity and surjectivity in that context. Both proofs are very simple if you know how to apply the
definitions of injectivity and surjectivity. Injectivity was especially confusing to many of you, so here’s
another equivalent definition (the contrapositive of the above definition!):
Definition. A function A
f
! B is injective if for any elements a, a" ∈ A, if a "= a" then f (a) "= f (a" ).
Here are the proofs:
Proof #1 of the first theorem. (Using the original definition of injective function.) Let a, a" ∈ A be arbitrary
such that (g ◦ f )(a) = (g ◦ f )(a" ). This means g(f (a)) = g(f (a" )), so f (a) = f (a" ) by the injectivity of g.
But then a = a" by the injectivity of f , so g ◦ f is injective.
Proof #2 of the first theorem. (Using the equivalent definition of injective function.) Let a, a" ∈ A be arbitrary such that a "= a" . Then f (a) "= f (a" ) by the injectivity of f , so g(f (a)) "= g(f (a" )) by the injectivity of
g. But this means (g ◦ f )(a) "= (g ◦ f )(a" ), so g ◦ f is injective.
Proof of the second theorem. Let c ∈ C be arbitrary. Since g is surjective, there is some b ∈ B such that
g(b) = c. Since f is surjective, there is some a ∈ A such that f (a) = b. Thus (g ◦ f )(a) = g(f (a)) = g(b) = c,
so g ◦ f is surjective.
Your proofs shouldn’t be much longer than these! There is no need to introduce more variables than I
have introduced, and you shouldn’t state definitions in your proof – just use them!
1
Section 2.3 Exercise #22
! Determine whether each of these functions is a bijection from R to R.
(a) f (x) = 3x + 4
(b) f (x) = −3x2 + 7
(c) f (x) = (x + 1)/(x + 2)
(d) f (x) = x5 + 1
Solution
A good way to start is to look at a graph of each function. If it satisfies the horizontal line test, then it is
injective, and if every horizontal line intersects the graph, then it is surjective. If the function fails to be
injective, or if it fails to be surjective, then it cannot be bijective. But a graph is not in general a good way
to prove that a function is bijective, because complicated functions may be hard to analyze (e.g. they may
have very small wiggles or surprising behavior for large values of the domain). So the graph is best used
only as a guide, showing you what you should be trying to prove!
(a) The graph of f is a line, which looks bijective, so let’s prove it is! To show f is injective, suppose
f (x) = f (x" ) for x, x" ∈ R. This means 3x + 4 = 3x" + 4, which implies x = x" , so f is injective. (Here
the original definition of injective function is very easy to check!) To show f is surjective, suppose y ∈ R.
We want to find x ∈ R such that f (x) = y, namely we need 3x + 4 = y. Solving for x, we see that
g
! R given by g(y) = y−4
x = y−4
3 is such an x. We could also do this exercise by showing that R
3
is an inverse of f . The rule for g makes sense for all y ∈ R, so g is a function. We now check the
compositions:
(g ◦ f )(x) = g(f (x)) = g(3x + 4) =
(3x + 4) − 4
= x,
3
so g ◦ f = idR ;
!y − 4"
y−4
=3·
+ 4 = y,
so f ◦ g = idR .
3
3
So we have proved that g is an inverse of f . Since f has an inverse, it must be bijective.
(f ◦ g)(y) = f (g(y)) = f
(b) The graph of f is a parabola, which looks neither injective (it is symmetric about the x-axis) nor
surjective (it has a maximum value of 7). Since −3x2 ≤ 0 for all x, f (x) ≤ 7 for all x. Thus f is not
surjective (it does not map to any real number > 7), so it is not bijective. In fact, f is also not injective.
To prove this, it is enough to give two distinct values of R that map to the same element, and this is
quite easy: f (1) = f (−1).
(c) f is not a function from R to R because it is not defined at −2! So f certainly cannot be a bijective
function.
(d) From the graph, f appears to be bijective. Let’s prove f is bijective by finding the inverse g. Let y ∈ R
and suppose f (x) = y, namely y = x5 + 1. Then if g is the inverse, it should map y to x, namely
g(y) = x. So what should the rule of g be? To see this, solve y = x5 + 1 for x, to get x = (y − 1)1/5 . So
g
! R be given by g(y) = (y − 1)1/5 , which makes sense for all y ∈ R, hence g is a function. I’ll
let R
leave it to you to check the compositions.
2
Section 4.3 #39 and #40
In case you’re still confused about how the Euclidean algorithm and substitutions work, here is an example:
! Use the Euclidean algorithm to compute gcd(35, 78). Then use the substitution method to express
gcd(35, 78) as a linear combination of 35 and 78.
First, we run the Euclidean algorithm:
78 = 2 · 35 + 8
(1)
8=2·3+2
3=1·2+1
(3)
(4)
35 = 4 · 8 + 3
(2)
2 = 2 · 1 + 0.
(5)
The algorithm stops when you get 0 as a remainder. The gcd is the last nonzero remainder, namely
gcd(35, 78) = 1. To express 1 as a linear combination of 35 and 78, we start with (4), which expresses
1 as a linear combination of 3 and 2 (after subtracting 1 · 2 = 2 from both sides). By (3), we can express 2
as a linear combination of 3 and 8, and substituting this expression into our expression for 1 yields 1 as a
linear combination of 3 and 8. Next we replace the 3 by a linear combination of 35 and 8 (using (2)), which
gives us 1 as a linear combination of 8 and 35. And finally, (1) allows us to replace 8 by a linear combination
of 78 and 35, which gives the desired result. Here are the computations:
1=3−2
by (4)
= 3 − (8 − 2 · 3)
by (3)
= 3 · (35 − 4 · 8) − 8
by (2)
= 3 · 35 − 13 · (78 − 2 · 35)
by (1)
=3·3−8
combining like terms
= 3 · 35 − 13 · 8
combining like terms
= 29 · 35 − 13 · 78
combining like terms.
At this point, check that 1 = 29 · 35 − 13 · 78. If your final linear combination does not yield the gcd, then
you have made a mistake!
Note also that since gcd(35, 78) = 1, you have just computed that 29 is a multiplicative inverse of 35
modulo 78, and that −13 is a multiplicative inverse of 78 modulo 35. Namely, 29 · 35 ≡ 1 (mod 78) and
−13 · 78 ≡ 1 (mod 35). So you can use these results to solve linear congruences of the form 35x + b ≡ 0
(mod 78) or 78x + b ≡ 0 (mod 35).
3
Download