<s>[INST] Bijection, and finding the inverse function I am new to discrete mathematics, and this was one of the question that the prof gave out. I am bit lost in this, since I never encountered discrete mathematics before. What do I need to do to prove that it is bijection, and find the inverse? Do I choose any number(integer) and put it in for the R and see if the corresponding question is bijection(both one-to-one and onto)?
Show that the function $f: \Bbb R \setminus \{-1\} \to \Bbb R \setminus \{2\}$ defined by
$$  
f(x) = \frac{4x + 3}{2x + 2}
$$
is a bijection, and find the inverse function.
(Hint: Pay attention to the domain and codomain.)
 [/INST] A function is bijective if it is injective (one-to-one) and surjective (onto).  
You can show $f$ is injective by showing that $f(x_1) = f(x_2) \Rightarrow x_1 = x_2$.  
You can show $f$ is surjective by showing that for each $y \in \mathbb{R} - \{2\}$, there exists $x \in \mathbb{R} - \{-1\}$ such that $f(x) = y$.  
If $f(x_1) = f(x_2)$, then
\begin{align*}
\frac{4x_1 + 3}{2x_1 + 2} & = \frac{4x_2 + 3}{2x_2 + 3}\\
(4x_1 + 3)(2x_2 + 2) & = (2x_1 + 2)(4x_2 + 3)\\
8x_1x_2 + 8x_1 + 6x_2 + 6 & = 8x_1x_2 + 6x_1 + 8x_2 + 6\\
8x_1 + 6x_2 & = 6x_1 + 8x_2\\
2x_1 & = 2x_2\\
x_1 & = x_2
\end{align*}
Thus, $f$ is injective.
Let $y \in \mathbb{R} - \{2\}$.  We must show that there exists $x \in \mathbb{R} - \{-1\}$ such that $y = f(x)$.  Suppose 
$$y = \frac{4x + 3}{2x + 2}$$
Solving for $x$ yields 
\begin{align*}
(2x + 2)y & = 4x + 3\\
2xy + 2y & = 4x + 3\\
2xy - 4x & = 3 - 2y\\
(2y - 4)x & = 3 - 2y\\
x & = \frac{3 - 2y}{2y - 4}
\end{align*}
which is defined for each $y \in \mathbb{R} - \{2\}$.  Moreover, $x \in \mathbb{R} - \{-1\}$.  To see this, suppose that 
$$-1 = \frac{3 - 2y}{2y - 4}$$
Then 
\begin{align*}
-2y + 4 & = 3 - 2y\\
4 & = 3
\end{align*}
which is a contradiction.  
The inverse function is found by interchanging the roles of $x$ and $y$. Hence, the inverse is 
$$y = \frac{3 - 2x}{2x - 4}$$
To verify the function 
$$g(x) = \frac{3 - 2x}{2x - 4}$$
is the inverse, you must demonstrate that 
\begin{align*}
(g \circ f)(x) & = x && \text{for each $x \in \mathbb{R} - \{-1\}$}\\
(f \circ g)(x) & = x && \text{for each $x \in \mathbb{R} - \{2\}$}
\end{align*}
\begin{align*}
(g \circ f)(x) & = g\left(\frac{4x + 3}{2x + 2}\right)\\
               & = \frac{3 - 2\left(\dfrac{4x + 3}{2x + 2}\right)}{2\left(\dfrac{4x + 3}{2x + 2}\right) - 4}\\
               & = \frac{3(2x + 2) - 2(4x + 3)}{2(4x + 3) - 4(2x + 2)}\\
               & = \frac{6x + 6 - 8x - 6}{8x + 6 - 8x - 8}\\
               & = \frac{-2x}{-2}\\
               & = x\\
(f \circ g)(x) & = f\left(\frac{3 - 2x}{2x - 4}\right)\\
               & = \frac{4\left(\dfrac{3 - 2x}{2x - 4}\right) + 3}{2\left(\dfrac{3 - 2x}{2x - 4}\right) + 2}\\
               & = \frac{4(3 - 2x) + 3(2x - 4)}{2(3 - 2x) + 2(2x - 4)}\\
               & = \frac{12 - 8x + 6x - 12}{6 - 4x + 4x - 8}\\
               & = \frac{-2x}{-2}\\
               & = x
\end{align*}
Hence, $g = f^{-1}$, as claimed.
</s>