The corner of the squre

A square is a topological manifold with boundary but not a smooth manifold with boundary because of its corners. But I am confused about it. I think since for a specific corner $p$, there is only one chart to cover $P$ (in order to be compatible), say $(U,f)$ , thus in the NBHD of $P$ the transition maps can only be $ff^{-1},f^{-1}f$, so the charts are compatible, so a square has a smooth structure. I feel confused about it. Could you tell me where I went wrong? Thank you!

The topological space known as the square definitely does have a smooth structure, since it's homeomorphic to a disc. However, it does not have a smooth structure such that the inclusion map $i: \square \to \Bbb R^2$ is a smooth embedding.
Proof: Put a smooth structure on the square. Let $(U,\varphi)$ be a boundary chart about one of the corners $p$ such that $\varphi(p)=0$. If $i$ is a smooth embedding, then the differential $di_p$ is an isomorphism. The tangent cone of a point $q$ is the set of vectors $v \in T_qM$ such that $v = \gamma'(0)$, where $\gamma: [0,\varepsilon) \to M$ is smooth. For an interior point, the tangent cone is the whole of $T_qM$; for a boundary point of a smooth manifold with boundary, it's a half-space, precisely the half-space of "inward-pointing" tangent vectors. (This is a useful notion when considering other sorts of 'manifolds with corners'; see my answer here for another application.)
Now note that tangent cones are functorial: if $f: M \to N$ is a smooth map, then $df_p(C_p) \subset C_{f(p)}$. (If $f$ is a diffeomorphism we see that the linear isomorphism $df_p$ preserves the tangent cones.)
Now let's break our assumption on the smooth map $i$. Because it's a boundary point in a manifold with boundary, $C_p$ is a half-space. But $C_{(0,0)}$ is a quadrant of $\Bbb R^2$, and there is no linear isomorphism that sends a half-space into a quadrant.
Relatedly, it is worth thinking about the upper right quadrant in $\Bbb C = \Bbb R^2$, and why the map $z \mapsto z^2$ is a homeomorphism onto the upper half plane but not a diffeomorphism, and how the idea of this argument comes from that fact.
• @6666: The rigorous phrasing is what I said. Ultimately what he means is that certain subsets of $\Bbb R^n$ can automatically be given a smooth manifold structure: these are those such that the inclusion map is a smooth embedding (or with certain charts, usually called slice charts). Take it as a moral statement instead of as a totally correct one. – user98602 Nov 28 '15 at 6:49