Let $M$ be a manifold, $(x^1,...,x^n)$ a coordinate system on $U \subset M$, and $g$ a metric tensor, then the components of metric tensor on $U$ are:
$g_{ij} = <\partial^i,\partial^j>$
Now the book I am reading from does not show how to calculate $g_{ij}$ for an explicit example, so I want to learn how to do that. Given the simplest case of $\mathbb{R}^n$ with the coordinate chart $x^i(x_1,...,x_n) = x_i$, I want to obtain the dot product. Given 2 vectors $(u_1,...,u_n)$
$\partial^i(x_1,...,x_n) = (0,..,1,...,0)$ at $i$-position.
So $g_{ij} = <\partial^i,\partial^j> = 1$ if $i=j$ and $0$ otherwise, so $g_{ij}= \delta_{ij}$, the kronecker-delta function.
My questions is what I just did correct? Can I apply it to any manifold with any charts?