Finding coordinate charts from a torus (square with sides identified) to $\mathbb R^2$. I have a torus which is thought of as the unit square with sides identified in the usual manner. I know that for every point on the square I have to find a neighborhood and a diffeomorphism to open sets in $\mathbb R^2$.
I plan on using the identity map to send the interior of the square to itself. However, I cannot wrap my mind around finding coordinate charts for points on the boundary and especially points on the "corners" of the square. The only way I can see to construct such a map would be to have a complicated piecewise function and having a very hard time justifying the map as a diffeomorphism.
How can we define "reasonable" coordinate charts for points on the boundary?
 A: It would be easier if you considered the torus as $\mathbb{R}^2 / \mathbb{Z}^2$, i.e. $\mathbb{R}^2$ quotiented by the equivalence relation where $(x, y) \sim (x', y')$ when $(x - x', y - y')$ has integer coordinates. This is dividing the whole plane into a grid of squares and collapsing them all together. It's easy to see that this is essentially equivalent to your construction of the torus. The point of this is that it's now easy to see that the projection $\pi : \mathbb{R}^2 \rightarrow \mathbb{R}^2 / \mathbb{Z}^2$ will be a local homeomorphism; indeed, its restriction to any set of diameter less than $1$ will be a homeomorphism onto its image. In fancier language, we might note that $\mathbb{Z}^2$ has a properly discontinuous action on $\mathbb{R}^2$ given by $(a, b) \cdot (x, y) = (x + a, y + b)$ (the properly discontinuous term means that any point in $\mathbb{R}^2$ has an open neighborhood $U$ such that $gU \cap U = \emptyset$ for all $g \in \mathbb{Z}^2$, $g \neq (0, 0)$). You can then prove more generally that the quotient of a manifold by a properly discontinuous action will always be a manifold.
If you insist on having just one square, it's not difficult to adapt this. Take a point $p$ in the boundary of the square $[0, 1] \times [0, 1]$ and take, say, an open ball $B$ of radius $1/2$ around it (we're considering the whole ball inside $\mathbb{R}^2$, not just the part of it that lies inside the square). Now consider the map from $B$ to the torus $T^2 = ([0, 1] \times [0, 1])/\sim$ which sends $B \cap T^2$ to itself (or, more formally, its image under the projection); and for a point $(x, y) \in B$ which is not in $B \cap T^2$, simply translate each coordinate by an appropiate integer amount (i.e. $0$, $1$ or $-1$) so that it falls inside the square, and then project it to the torus. If you restrict this to its image, you'll get a chart.
