Hello everyone. In this video, we're going to show an example of an injective and surjective function.
Let
$$S=\mathbb{R}\backslash\{-1\}=\mathbb{R}-\{-1\} \quad\text{and}\quad T=\mathbb{R}\backslash\{2\}=\mathbb{R}-\{2\}$$So sometimes you might see this written with the set difference notation with the $-$. Usually you'll see it as the slash notation, kind of read this as $\mathbb{R}$ without $-1$. That's how you can think about it.
Show that the function $f:S\to T$ defined by
$$f(x)=\frac{2x+1}{x+1}$$is injective and surjective (hence bijective or a bijection).
So the definition of bijective or bijection is a function that's injective and surjective, for us.
How do we solve this? Well we need to show that it's injective and surjective, so there's two parts of this.
So let's show that the function is injective first. Well what does that mean? So a function is injective provided that if I have two points that give me the same output, then the original two points must be equal.
So let's pick two points in our domain, so let $x,y \in S$ be such that $f(x)=f(y)$, and then we have the following.
$$\begin{align*} \frac{2x+1}{x+1}&=\frac{2y+1}{y+1}\\ (2x+1)(y+1)&=(2y+1)(x+1)\\ 2xy+2x+y+1&=2xy+2y+x+1\\ x&=y \end{align*}$$By the way as a little sanity check, notice that $S$ is defined without the point $-1$ because this function doesn't make sense at $-1$. So something to keep in mind.
So that solves this. That solves this part.
But now we need to show surjectivity. So how do we show surjectivity? Well we need to show that every point inside the range, so every point inside $T$, is reachable. So there's some point in $S$ that will, when I apply the function to it, give me the $y\in T$.
So how do I find this $x$ that's going to give me the output of $y$? Well this is where something called a napkin computation comes into play. I call these napkin computations. Why do I call them napkin computations? Because they’re something you should write on a napkin and then throw out when you're done.
Now obviously it's going to be very difficult for me to use a napkin on a screencast, but I will do the following. I will sort of write it below, okay, but because of that I’m not going to be very precise, right, because it's supposed to be on a napkin. This isn't something that you want somebody to see.
So what I'm going to do is I'm going to take the function and set it equal to $y$, and I'm going to start solving for $x$. Some of you might recognize this as finding the inverse function and that's definitely what we're doing, but I'm going to word it a little differently and I'm going to think of it a little differently.
$$\begin{align*} \frac{2x+1}{x+1}&=y\\ 2x+1&=xy+y\\ 2x-xy&=y-1\\ x&=\frac{y-1}{2-y} \end{align*}$$So there we have it, so this x value should be the one that we use in order to get the output $y$, okay, so if I plug this $x$ into $f$, into our function, I'm going to get the answer $y$. So that's what I'm going to use.
Okay great, so how do I do this? Well okay, so now when I write up this proof, I'm going to start with this value of $x$, and I'm going to show that we get to the answer.
Let $x=\displaystyle\frac{y-1}{2-y}$. Now there's one more thing that we should mention though, right? So we've written down this value, but we need to make sure that $x$ is actually in our domain.
Now notice that this value is real, right, because $y\neq 2$. Remember $y\in T$, $T$ doesn't have the point $2$, so $x$ is a real number.
So x is a real number, and furthermore notice that $x \neq -1$ Why is that the case? Why is $x\neq -1$? Well we prove this by contradiction. So $x\neq -1$ for otherwise:
$$\begin{align*} -1&=\frac{y-1}{2-y}\\ y-2&=y-1\\ -2&=-1 \end{align*}$$which is a contradiction
I’m pretty sure we can all agree that $-2\neq -1$. So that's clearly a contradiction, right? So notice that this was a proof by contradiction, but worded a little subtlety, so keep that in mind.
Remember the “for otherwise” part is sort of suggesting that we're using a proof by contradiction, right, and that's what's going on here. So for otherwise I put $-1$ in there, I've solved and I show that $-2=-1$.
So thus $x$ is actually in the domain. So $f(x)$ is the given function, let's take our $x$ value and plug that in.
$$\begin{align*} f(x)&=\frac{2x+1}{x+1}\\ &=\frac{2(\frac{y-1}{2-y})+1}{\frac{y-1}{2-y}+1}\\ &=\frac{\frac{2y-2+2-y}{2-y}}{\frac{y-1+2-y}{2-y}}\\ &=\frac{\frac{y}{2-y}}{\frac{1}{2-y}}\\ &=y \end{align*}$$Okay, and that shows surjectivity. So we found a point in $S$ that maps to $y$. Now notice that the $x$ depended on $y$, which it almost always should. In here it does and that's fine.
Notice that, again, our napkin computation well we used it to find out what the value of $x$ should be, we never mentioned it in our solution, which is fine. You can also write this back and forth if you want, but I'm not going to get into that in this video, and again, here we've shown injectivity and surjectivity.
So we started with the injectivity part and then we showed surjectivity, and that shows that this function is a bijection.
For those of you interested in learning more about these types of examples, I would check out Mobius transformations. This is some subset of them, and they're pretty interesting. They have a lot of applications, which I'm not going to get into in this video, but I will leave it to you to check this out.
Okay so hopefully you got a little sense of how bijectivity works and hopefully this video helps, so thank you very much for listening.