Explicitly giving an atlas to make $SL(2, \mathbb{R})$ a smooth manifold. In my manifolds class, we have the following theorem at our disposal:

Let $Z \subseteq \mathbb{R}^n$ and suppose for each $p \in Z$ there is a neighborhood $N \subseteq \mathbb{R}^n$ of $p$ and a $C^k$ function $f: N \rightarrow \mathbb{R}$ such that $N \cap Z = f^{-1}(0)$ and $\nabla f|_p \neq 0$. Then $Z$ is a $C^k$ manifold of dimension $n-1$.

It's clear that we can use this to show that $SL(n, \mathbb{R})$ is a smooth manifold. Let $Z = SL(n, \mathbb{R}) \subseteq \mathbb{R}^{n \times n} \cong \mathbb{R}^{n^2}$. If we just let $f(P) = \det P -1$, clearly a $C^\infty$ function, then $N$ can just be the whole space $\mathbb{R}^{n^2}$. We need only check that the gradient of our $f$ is nonzero at each $P \in SL(n, \mathbb{R})$. We were given this formula:

$\nabla_M \det P = \dfrac{\det P}{\text{tr} (P^{-1}M)}$

So just taking $\nabla f$ in the direction of $P$ and evaluating at $P$ gives $\frac{1}{\text{tr} (I)} = \frac{1}{n} \neq 0$.
My first question is whether, given the two quoted pieces from our professor, this is enough to show that $SL(n, \mathbb{R})$ is a manifold. My second question is how to solve this second problem:

Define explicitly a smooth atlas on $SL(2, \mathbb{R})$ and its patching functions.

I'm not sure how to do this, since the above proposition we used is nonconstructive. I can't think of what the open sets should be as domains for the charts. I know that it should be a three-dimensional manifold, but beyond that I have no idea what the charts in the atlas should be. Any hints are appreciated.
 A: The theorem you cited is known as the implicit function theorem, and it is actually pretty constructive, if you keep track of an extra conclusion of that theorem. I'll explain how that extra conclusion gives you a coordinate chart around each point, and it should be explicit enough that you can extract the additional information about patching functions.
First, for any $P \in SL(2,\mathbb R)$, you can compute the gradient vector of $f$ at $P$ explicitly as a function of the coordinates of $P$. That vector is a nonzero 4-vector, and so at least one of its four coordinates is nonzero. 
So let's say that the gradient vector has coordinates $\nabla f_P = \langle x_1,x_2,x_3,x_4\rangle$, and that $x_i$ is nonzero (for some particular $i \in \{1,2,3,4\}$). Choose $U \subset \mathbb R^4$ to be a neighborhood such that the coordinate $x_i$ does not vanish on the set $U \cap SL(2,\mathbb R)$. The extra conclusion you need is that the projection from $U  \cap SL(2,\mathbb R)$ to the other three coordinates is a diffeomorphism onto an open subset $V \subset \mathbb R^3$.
A: HINT:
$$SL(2,\mathbb{R})= \{ x=(x_{11},x_{12},x_{21},x_{22}) \ \mid \ f(x)=x_{11}x_{22}-x_{12}x_{21}=1\}$$
Define the open subset $U_{ij}$ of $SL(2,\mathbb{R})$ by the condition $\frac{\partial f}{\partial x_{ij}} \ne 0$. For instance $U_{11} = \{x \in SL(2,\mathbb{R}) \ \mid \ x_{22}\ne 0 \}$. The chart $\phi_{ij} \colon U_{ij} \to V_{ij} $, $x\mapsto (x_{11}, \hat x_{ij},\ldots, x_{22})$ is the projection onto $V_{ij}$. For instance, $V_{11} =\{(x_{12},x_{21},x_{22})\ \mid \ x_{22} \ne 0\}$. The inverse of $\phi_{11}$ is 
$$(x_{12},x_{21},x_{22}) \mapsto (\frac{ 1 + x_{12}x_{21}}{x_{22}},x_{12},x_{21},x_{22}) $$
Now the open subsets $U_{11}$ and $U_{12}$ cover $SL(2,\mathbb{R})$. Let's  see the coordinate change. We have
$$\phi_{12}\circ \phi_{11}^{-1} (x_{12},x_{21},x_{22}) = (\frac{ 1 + x_{12}x_{21}}{x_{22}},x_{21},x_{22}) $$
Note: All is mostly algebra
