Canonical isomorphism from $I_p/I_p^2$ to cotangent space

Sorry if the title is confusing, I don't know if the terminology is standard. For my homework this week I have to prove the following:

Let $M$ be a smooth manifold and let $p \in M$. Let $I_p$ denote the set of smooth functions $f:M \to \mathbb{R}$ such that $f(p)=0$. Let $I_p^2$ denote the set of sums $\sum_{i=1}^k f_ig_i$ where $k$ is a nonnegative integer and $f_i,g_i \in I_p$. Show that the quotient vector space $I_p/I_p^2$ is canonically isomorphic to the cotangent space $T_p^*M$.

I found the map $f \mapsto \phi_f$, where $\phi_f(v)=vf$ for $v \in T_pM$, and I've proved every part except injectivity. I've tried finding a basis for $I_p/I_p^2$ to show that it has the same dimension as $T_pM$, and I've tried showing that if $f=g \bmod I_p^2$ then there exist derivations taking $f$ and $g$ to different numbers, and I've tried showing that for any smooth function vanishing at $p$ and not in $I_p^2$ there is a derivation taking it to a nonzero number. I tried working in coordinates but that didn't seem to help. Does anyone have any hints? Thanks!

• I think you can choose as a basis of $I/I^2$ the set of coordinate functions $x_1,...,x_n$, since they determine the first order behaviour (Taylor series) of the function at the point. Does this make sense to you? – Franco Feb 17 '15 at 5:01
• I thought about that, since I showed surjectivity by showing that the dual basis of $T_p^*M$ is the image of $\{x^1+I^2,\ldots,x^m+I^2\}$, but I didn't think to use Taylor series. I'll try that. – desi Feb 17 '15 at 5:43
• @Franco, desi: you are not allowed to use coordinate functions because they are not defined on all of $M$. – Georges Elencwajg Feb 17 '15 at 7:49

Let $U \subset \mathbb R^n$ be open and $p \in U$, and $f\in C^k(U)$ with $1 \le k\le \infty$. Then there is $g_1, \cdots g_n \in C^{k-1}(U)$, $g_i(p) = 0$ and
$$f(x) = f(p) + \sum_{i=1}^n \frac{\partial f}{\partial x_i}(p) (x_i - p_i) + \sum_{i=1}^n g_i(x) (x_i - p_i)$$
From this, you have that if $f(p) = 0$ and $\nabla f(p) = 0$, then there are smooth $f_1, \cdots, f_n$ and $g_1, \cdots , g_n$ so that $f = f_1 g_1 + \cdots f_ng_n$. That is, $f\in I_p^2$.