0
$\begingroup$

Consider two bases $e_i$ and $f_i$ of $\mathbb{R}^2$ defined by: $$\begin{aligned} (f_1,f_2) &= (e_1,e_2)\cdot F\\ \begin{pmatrix}1&-1\\1&1\end{pmatrix} &= \begin{pmatrix}1&0\\0&1\end{pmatrix} \cdot \begin{pmatrix}1&-1\\1&1\end{pmatrix} \end{aligned}$$

and the cooresponding change of coordinates ($B\equiv F^{-1}$): $$\begin{aligned} B\cdot \begin{pmatrix}x\\y\end{pmatrix} &= \begin{pmatrix}\tilde x\\ \tilde y \end{pmatrix}_f = \begin{pmatrix}1/2 x + 1/2 y \\ -1/2 x+1/2y\end{pmatrix}_f \\ F\cdot \begin{pmatrix}\tilde x\\ \tilde y \end{pmatrix}_f &= \begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}\tilde x-\tilde y\\ \tilde x+\tilde y\end{pmatrix} \end{aligned}$$

I would like to find the gradient of a function in both coordinate systems. Here, tilde symbols are associated to the $f$-basis. Consider $$\begin{aligned} V(x,y) &= x^2 +y \\ \tilde V(\tilde x,\tilde y) &= (\tilde x-\tilde y)^2 + (\tilde x + \tilde y) \end{aligned}$$

The gradients are defined using the metric-tensor scalings, as $$\begin{aligned} \nabla &= \partial_x e_1 + \partial_y e_2\\ \tilde \nabla &= \frac{1}{\sqrt{f_1\cdot f_1}} \partial_{\tilde x} f_1 +\frac{1}{\sqrt{f_2\cdot f_2}} \partial_{\tilde y} f_2 = \frac{1}{\sqrt{2}} \partial_{\tilde x} f_1 +\frac{1}{\sqrt{2}} \partial_{\tilde y} f_2 \end{aligned}$$

Lets check the gradients at the point $(2,1)\equiv (1.5, -0.5)_f$ where the second coordinates are with respect to the $f$-basis:

$$\begin{aligned} \nabla V \vert_{(2,1)} &= \begin{pmatrix}2x \\1 \end{pmatrix}= \begin{pmatrix}4\\ 1\end{pmatrix} \\ \tilde \nabla\tilde V \vert_{(1.5,-0.5)}&= \frac{1}{\sqrt{2}} [2(\tilde x-\tilde y)+1] f_1 + \frac{1}{\sqrt{2}} [-2(\tilde x-\tilde y)+1] f_2 \\ &= \frac{1}{\sqrt{2}} 5 \begin{pmatrix}1\\1 \end{pmatrix} + \frac{1}{\sqrt{2}} (-3) \begin{pmatrix}-1\\1 \end{pmatrix} \\ &= \frac{1}{\sqrt{2}} \begin{pmatrix}8\\2 \end{pmatrix} \end{aligned}$$

Why do i get a different gradient vector as a result?

$\endgroup$
3
  • $\begingroup$ The relation between the co- and contravariant basis vectors are $\frac{\partial \mathbf{r}}{\partial u_i}=h_i^2\nabla u_i$. The induced contravariant basis vectors in your case are $\nabla \bar{x}=(1/2,1/2)$ and $\nabla \bar{y}=(-1/2,1/2)$. The scale factor is $h_i=\frac{1}{\sqrt 2}$. $\endgroup$ Commented Dec 19, 2023 at 2:34
  • $\begingroup$ @ContraKinta could you elaborate why I need the contravariant basis vectors? Moreover, it seems to me that you suggest that $h_i=1/\sqrt{2}$, which is exactly the scaling factors I have used above and which have led to the wrong result. Could you explain what you mean in more details? $\endgroup$ Commented Dec 19, 2023 at 21:11
  • $\begingroup$ My comment grew too large, please see additional answer. $\endgroup$ Commented Dec 19, 2023 at 21:44

2 Answers 2

1
$\begingroup$

Your gradient formula is incorrect; it should be $1/f_1\cdot f_1$ and $1/f_2\cdot f_2$ without the square roots. Then you get $$ \frac12\begin{pmatrix}8\\2\end{pmatrix} = \begin{pmatrix}4\\1\end{pmatrix}. $$

(It is also bad practice to write $\partial_{\tilde x}f_1$ as you do since we can and often do consider gradients in variable coordinate systems, and in this case the basis vectors $f_i$ will vary from point to point. The notation $\partial_{\tilde x}f_1$ suggest then that you would differentiate $f_1$, but this is incorrect when calculating the gradient and so the notation $f_1\partial_{\tilde x}$ is more advisable.)

The general procedure for any basis is to find its reciprocal basis $f^i$ defined by $$ f^i\cdot f_j = \delta^i_j. $$ Then the gradient is $$ \nabla = \sum_if^i\partial_i $$ where $\partial_i$ is the partial derivative with respect to the coordinate corresponding to $f_i$.

In your case your $f_i$ are orthogonal, so they are almost there own reciprocal; we just need to get the scaling right, and it should be obvious that $$ \frac{f_i}{f_i\cdot f_i}\cdot f_i = 1 $$ so indeed $f^i = f_i/f_i\cdot f_i$.

