I'm a bit confused about the right way to prove that some inverse function exists.
A both surjective and injective function is described as below:
$g\langle x, y\rangle=\langle2x+3y,3x+5y\rangle$ while $g:\mathbb{Z}×\mathbb{Z}\to\mathbb{Z}×\mathbb{Z}$
I assume that its inverse function is:
$g^{-1}\langle a, b\rangle=\langle 5a-3b,2b-3a\rangle$
And I also define $a$ and $b$ based on function $g$:
$(a=2x+3y)\land(b=3x+5y)$
Now I am going to prove that my assumed inverse function is correct by using composition:
$g\circ g^{-1} \langle a, b\rangle=g\langle 5a-3b,2b-3a\rangle=g\langle x, y\rangle=\langle 2x+3y,3x+5y\rangle$
And the opposite way:
$g^{-1}\circ g \langle x, y\rangle=g^{-1}\circ g \langle 5a-3b, 2b-3a\rangle=g^{-1} \langle a, b\rangle= \langle 5a-3b,2b-3a\rangle$
Here I simplified the process of some calculations based on definitions of the given functions, in order to show the main idea of my composition of functions. Here is my problem, that I'm not sure whether this is the right way to prove that those compositions are correct and satisfy the proof of inverse function.
Thanks.