# Confusion regarding summation convention

In tensor calculus, I recently came across the formula for the angle between two vectors (non null) in Riemannian Space, which is as follows:

$cos \theta = \frac{g_{ij}A^iB^j}{\sqrt {g_{ij}A^iA^j}\sqrt {g_{ij}B^iB^j}}$; and the distance formula $|A|^2=g_{ij} A^iA^j$. I came across a problem related to this topic, where it says:

If $X^i =\frac{1}{\sqrt {g_{pq}Y^pY^q}}Y^i$ (where $X^i$ and $Y^i$ are vector components and $g_{ij}$ is the fundamental tensor), show that $X^i$ is a unit vector.

My question is, whether , the dummy indices in the denominators imply this:

$X^i =\frac{1}{\sqrt {\sum_p \sum_q {g_{pq}Y^pY^q}}}Y^i$

Or,

this: $X^i =\sum_p \sum_q {\frac{1}{\sqrt {g_{pq}Y^pY^q}}Y^i}$

If the first one is implied, then $|X|^2=g_{ij}X^iX^j= \frac{g_{ij}Y^iY^j}{\sqrt {g_{pq}Y^pY^q}\sqrt {g_{pq}Y^pY^q}}=\frac{g_{ij}Y^iY^j}{ {g_{pq}Y^pY^q}}= \frac{\sum_i \sum_j g_{ij}Y^iY^j }{\sum_p \sum_q g_{pq}Y^pY^q}=1$.

If my interpretation is wrong, then I don't know how to proceed. Kindly clear my doubts.

It's the first interpretation that is correct: $$X^i =\frac{1}{\sqrt {\sum_p \sum_q {g_{pq}Y^pY^q}}}Y^i$$
• Yes, $$\cos \theta = \frac{g_{ij}A^iB^j}{\sqrt {g_{ij}A^iA^j}\sqrt {g_{ij}B^iB^j}} = \frac{\sum_{ij} g_{ij}A^iB^j}{\sqrt {\sum_{ij} g_{ij}A^iA^j}\sqrt {\sum_{ij} g_{ij}B^iB^j}}$$ – md2perpe Sep 19 '18 at 11:18
The right interpretation is your first one: $$X^i =\frac{1}{\sqrt {\sum_p \sum_q {g_{pq}Y^pY^q}}}Y^i$$