# The slope, i.e. the first derivative transforms covariant, some problems with understanding

I am working through tensoranalysis and the notations of co-/contra- and invariant, guess I understand. If I have a linear transformation, and the coordinates of my vector transform in the opposite direction (i.e. "contrary") to the transformation, then the vector is called contravariant. An example would be position, if I shift my coordinate system an amount $\Delta x$ in the $x$ direction, the vectors which stay stationary must be shifted by $-\Delta x$ in the $x$ direction. Invariant are quantities like length or dot products. With the notation of covariant I have my difficulty, in my textbooks it is said that the gradiant transforms covariant under linear transformations, so I tried to come up with a simple example.

The simplest example I could think of would be the scalar function $f(x) = x^2$ on $\mathbb{R}^1$. Here the gradiant equals the first derivate or the slope of the function. If I shrink my units of measurements on the x-axis by $\frac12$, i.e. change my basis, I need to transform my coordinates contravariantly, i.e. $x^2$ becomes $(2x)^2 = 4x^2$. But here is the problem, the gradiant/slope changed from $1$ to $4$, that is not just lineary covariant??? It is transformed lineary-contravariantly-squared? But by using any function I could transform the gradient as much as I want? but if it is covariant it should also shrink by $\frac12$, or not?

-

I like to use overlines to indicate transformed things. So, I'm going to write $x$ for our normal coordinate system, $\overline{x}$ to indicate the transformed variable. Anything with an overline is "in terms of $\overline{x}$ and anything without overline is "in terms of $x$".

It's worth realizing that the covariance of the derivative is just the statement of the chain rule! $\frac{\overline{df}}{d\overline{x}}=\frac{df}{dx}\frac{dx}{d\overline{x}}$

I'll use $f(x)=x^2$ and $\overline{x}=2x$ to write out your example. In terms of $\overline{x}$, $f$ is $(\frac{\overline{x}}{2})^2=\frac{\overline{x}^2}{4}$.

Also, $\frac{dx}{d\overline{x}}=\frac{1}{2}$ and $\frac{df}{dx}=2x$, and $\frac{\overline{df}}{d\overline{x}}=\frac{\overline{x}}{2}$ and $\frac{\overline{df}}{d\overline{x}}=\frac{2\overline{x}}{4}=\frac{\overline{x}}{2}$.

Putting it together you confirm that $\frac{df}{dx}\frac{dx}{d\overline{x}}=2x\frac{1}{2}=x=\frac{\overline{x}}{2}=\frac{\overline{df}}{d\overline{x}}$.

I really think the thing to latch onto is the connection with the chain rule. That helps me a lot, anyway.

-