I'm trying to show that $S^1=\{ (x,y) \in \mathbb{R}^2: x^2+y^2=1\}$ is a submanifold of $\mathbb{R}^2$ using the following definition:
A subset $M \subset \mathbb{R}^n$ is called a smooth k-dimensional submanifold of $\mathbb{R}^n$, $k \leq n$, if any point $z \in M$ has a neighborhood $O_z$ in $\mathbb{R}^n$ and there exists a smooth vector-function $$\Phi:O_z \to O_0 \subset \mathbb{R}^{n},$$ onto a neighborhood of the origin $0 \in O_0 \subset \mathbb{R}^n$ with $$\text{ } \operatorname{rank} \frac{d \Phi}{dz}\bigg|_z=n $$ such that $ \Phi(O_z \cap M)= \mathbb{R}^k \cap O_0$.
I know the idea is to make the circle straight locally, but I can't explain $\Phi$, my initial proposal would be ($z=(x,y) \in S^1$) $O_z = B_{\frac{1}{4}}(z)$ and $O_0=B_0(1)$, $\Phi(x,y)=(\frac{x}{\sqrt{x^2+y^2}+1}, \frac{y}{\sqrt{x^2+y^2}+1})$, but $\Phi(O_z \cap M) \neq \mathbb{R}^k \cap O_0$. How can I write to $\Phi?$
Let us first consider $z = (0,1)$.
Let $O_z = (-1,1) \times(0,\infty)$ and $O_0 = \{(x,y) \in (-1,1) \times \mathbb R \mid y > -\sqrt{1-x^2}\}$. These are open subsets of $\mathbb R^2$ such that $z \in O_z$, $0 \in O_0$. Define $\phi : O_z \to O_0, \phi(x,y) = (x, y - \sqrt{1 - x^2})$ and $\psi : O_o \to O_z,\psi(x,y) = (x,y+\sqrt{1 - x^2})$. Both maps are smooth and inverse to each other ($\psi \circ \phi = id, \phi \circ \psi = id$). Therefore $\phi$ is a diffeomorphism, in particular the rank of the derivative of $\phi$ is $2$ at all points. We have $O_z \cap S^1 = \{(x,y) \in S^1 \mid y > 0 \} = \{ (x,\sqrt{1-x^2}) \mid x \in (-1,1) \}$, thus by definition $\phi(O_z \cap S^1) = \{(x, \sqrt{1-x^2} -\sqrt{1-x^2}) \mid x \in(-1,1) \} = (-1,1) \times \{0\} = (\mathbb R \times \{0\}) \cap O_0$.
Now let $z \in S^1$ by arbitrary.
There exists a rotation $R$ on $\mathbb R^2$ such that $R(z) = (1,0)$. Since rotations are linear isomorphisms, they are diffeomorphisms of $\mathbb R^2$ onto itself. Now define $O_z = R^{-1}(O_{(0,1)})$ and $\Phi = \phi \circ R$. This has the desired properties.