# Show that a multivariate function is bijective

1. Dec 3, 2016

### Mr Davis 97

1. The problem statement, all variables and given/known data
Show that $f: \mathbb{Z}^{+} \times \mathbb{Z}^{+} \longrightarrow \mathbb{Z}^{+}$where $\displaystyle f(m,n) = \frac{(m+n-2)(m+n-1)}{2}+m$ is bijective

2. Relevant equations

3. The attempt at a solution
First, we show that $f(a,b) = f(c,d) \implies a=c \land b=d$.

$f(a,b) = f(c,d)$

$\displaystyle \frac{(a+b-2)(a+b-1)}{2}+a = \frac{(c+d-2)(c+d-1)}{2}+c$

After simplification, we find that

$(a+b)^2 + a - b = (c+d)^2 + c - d$

Comparing sides, then $a + b = c+d, ~a-b = c-d$
Then $a=c,~b=d$

Second, we show that for all positive integers a, there exist an m and an n such that f(m,n) = a.
We see that $f(m,2-m) = m$, so the function maps to every element in the codomain

Does this show that the function is bijective?

Last edited: Dec 3, 2016
2. Dec 4, 2016

### Delta²

For the second part 2-m might not necessarily be a positive integer which seems to be a problem since the function is defined for pairs of positive integers.

For first part this conclusion
doesn't necessarily follow from the previous line. It might be correct but needs some additional justification me thinks.