Factor of 4 appears in Jacobian coordinate transformation I am was reading the wikipedia page on metric tensors, when I saw something that was hard to grasp in the coordinate transformation section. This topic is a little bit uncomfortable to me, so maybe I have missed something, but there appears to be a factor of 4 that appears when working everything out by hand?
With r being a vector valued function $\vec{r}(u,\,v) = \bigl( x(u,\,v),\, y(u,\,v),\, z(u,\,v) \bigr)$, and with the following identity
$$
\begin{bmatrix}
\frac{\partial r}{\partial u}\frac{\partial r}{\partial u} &
\frac{\partial r}{\partial u}\frac{\partial r}{\partial v} \\
\frac{\partial r}{\partial u}\frac{\partial r}{\partial v} &
\frac{\partial r}{\partial v}\frac{\partial r}{\partial v}
\end{bmatrix}
=
\begin{bmatrix}
E  &
F  \\
F  &
G
\end{bmatrix}
$$
the coordinate transformation is given by,
$$
\begin{aligned}
\begin{bmatrix}
E^\prime & F^\prime \\ F^\prime & G^\prime
\end{bmatrix}
=
\begin{bmatrix}
\frac{\partial u}{\partial u^\prime} & \frac{\partial u}{\partial v^\prime} \\
\frac{\partial v}{\partial u^\prime} & \frac{\partial v}{\partial v^\prime} \\
\end{bmatrix}^\top
\begin{bmatrix}
E & F \\ F & G
\end{bmatrix}
\begin{bmatrix}
\frac{\partial u}{\partial u^\prime} & \frac{\partial u}{\partial v^\prime} \\
\frac{\partial v}{\partial u^\prime} & \frac{\partial v}{\partial v^\prime} \\
\end{bmatrix}
\end{aligned}
$$
With the following substitution in the coordinate transformation matrix,
$$
\begin{bmatrix}
\frac{\partial u}{\partial u^\prime} & 
\frac{\partial u}{\partial v^\prime} \\
\frac{\partial v}{\partial u^\prime} &
\frac{\partial v}{\partial v^\prime}
\end{bmatrix}
=
\begin{bmatrix}
A & 
B \\
C &
D
\end{bmatrix}
$$
The transformation then becomes,
$$
\begin{aligned}
\begin{bmatrix}
A & B \\ C & D
\end{bmatrix}^\top
\begin{bmatrix}
E & F \\ F & G
\end{bmatrix}
\begin{bmatrix}
A & B \\ C & D
\end{bmatrix}
= 
\begin{bmatrix}
\underbrace{A^2 E + 2 ACF + C^2G}_{E^\prime} & \underbrace{ABE + BCF + AFD + CDG}_{F^\prime} \\
\underbrace{ABE + BCF + AFD + CDG}_{F^\prime} & \underbrace{B^2E + 2BFD + D^2G}_{G^\prime}
\end{bmatrix}
\end{aligned}
$$
Plugging the values into the variables give the following expressions,
$$
\begin{aligned}
E^\prime &= \frac{\partial u}{\partial u^\prime}\frac{\partial u}{\partial u^\prime}
 \frac{\partial r}{\partial u}\frac{\partial r}{\partial u} 
+ 2 \frac{\partial u}{\partial u^\prime}\frac{\partial v}{\partial u^\prime}\frac{\partial r}{\partial u}\frac{\partial r}{\partial v}
+ \frac{\partial v}{\partial u^\prime}\frac{\partial v}{\partial u^\prime}\frac{\partial r}{\partial v}\frac{\partial r}{\partial v} \\
F^\prime &= \frac{\partial u}{\partial u^\prime}\frac{\partial u}{\partial v^\prime}\frac{\partial r}{\partial u}\frac{\partial r}{\partial u} + \frac{\partial u}{\partial v^\prime}\frac{\partial v}{\partial u^\prime}\frac{\partial r}{\partial u}\frac{\partial r}{\partial v} + \frac{\partial u}{\partial u^\prime}\frac{\partial r}{\partial u}\frac{\partial r}{\partial v}\frac{\partial v}{\partial v^\prime} + \frac{\partial v}{\partial u^\prime}\frac{\partial v}{\partial v^\prime}\frac{\partial r}{\partial v}\frac{\partial r}{\partial v} \\
G^\prime &= \frac{\partial u}{\partial v^\prime}\frac{\partial u}{\partial v^\prime}\frac{\partial r}{\partial u}\frac{\partial r}{\partial u} + 2\frac{\partial u}{\partial v^\prime}\frac{\partial r}{\partial u}\frac{\partial r}{\partial v}\frac{\partial v}{\partial v^\prime} + \frac{\partial v}{\partial v^\prime}\frac{\partial v}{\partial v^\prime}\frac{\partial r}{\partial v}\frac{\partial r}{\partial v}
\end{aligned}
$$
after simplifying by cancelling out similar factors in the numerator and denominator and summing the result, everything comes out to,
$$
\require{cancel}
\begin{aligned}
E^\prime &= \frac{\cancel{\partial u}}{\partial u^\prime}\frac{\cancel{\partial u}}{\partial u^\prime}
 \frac{\partial r}{\cancel{\partial u}}\frac{\partial r}{\cancel{\partial u}} 
