The introduction to tensor calculus that I am reading cites on page sixteen that the inner product of two contravariant vectors $x^\mu$ and $y^\nu$ is $$s=g_{\mu\nu}x^\mu y^\nu$$ where $g_{\mu\nu}$ is the metric tensor, which may need to be defined differently for different coordinate systems.
This is then immediately expanded into
$$g_{\mu\nu}x^\mu y^\nu = \begin{pmatrix} x^1 & x^2 & x^3 \\ \end{pmatrix} \begin{pmatrix} g_{11} & g_{12} & g_{13} \\ g_{21} & g_{22} & g_{23} \\ g_{31} & g_{32} & g_{33} \\ \end{pmatrix} \begin{pmatrix} y^1 \\ y^2 \\ y^3 \\ \end{pmatrix}$$
How did $g$ and $x$ flip orders, and how did $x$ go from being represented as a column to represent as a row? Is the order not significant? (I assumed it was.)
I can tell these two switch-ups are clearly related, but other than that, I’m in the dark.