# Definition of Lie differentiation for vector fields

I am trying to track the definition of Lie differentiation. According to my notes:

Given $p\in\mathbb{R}^n$, the tangent space to $\mathbb{R}^n$ at $p$ is the set of pairs $$T_p\mathbb{R}^n=\{(p,v)\}; v\in\mathbb{R}^n.$$

Let $U$ be an open subset of $\mathbb{R}^n$. A vector field on $U$ is a function $v$ which assigns to each point $p\in U$ a vector $v(p)\in T_p\mathbb{R}^n$.

Given a fixed vector $v\in \mathbb{R}^n$, the function $p\in\mathbb{R}^n\rightarrow (p,v)$ is a vector field. Let $e_1,\ldots,e_n$ be the standard basis vectors of $\mathbb{R}^n$. If $v=e_i$, we will denote the vector field by $\dfrac{\partial}{\partial x_i}$.

If $f\in C^1(U)$, we define the Lie differentiation $L_vf$ to be the function on $U$ whose value at $p$ is given by $L_vf(p)=Df(p)v$.

So far so good. Now, the notes say:

If $v=\sum_{i=1}^n g_i\dfrac{\partial}{\partial x_i}$, where $g_i:U\rightarrow\mathbb{R}$ is the function $p\rightarrow g_i(p)$, then $$L_vf=\sum_{i=1}^n g_i\dfrac{\partial}{\partial x_i}f.$$

I'm absolutely confused here. Where does this formula come from? By the definition, $L_vf$ is a function from $U\subseteq \mathbb{R}^n$ to $\mathbb{R}^m$. Does the right-hand side also have the same domain and range?

Though they are not mentioned, I will assume that you know about differential forms, since you are using them when you write down $df(p)$. At this point, it ends up being a simple matter of computation: You know that \begin{align*} df(p) &= \left. \frac{\partial f}{\partial x^1}\right|_p dx^1(p) + \cdots + \left. \frac{\partial f}{\partial x^n}\right|_p dx^n(p) = \sum_{i=1}^n \left. \frac{\partial f}{\partial x^i}\right|_p dx^i(p) \\ v(p) &= \sum_{j=1}^n g_i(p) \left.\frac{\partial}{\partial x^i}\right|_p. \end{align*} From here on out, I'm dropping the $p$'s. Now by definition, we know that $$dx^i\left(\frac{\partial}{\partial x^j}\right) = \delta_{i,j}:=\begin{cases} 1 & i =j \\ 0 & i \neq j \end{cases} \tag{*} .$$ To deduce the desired equation, we simply apply the definition; that is, we know that $L_v f = df.v$, which gives \begin{align*} L_v f&= df.v = \left( \sum_{i=1}^n \frac{\partial f}{\partial x^i}dx^i \right) \left( \sum_{j=1}^n g_j \frac{\partial}{\partial x^i} \right) \\ &= \sum_{i,j=1}^n g_j \frac{\partial f}{\partial x^i} dx^i\left(\frac{\partial}{\partial x^j}\right) \\ &= \sum_{i,j=1}^n g_j \frac{\partial f}{\partial x^i} \delta_{i,j} & \text{ by (*)} \\ &= \sum_{i=1}^n g_i \frac{\partial}{\partial x^i}f. \end{align*} This is precisely what you wanted to show.