We have a function $f: \mathbb{R}^2 \rightarrow \mathbb{R}^2$ as $f(x,y) = (\sqrt{x^2 + y^2}$, $\tan^{-1}\left(\frac{y}{x}\right))$ which takes a Cartesian pair $(x,y)$ to its polar form, and a function $g: \mathbb{R}^2 \rightarrow \mathbb{R}^2$ as $g(r,\theta) = (r\cos\theta, r\sin\theta)$, which takes a polar pair $(r, \theta)$ to its Cartesian representation.
I'm having trouble proving that there's a bijective correspondence between the two representations. It is easy to show, for instance, that $f \circ g = \text{id}_{\mathbb{R}^2}$, but not quite as easy to show the other direction.
Any hints or help would be appreciated.
--
Edit: I have also tried messing around with injectivity and surjectivity between the two functions, so that the one-way composition-identity equality suffices to prove that the two functions are inverses. But I run into the same problems, which the below answer resolves by using trig identities. Is there a way to circumvent this?
Substitute $r= \sqrt{x^2+y^2}$ and $\theta = arctan(\frac{y}{x})$ into $g$ and use the Relations for inverse trigonometric functions.