# Consider a function f:Y_n→X_n^2 For any (a,b) in Y_n, let f((a,b))=f(a,b)=an+b.

Consider a function $f:{Y}_{n}\to {X}_{{n}^{2}}$
For any $\left(a,b\right)\in {Y}_{n}$, let $f\left(\left(a,b\right)\right)=f\left(a,b\right)=an+b.$ Prove that $f$ is a bijection and find its inverse ${f}^{-1}$.
How to find an inverse of this multivariable function. I was already able to prove that $f\left(a,b\right)=an+b$ is a bijection, but not certain how to find its specific inverse. It would be important to note that ${Y}_{n}={X}_{n}×{X}_{n}$ where ${X}_{n}=\left\{0,1,2,...,n-1\right\}$.
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Ronan Rollins
injectivity: Let $f\left({a}_{1},{b}_{1}\right)=f\left({a}_{2},{b}_{2}\right)$.
Then $\left({a}_{1}-{a}_{2}\right)n={b}_{1}-{b}_{2}$.
If ${a}_{1}\ne {a}_{2}$, $|LHS|>n>|RHS|$, which is absurd. Therefore, $LHS=RHS=0$.
surjectivity: Let $c\in {X}_{{n}^{2}}$. By Division Algorithm (𝑛 is the divisor), there exists unique quotient $a\in \mathbb{N}\cup \left\{0\right\}$ and remainder $b\in {X}_{n}$ such that $c=an+b$.
Check that $a\in {X}_{n}$. It's obvious that $a\ge 0$. If $a\ge n$, $c\ge an\ge {n}^{2}$, so $c\notin {X}_{{n}^{2}}$, which is absurd.