# Orthogonal transformations and metric tensor: prove that $U^{T} g U=g$

I'm attempting to prove that, if $$U=(U^i_j)_{n \times n}$$ is the matrix associated to an orthogonal transformation and $$g=(g_{ij})_{n \times n}$$ is the metric tensor, then

$$U^{T} g U=g \tag{1}$$

My attempt

Applying the condition that an orthogonal transformation must preserve the scalar product, $$\big(U(\boldsymbol{x}), U(\boldsymbol{y})\big) = (\boldsymbol{x}, \boldsymbol{y})$$, I have found that that

$$\sum ^n _{i=1} \sum ^n _{j=1} \sum ^n _{k=1} \sum ^n _{l=1} g_{i j} U_{k}^{i} U_{l}^{j} x^{k} y^{l}= \sum ^n _{i=1}\sum ^n _{j=1} g_{i j} x^{i} y^{j} \tag{2}$$

Using the Einstein summation convention and changing in the RHS the indexes $$i \rightarrow k, j \rightarrow l$$

$$g_{i j} U_{k}^{i} U_{l}^{j} x^{k} y^{l} = g_{kl} x^{k} y^{l} \tag{3}$$

Since the terms $$x^{k} y^{l}$$ appears at both sides, if we could identify $$g_{i j} U_{k}^{i} U_{l}^{j}=g_{k l}$$, this would correspond to the matrix product $$U^{T} g U=g$$, and the proof would be complete.

But I'm stuck here, because I don't see how we can match parts of different sums... Could someone tell me how could it be justified from $$(3)$$ that $$g_{i j} U_{k}^{i} U_{l}^{j}=g_{k l}$$ (if it is actually possible to do this)?

• This doesn't hold for just some $\boldsymbol x, \boldsymbol y$. It holds for every $\boldsymbol x, \boldsymbol y$. Jan 3, 2021 at 20:46

@PaulSinclair is right. Suppose $$x^k$$ ($$y^l$$) is $$0$$ except for being $$1$$ when $$k=m$$ ($$l=n$$) in our coordinates, so $$g_{ij}U^i_mU^j_n=g_{mn}$$.

• Okay, but with this reasoning you only show that it is true for the particular case that $\boldsymbol{x}$ and $\boldsymbol{y}$ are vectors of the canonical base, doesn't you? $\boldsymbol{x}$ or $\boldsymbol{y} = (1,0,...,0), (0,1,...,0)$, etc. Jan 4, 2021 at 10:03
• @user206148 The value of $g_{ij}U^i_mU^j_n$ doesn't depend on what you contract it with. The only way for $g_{ij}U^i_kU^j_lx^ky^l=g_{kl}x^ky^l$ to be true for all choices of $x,\,y$, including mine, is to have $g_{ij}U^i_kU^j_l=g_{kl}$.
– J.G.
Jan 4, 2021 at 10:46

As already said, the key is that the equality must be satisfied for any values of $$\boldsymbol{x}=(x^1,...,x^n)$$ and $$\boldsymbol{y}=(y^1,...,y^n)$$. Also notice that in the LHS, once the sum is performed over $$i$$ and $$j$$, there is a term that only depends on $$k$$ and $$l$$. This is clear by reordering equation $$(3)$$ as follows:

$$\sum ^n _{k=1} \sum ^n _{l=1} x^{k} y^{l} \bigg(\sum ^n _{i=1} \sum ^n _{j=1} g_{i j} U_{k}^{i} U_{l}^{j} \bigg) = \sum ^n _{k=1}\sum ^n _{l=1} x^{k} y^{l}g_{kl}$$

$$\sum ^n _{k=1} \sum ^n _{l=1} x^{k} y^{l} h_{kl} = \sum ^n _{k=1}\sum ^n _{l=1} x^{k} y^{l}g_{kl}$$

So $$h_{kl}=g_{i j} U_{k}^{i} U_{l}^{j}=g_{kl}$$.