# Why does contracting a term with a tensor means a portion of this term is a tensor?

I am looking at a problem in Guidry's Modern General Relativity, and the solution contains the following two sentences:

In the scalar product expression $$A\cdot B = g_{\mu \nu}A^{\mu} B^{\nu}$$, the left side is a scalar and $$A$$ and $$B$$ on the right side are vectors. Since the quantities, $$g_{\mu \nu}$$ contracted with tensors on the right side yield a tensor on the left side, by the quotient theorem $$g_{\mu \nu}$$ must define the components of a type (0,2) tensor.

For reference, the quotient rule says that if a set of quantities produces a tensor when contracted with a tensor, then that set of quantities is necessarily a tensor.

I don't understand this proof, specifically, why it says "the quantities, $$g_{\mu \nu}$$ contracted with tensors on the right side yield a tensor on the left side". If we apply tensors to both sides, wouldn't this only prove that $$g_{\mu \nu}A^{\mu} B^{\nu}$$ is a tensor, not $$g_{\mu \nu}$$?

Since the left side is a scalar, it does not transform under changes of coordinates, i.e., $$A' \cdot B' = A \cdot B$$, where the primes indicate the components are given with respect to new coordinates. Notice now that we have \begin{align} g_{\sigma\rho}A^{\sigma}B^{\rho} &= A \cdot B, \\ &= A' \cdot B', \\ &= g'_{\mu\nu}A^{\prime\mu}B^{\prime\nu}, \\ &= g'_{\mu\nu}\frac{\partial x^{\prime\mu}}{\partial x^\sigma} \frac{\partial x^{\prime\nu}}{\partial x^\rho} A^{\sigma}B^{\rho}, \end{align} where I applied the transformation law for vector components.
Since this holds for any two vectors $$A$$ and $$B$$, we conclude that $$g_{\sigma \rho} = g'_{\mu\nu}\frac{\partial x^{\prime\mu}}{\partial x^\sigma} \frac{\partial x^{\prime\nu}}{\partial x^\rho},$$ and hence the components of $$g$$ must transform like the components of a tensor.
In terms of the quotient rule you mentioned, notice that a scalar is also a tensor, and so is $$A^\mu B^\nu$$. Since contracting the tensor $$A^\mu B^\nu$$ with $$g_{\mu\nu}$$ yields the tensor $$A \cdot B$$, $$g_{\mu\nu}$$ must be a tensor.