Riemannian metric under coordinate exchange Let $\{x^i\},\{y^a\}$ be coordinate functions on a common open set.why we have 
$g_{ab}(y)=g_{ij}(x)\frac{\partial x^i}{\partial y^a}\frac{\partial x^j}{\partial y^b}$ ?
And $g^{ab}(y)=?$

Write the metric tensor $g$ in both coordinates:
$$g=g_{ij}\,\mathrm{d}x^i\otimes\mathrm{d}x^j=g_{ab}\,\mathrm{d}y^a\otimes\mathrm{d}y^b\,;$$
then replace the relation $\mathrm{d}x^i=\frac{\mathrm{d}x^i}{\mathrm{d}y^a}\mathrm{d}y^a$.
For the second, note the dual metric is a $(2,0)$ tensor:
$$\tilde{g}=g^{ij}\frac{\partial}{\partial x^i}\otimes\frac{\partial}{\partial x^j}=g^{ab}\frac{\partial}{\partial y^a}\otimes\frac{\partial}{\partial y^b}\,,$$
and use the rule $\frac{\partial}{\partial x^i}=\frac{\partial y^a}{\partial x^i}\frac{\partial}{\partial y^a}$.