+ 2 \frac{\cancel{\partial u}}{\partial u^\prime}\frac{\cancel{\partial v}}{\partial u^\prime}\frac{\partial r}{\cancel{\partial u}}\frac{\partial r}{\cancel{\partial v}}
+ \frac{\cancel{\partial v}}{\partial u^\prime}\frac{\cancel{\partial v}}{\partial u^\prime}\frac{\partial r}{\cancel{\partial v}}\frac{\partial r}{\cancel{\partial v}} \\
F^\prime &= \frac{\cancel{\partial u}}{\partial u^\prime}\frac{\cancel{\partial u}}{\partial v^\prime}\frac{\partial r}{\cancel{\partial u}}\frac{\partial r}{\cancel{\partial u}} + \frac{\cancel{\partial u}}{\partial v^\prime}\frac{\cancel{\partial v}}{\partial u^\prime}\frac{\partial r}{\cancel{\partial u}}\frac{\partial r}{\cancel{\partial v}} + \frac{\cancel{\partial u}}{\partial u^\prime}\frac{\partial r}{\cancel{\partial u}}\frac{\partial r}{\cancel{\partial v}}\frac{\cancel{\partial v}}{\partial v^\prime} + \frac{\cancel{\partial v}}{\partial u^\prime}\frac{\cancel{\partial v}}{\partial v^\prime}\frac{\partial r}{\cancel{\partial v}}\frac{\partial r}{\cancel{\partial v}} \\
G^\prime &= \frac{\cancel{\partial u}}{\partial v^\prime}\frac{\cancel{\partial u}}{\partial v^\prime}\frac{\partial r}{\cancel{\partial u}}\frac{\partial r}{\cancel{\partial u}} + 2\frac{\cancel{\partial u}}{\partial v^\prime}\frac{\partial r}{\cancel{\partial u}}\frac{\partial r}{\cancel{\partial v}}\frac{\cancel{\partial v}}{\partial v^\prime} + \frac{\cancel{\partial v}}{\partial v^\prime}\frac{\cancel{\partial v}}{\partial v^\prime}\frac{\partial r}{\cancel{\partial v}}\frac{\partial r}{\cancel{\partial v}}
\end{aligned}
$$
which then reduces to the following by adding the remaining terms,
$$
\begin{bmatrix}
E^\prime &
F^\prime \\
F^\prime &
G^\prime
\end{bmatrix} 
=
4\begin{bmatrix}
\frac{\partial r}{\partial u^\prime}\frac{\partial r}{\partial u^\prime} &
\frac{\partial r}{\partial u^\prime}\frac{\partial r}{\partial v^\prime} \\
\frac{\partial r}{\partial u^\prime}\frac{\partial r}{\partial v^\prime} &
\frac{\partial r}{\partial v^\prime}\frac{\partial r}{\partial v^\prime}
\end{bmatrix}
$$
The Wikipedia article states (above equation 2') that the values of $E^\prime, F^\prime, G^\prime$ are in fact $
E^\prime = \frac{\partial r}{\partial u^\prime}\frac{\partial r}{\partial u^\prime}, \;\; 
F^\prime = \frac{\partial r}{\partial u^\prime}\frac{\partial r}{\partial v^\prime}, \;\;
G^\prime = \frac{\partial r}{\partial v^\prime}\frac{\partial r}{\partial v^\prime}
$
which then means that I get the following expression after simplifying my manual transformation above, and comparing it with the definition of $E^\prime, F^\prime, G^\prime$ from Wikipedia.
$$
\begin{aligned}
\begin{bmatrix}
E^\prime & F^\prime \\ F^\prime & G^\prime
\end{bmatrix}
\neq
4\begin{bmatrix}
E^\prime & F^\prime \\ F^\prime & G^\prime
\end{bmatrix}
\end{aligned}
$$
Questions

*

*How can I reconcile that this factor of 4 comes out? Is it just because the factor of 4 becomes irrelevant for an infinitesimal difference? Or have I made a terrible error somewhere?


*Generally, how can I understand coordinate transformations when dealing with a Jacobian matrix, are they the same thing as a change of basis in linear algebra when we see the form $P^{-1}AP$? What is the significance here that this form is $P^\top AP$ with a transpose instead of an inverse? The Jacobian is highly unlikely to be orthonormal (right?), so the transpose is definitely not the inverse.
 A: With r being a vector valued function $\vec{r}(u,\,v) = \bigl( x(u,\,v),\, y(u,\,v),\, z(u,\,v) \bigr)$, the partial derivatives $\frac{\partial r}{\partial u} \,\text{and}\, \frac{\partial r}{\partial v} \in \mathbb{R}^{1 \times 3}$,  and with the following identity
$$
\begin{bmatrix}
\frac{\partial r}{\partial u}\frac{\partial r}{\partial u} &
\frac{\partial r}{\partial u}\frac{\partial r}{\partial v} \\
\frac{\partial r}{\partial u}\frac{\partial r}{\partial v} &
\frac{\partial r}{\partial v}\frac{\partial r}{\partial v}
\end{bmatrix}
=
\begin{bmatrix}
E  &
F  \\
F  &
G
\end{bmatrix}
= 
\begin{bmatrix}
\frac{\partial r}{\partial u} \\ \frac{\partial r}{\partial v}
\end{bmatrix}
\begin{bmatrix}
\frac{\partial r}{\partial u} & \frac{\partial r}{\partial v}
\end{bmatrix}
$$
It is convenient to view the matrix as an outer product as we will see, the coordinate transformation is given by,
$$
\begin{aligned}
\begin{bmatrix}
E^\prime & F^\prime \\ F^\prime & G^\prime
\end{bmatrix}
=
\begin{bmatrix}
\frac{\partial u}{\partial u^\prime} & \frac{\partial u}{\partial v^\prime} \\
\frac{\partial v}{\partial u^\prime} & \frac{\partial v}{\partial v^\prime} \\
\end{bmatrix}^\top
\begin{bmatrix}
\frac{\partial r}{\partial u} \\ \frac{\partial r}{\partial v}
\end{bmatrix}
\begin{bmatrix}
\frac{\partial r}{\partial u} & \frac{\partial r}{\partial v}
\end{bmatrix}
\begin{bmatrix}
\frac{\partial u}{\partial u^\prime} & \frac{\partial u}{\partial v^\prime} \\
\frac{\partial v}{\partial u^\prime} & \frac{\partial v}{\partial v^\prime} \\
\end{bmatrix}
\end{aligned} = P^\top P
$$
$P$ then becomes the total derivative w.r.t. the new variables $u^\prime$ and $v^\prime$
$$
\begin{aligned}
P
=
\begin{bmatrix}
\frac{\partial r}{\partial u}\frac{\partial u}{\partial u^\prime} 
+ \frac{\partial r}{\partial v}\frac{\partial v}{\partial u^\prime} 
& \frac{\partial r}{\partial u}\frac{\partial u}{\partial v^\prime}
+ \frac{\partial r}{\partial v} \frac{\partial v}{\partial v^\prime}
\end{bmatrix}
= 
\begin{bmatrix}
\frac{\partial r}{\partial u^\prime} 
& \frac{\partial r}{\partial v^\prime}
\end{bmatrix}
\end{aligned}
\implies P^\top P = 
\begin{bmatrix}
\frac{\partial r}{\partial u^\prime}\frac{\partial r}{\partial u^\prime} &
\frac{\partial r}{\partial u^\prime}\frac{\partial r}{\partial v^\prime} \\
\frac{\partial r}{\partial u^\prime}\frac{\partial r}{\partial v^\prime} &
\frac{\partial r}{\partial v^\prime}\frac{\partial r}{\partial v^\prime}
\end{bmatrix}
$$
which gives the answer as specified in the Wikpedia page. The problem with the initial version is that I was accumulating terms of the total derivative which were not in fact like terms, but they were contributions to the total derivative from changes in the new variables $u^\prime$ and $v^\prime$.
