How do you write $ds^2=\frac{dx^2}{x^2}+\frac{dy^2}{y^2}$ in matrix form? Is it $\frac{1}{x^2}$ and $\frac{1}{y^2}$ on the diagonal and $0$ else-where? I need this to calculate the volume form. $g=\begin{bmatrix} 1 & 0 \\ 0 & 1\end{bmatrix}$ is the matrix representation of $g=ds^2=dx^2+dy^2$ so for $ds^2=\frac{dx^2}{x^2}+\frac{dy^2}{y^2}$ my best guess at the matrix representation is $\begin{bmatrix} \frac{1}{x^2} & 0 \\ 0 & \frac{1}{y^2} \end{bmatrix}.$
This is needed to calculate the volume form, which has the formula, $\omega=\sqrt{|g|}dx^1 \wedge dx^2\cdot\cdot\cdot dx^n.$
So I think the answer is $\omega=\frac{dx}{x}$ for my case. Correct?
Does that mean I should write integrals like $\int f(x)\frac{dx}{x}$?
I think your expression for the metric, being $g=\begin{bmatrix} \frac{1}{x^2} & 0 \\ 0 & \frac{1}{y^2} \end{bmatrix}$ is correct, as $ds^2=\sum_{i}\sum_{j}{g_{ij}\ dx^idx^j}$.
But i thing your expression for $\omega$ is incorrect, as $|g|=\frac{1}{x^2y^2}$, so $$\omega=\sqrt{\frac{1}{x^2y^2}}dxdy={\frac{1}{xy}}dxdy$$ which is the volume element for this 2D space.