Do orthonormal changes of basis affect the inner product?

Let $e_1;\ldots,e_n$ and $e_1',\ldots ,e_n'$ be orthonormal basis of a vector space $V$. Consider the vectors $$v=(v_1e_1+\ldots +v_ne_n)=(v_1'e_1'+\ldots +v_n'e_n'),$$ $$u=(u_1e_1+\ldots +u_ne_n)=(u_1'e_1'+\ldots +u_n'e_n')$$

is $\sum_i u_iv_i = \sum_iu_i'v_i'$? That is, is the value of the dot product preserved?


I think this question's formulation hides a misunderstanding. The dot product is given up-front, as a map satisfying certain axioms.

If the basis $(e_1,\ldots,e_n)$ is orthonormal with respect to a given dot product "$\cdot$", this means that $$e_i\cdot e_j=\delta_{ij}=\begin{cases}1&&i=j\\0&&i\ne j\end{cases}$$ That is the definition of the word "orthonormal", and it is always taken with respect to a given dot product. (A basis may be orthonormal with respect to one dot product but not with respect to another.)

Then, for two vectors $u=u_1e_1+\ldots+u_n e_n$ and $v=v_1e_1+\ldots+v_n e_n$ it can be proven that $$u\cdot v=u_1v_1(e_1\cdot e_1)+u_1v_2(e_1\cdot e_2)+\ldots+u_nv_n(e_n\cdot e_n)=u_1v_1+u_2v_2+\ldots+u_nv_n$$ (use e.g. distributivity and the other axioms of the dot product) - simply because of $e_i\cdot e_i=1$ and $e_i\cdot e_j=0$ for $j\ne i$.

Of course this formula is then valid for any other orthonormal basis $(e'_1,\ldots, e'_n)$.


Note: A potential source of confusion may be that, on $V=\mathbb R^n$, one (but by no means unique) dot product is given by $$\begin{bmatrix}u_1 \\ u_2 \\ \vdots \\ u_n\end{bmatrix}\cdot \begin{bmatrix}v_1 \\ v_2 \\ \vdots \\ v_n\end{bmatrix}=u_1v_1+u_2v_2+\ldots+u_nv_n$$ and the "standard" basis in $\mathbb R^n$ happens to be orthonormal with respect to that dot product.