Can we define a 'rectangular coordinate' on a curved surface? We use rectangular coordinate on a flat plane, so can we use it in a curved surface, like the axis is somehow bent?
If yes, is there any application? Also, can we generalize this to higher dimension?
 A: The requirement to intersect at right angles still gives a lot of options, as long as you are willing to accept the adjustments it will take to fit a "rectangular" grid onto a curved surface.
You will have to accept either partial coverage or singularities for some (but not all) curved surfaces. You will also have to accept some variation in the way distance is measured--that is, a $1\times1$ box with corners $(x,y),$
$(x+1,y),$ $(x,y+1),$ and $(x+1,y+1)$ will not always be "square." Sometimes one edge will be longer than the adjacent edge.
An example of a singularity is either pole of a sphere mapped out with lines of latitude and longitude. When you are not exactly at a pole, the latitude-longitude coordinates are locally rectangular--the nearby lines of latitude and longitude are perpendicular to each other; but messy things happen when you are exactly at a pole.
In fact, polar coordinates in a flat plane also are locally rectangular except at the origin (which is a singularity for those coordinates).
Once you decide not to require all the conditions that force Cartesian coordinates to be exactly as they are (for example, uniformity of distance measurement, complete coverage of the plane without singularities) there are many sets of curvilinear coordinates you can define on a plane.
Basically, you set up one set of curves that define the points at $x=r$ for each real constant $r,$ and then each curve for some $y=c$ can be defined by traveling across the $x=r$ curves at right angles.
One curved surface that allows complete coverage without a boundary or singularity is a torus. If you generated the torus by rotating a circle around an axis, just let the $x=r$ curves be the circles produced by all the rotated copies of the original circle, and the $y=c$ curves are the circles produced by single points on the original circle as they rotate around the axis.
A: Assume we have a parametrized surface (patch) given by $S:[0,1]^2\rightarrow \mathbb R^n$ and we are looking for a reparametrization function $\varphi:[0,1]^2\rightarrow [0,1]^2$ so that
$$\langle \partial_x (S\circ \varphi),\partial_y (S\circ \varphi)\rangle=0,$$
which expresses this perpendicularity claim you are looking for. At some point $p\in[0,1]^2$, this can be written as
$$0=\langle D_pS\cdot \partial_x\varphi, D_pS\cdot \partial_y\varphi\rangle
=\langle\partial_x\varphi,\underbrace{(D_pS)^\top D_pS}_{:=A_p}\cdot\partial_y\varphi\rangle
=\langle\partial_x\varphi,A_p\cdot\partial_y\varphi\rangle
=\langle\partial_x\varphi,\partial_y\varphi\rangle_{A_p}.
$$
So we are looking for a diffeomorphism $\varphi:[0,1]^2\rightarrow[0,1]^2$, so that its partial derivatices are perpendicular with respect to the above defined dot product using $A_p:=(D_pS)^\top D_pS$.
I do not know enough about those differential equations to tell you anything about its solution or even if there are any. But this would be my way approaching it.
A: Preliminary
\begin{align*}
  \mathbf{x}(u,v)
  &= \begin{pmatrix} x(u,v) \\ y(u,v) \\ z(u,v) \end{pmatrix} \\
  \mathbf{x}_u &= \frac{\partial \mathbf{x}}{\partial u} \\
  \mathbf{x}_v &= \frac{\partial \mathbf{x}}{\partial v} \\
  \mathbf{N} &=
  \frac{\mathbf{x}_u \times \mathbf{x}_v}{|\mathbf{x}_u \times \mathbf{x}_v|}
  \tag{unit normal vector} \\
\end{align*}
First Fundamental Form
$$\mathbb{I}=
\begin{pmatrix} E & F \\ F & G \end{pmatrix}= 
\begin{pmatrix} \mathbf{x}_{u} \\ \mathbf{x}_{v} \end{pmatrix}
\begin{pmatrix} \mathbf{x}_{u} & \mathbf{x}_{v} \end{pmatrix} $$
Second Fundamental Form
$$\mathbb{II}=
 \begin{pmatrix} e & f \\ f & g \end{pmatrix}=
-\begin{pmatrix} \mathbf{N}_{u} \\ \mathbf{N}_{v} \end{pmatrix}
 \begin{pmatrix} \mathbf{x}_{u} & \mathbf{x}_{v} \end{pmatrix}$$

For surface $\mathbf{x}(u,v)$ such that $F=0$ (or simply $\mathbf{x}_u \cdot \mathbf{x}_v=0$), we call it orthogonal patch which means the family of curves for constant $u$ is perpendicular/orthogonal/normal to the family of curves for constant $v$.
In particular, $F=0$ and $f=0$, then $\mathbf{x}(u,v)$ is known as principal patch where $\mathbf{x}_u$ and $\mathbf{x}_v$ are respectively along the directions of the two principal curvatures.

