I've been trying to follow the derivation of the position vector in general curvilinear coordinates, however I've been unable to understand a step taken near the end. First (in the document I found) they begin with the definition of the position vector in cartesian coordinates and the definition of the unit vectors in curvilinear coordinates
$\vec{r} = x\hat{i} + y\hat{j} + z\hat{k}$
$\hat{e_i} = \dfrac{1}{h_i} \ \dfrac{\partial{\vec{r}}}{\partial{u_i}}$
next, they expand the term $\frac{\partial{\vec{r}}}{\partial{u_i}}$
$\hat{e_i} = \dfrac{1}{h_i} \ \left( \dfrac{\partial{x}}{\partial{u_i}} \hat{i} + \dfrac{\partial{y}}{\partial{u_i}} \hat{j} + \dfrac{\partial{z}}{\partial{u_i}} \hat{k} \right)$
now, they take the dot product between $\hat{e_i}$ and the cartesian unit vectors
$ \hat{i} \cdot \hat{e_i} = \dfrac{1}{h_i}\dfrac{\partial{x}}{\partial{u_i}} $
$ \hat{j} \cdot \hat{e_i} = \dfrac{1}{h_i}\dfrac{\partial{y}}{\partial{u_i}} $
$ \hat{k} \cdot \hat{e_i} = \dfrac{1}{h_i}\dfrac{\partial{z}}{\partial{u_i}} $
then take the first of these equations and write it explicitly
$ \hat{i} \cdot \hat{e_1} = \dfrac{1}{h_1}\dfrac{\partial{x}}{\partial{u_1}} $
$ \hat{i} \cdot \hat{e_2} = \dfrac{1}{h_2}\dfrac{\partial{x}}{\partial{u_2}} $
$ \hat{i} \cdot \hat{e_3} = \dfrac{1}{h_3}\dfrac{\partial{x}}{\partial{u_3}} $
the next step is
$ \hat{i} = \dfrac{1}{h_1}\dfrac{\partial{x}}{\partial{u_1}} \ \hat{e_1} + \dfrac{1}{h_2}\dfrac{\partial{x}}{\partial{u_2}} \ \hat{e_2} + \dfrac{1}{h_3}\dfrac{\partial{x}}{\partial{u_3}} \ \hat{e_3} $
and here is where i got lost; I just can't understand how they reached that last equation. The following steps are very straightforward.
It seems to me that they started by assuming that $\{\hat e_1,\hat e_2,\hat e_3\}$ is an orthonormal basis for $\mathbb R^3$. Then they wrote $$\hat i=a\hat e_1+b\hat e_2+c\hat e_3$$ and took the dot product of that equation first with $\hat e_1,$then with $\hat e_2,$ and then with $\hat e_3,$ to find $a,b$ and $c$ respectively.