A riemannian metric on $M$ is a smooth bilinear map $g:\mathfrak{X}(M)\times\mathfrak{X}(M)\to C^\infty(M)$ such that $g(X,Y) = g(Y,X)$ and $g(X,X)(x)>0$ if $X_x\neq0$
We can then define a scalar product $T_xM$ thanks to $g_x(X_x,Y_x) := g(X,Y)(x)$ where $X_x = X(x)$ and $Y_x = Y(x)$.
How do we show that this does not depend on the choice of $X$ and $Y$?
First we show that if $X_x = 0$, we get that $g(X,Y)(x) = 0$ for all $X$ such that $X(x) = X_x$ and for all $Y$.
$X_x = 0\Rightarrow g_x(X_x,Y_x) = 0$ by linearity. So $g(X,Y)(x) = g_x(X_x,Y_x) = 0$
This implies our result since then, if we take $X,X'$ such that $X(x) = X'(x) = X_x$,
$$g(X,Y)(x) = g(X',Y) \iff g(X-X',Y)(x) = 0$$
Then, since $(X-X')_x = X(x)-X'(x) = X_x-X_x = 0$, we have our result using the first part.