Finding a bijective function between an open disk and the open square 
How can I find a bijective function between these two sets?
  $$\{(x,y)\in\mathbb{R}^2 \,|\, x^2+y^2<1\}, \quad (-1,1) \times (-1,1) .$$

I already thought of first writing between 2nd and set of real numbers, but then I find myself stuck with finding between the reals and the 1st set. Any help would be appreciated. 
 A: Hint If we denote
$$S := (-1, 1) \times (-1 ,1) \qquad \text{and} \qquad D := \{(x, y) : x^2 + y^2 = 1\},$$ we can easily write down a homeomorphism $f: \partial S \stackrel{\cong}{\to} \partial D$ between their boundaries in $\Bbb R^2$ by projecting points in $\partial S$ along rays from the origin; explicitly, this map is:
$$f(x, y) := \frac{1}{\sqrt{x^2 + y^2}} (x, y).$$
Extending this map linearly on each ray from the origin determines a map $\Bbb R^2 \to \Bbb R^2$ that restricts to a bijection (in fact, a homeomorphism) $S \to D$.
A: Outline: Map the origin to itself. Now consider  points $P$ in the disk with polar coordinates $(r,\theta)$, where $r\gt 0$ and $0\le \theta\le \frac{\pi}{4}$.  Map $P$ to $\phi(P)$, where $\phi(P)$ has polar coordinates $(r\sec\theta,\theta)$. 
Do the geometrically same thing for the remaining $7$ sectors of the disk.
A: One domain is $\{\rho_1(x,y)<1\}$, the other is $\{\rho_2(x,y) <1\}$, where $\rho_1(x,y) =\sqrt{x^2+y^2}$, and $\rho_2(x,y) = \max(|x|,|y|)$. Find a map $F\colon (x,y) \mapsto (x',y')$ so that $\rho_1(x,y) = \rho_2(x',y')$. It should be linear on each line through the origin. One can take:
$$F(x,y) = \frac{\rho_1(x,y)}{\rho_2(x,y)} \cdot (x,y)$$
that is
\begin{eqnarray}
F(x,y) = \frac{\sqrt{x^2+y^2}}{\max(|x|,|y|)} \cdot (x,y)
\end{eqnarray}
with inverse 
\begin{eqnarray}
F^{-1}(x,y) = \frac{\max(|x|,|y|)}{\sqrt{x^2+y^2}} \cdot (x,y)
\end{eqnarray}
$F$ provides a homeomorphism from the disk to the square. 