$\endgroup$
5
  • $\begingroup$ Thank you for your answer, I agree with you on my confusing notation, I should switch the $\partial$s and $f$s. I can follow your advice with the dual/recipr. basis. But I found multiple sources online that suggest to compute the gradient using the scaling factor $h_i = \frac{1}{\sqrt{g_{ii}}}$. This is basically what I have done, so I am a bit confused. $\endgroup$ Commented Dec 19, 2023 at 15:32
  • $\begingroup$ @l'étudiant Can you gives some links/references to these sources? $\endgroup$ Commented Dec 19, 2023 at 18:23
  • $\begingroup$ E.g. here on wikipedia, it states "[...] express the gradient [...] using the scale factors $h_i=\sqrt{g_{ii}}$"; or also here on this website it is stated, that "The scale factors are essentially the square roots of these diagonal metric components: $h_1 = \sqrt{g_{11}}$". $\endgroup$ Commented Dec 19, 2023 at 19:16
  • $\begingroup$ @l'étudiant From Wikipedia (emphasis mine): "...in terms of the normalized bases...". Your $f_i$ basis is not normalized; when you normalize it the terms in the gradient become $$\frac1{f_i\cdot f_i}f_i = \frac1{\sqrt{f_i\cdot f_i}}\hat f_i$$ with $\hat f_i = f_i/\sqrt{f_i\cdot f_i}$. $\endgroup$ Commented Dec 19, 2023 at 22:28
  • $\begingroup$ Thank for your comment, this makes it clear for me. $\endgroup$ Commented Dec 20, 2023 at 16:20
1
$\begingroup$

Too long for comment:

The components of the gradient of a scalar function, $\frac{\partial f}{\partial x^k}$, constitutes a covariant tensor. Attaching the contravariant basis we have (using Einstein notation):

$\nabla \bar{V}=\frac{\partial V}{\partial x^k}\mathbf{e}^k$

Now, it seems you are mixing up the basis vectors as well as the normalizations.

$$ \begin {align} x=\bar{x}-\bar{y} \\ y=\bar{x}+\bar{y} \end{align} $$

$$ \begin {align} \mathbf{e}_{\bar{x}}&=(1,1) & \mathbf{e}^{\bar{x}}&=(\frac12,\frac12) \\ \mathbf{e}_{\bar{y}}&=(-1,1) & \mathbf{e}^{\bar{y}}&=(-\frac12,\frac12) \end{align} $$

$$\begin{align}g_{ij}=\left(\begin{array}{cc} 2 & 0 \\ 0 & 2 \end{array}\right) & & g^{ij}=\left( \begin{array}{cc}\frac{1}{2} & 0 \\ 0 & \frac{1}{2}\end{array}\right)\end{align}$$

The Wikipedia article defines $\nabla V=\sum_i \frac{1}{h_i}\frac{\partial V}{\partial x^i}\hat{\mathbf{e}}_i$, where $\hat{\mathbf{e}}_i$ is the normalized covariant basis( $\frac{1}{h_i}\frac{\partial \mathbf{r}}{\partial x^i}$). In your case the covariant basis is $\mathbf{e}_{\bar{x}}=(1,1)$ and $\mathbf{e}_{\bar{y}}=(-1,1)$. The normalized covariant basis is $\hat{\mathbf{e}}_{\bar{x}}=\frac{1}{\sqrt2}(1,1)$ and $\hat{\mathbf{e}}_{\bar{y}}=\frac{1}{\sqrt2}(-1,1)$. Please pay attention to the hats on top of the basis indicating normalized vectors (vectors of unit length). The full sum is therefore $\nabla \bar{V}=\frac{1}{\sqrt2} 5(1,1)\frac{1}{\sqrt2}+\frac{1}{\sqrt2}(-3) (-1,1)\frac{1}{\sqrt2}=(4,1)$. This is of course the same thing as the gradient expressed in the contravariant basis $\nabla \bar{V}=\frac{\partial \bar{V}}{\partial \bar{x}^k}\mathbf{e}^k$

$\endgroup$
5
  • $\begingroup$ Thank you for your answer! I assume you mean $\nabla \bar V = \frac{\partial V}{\partial x^k}\boldsymbol{e}^k$ (i.e. with the $\nabla$-symbol) after the first paragraph of your post? $\endgroup$ Commented Dec 20, 2023 at 16:25
  • $\begingroup$ Oups, yes :) Sorry about that. Also a comment about the basis. The contravariant basis (sometimes called the normal basis) $\mathbf{e}^k$ is actually (at least in a transformed sense) a basis for the dual space $V^*$ (which might seem strange since the vectors themselves are covariant). The covariant basis (sometimes called the tangential basis) $\mathbf{e}_k$ is the natural basis for the tangent space or $V$, though vectors $v\in V$ are contravariant. Even though you might not use the concepts of $T_p(M)$ and $T^*_p(M)$ setup it is good to thinking about things and this way already. $\endgroup$ Commented Dec 20, 2023 at 16:41
  • $\begingroup$ What is the reason, that it is strange, that basis vectors of $V^*$ are contravariant? It seems quite natural, as the components of functionals are covariant; which is exactly opposite of how basis vectors and vector components behave in $V$ (or $T_p(M)$), right? $\endgroup$ Commented Dec 21, 2023 at 16:24
  • $\begingroup$ Yes. But to complicate matters the basis itself can be transformed (think of it as an array or a list of vectors). And even though the transformation of the components, $u^j$ of a contravariant vector $u^j\mathbf{e}_j\in V$ is $\bar{u}^k=\frac{\partial \bar{x}^k}{\partial x^j}u^j$, the basis itself transforms covariantly ${\mathbf{\bar{e}}}_k=\frac{\partial x^j}{\partial \bar{x}^k}\mathbf{e}_j$. $\endgroup$ Commented Dec 23, 2023 at 3:11
  • $\begingroup$ Yes this makes sense, thank you for clarifying! $\endgroup$ Commented Dec 23, 2023 at 10:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .