Let $\{u_1,u_2,\dots, u_n\}$ be an orthonormal basis for $\mathbb{R}^n$.
Show that
$$ \Vert v \Vert^2 = (v\cdot u_1)^2+(v\cdot u_2)^2+\dots+(v\cdot u_n)^2.$$
By the properties of a basis, $v$ can be written as $v=c_1u_1+c_2u_2+\dots+c_nu_n$.
I tried this

Since $\{u_1,\cdots, u_n\}$ is a basis for $\mathbb{R}^n$ then these vectors span $\mathbb{R}^n$ and we can write $$v=c_1 u_1+\cdots c_n u_n \qquad (1)$$ for some $c_i \in \mathbb{R}$.
Take the inner-product (the scalar product) of both sides of (1) by $u_i$ to get that
$$v\cdot u_i=c_1 u_1\cdot u_i+\cdots c_i u_i\cdot u_i+\cdots c_n u_n\cdot u_i= c_i $$ becaue $u_i\cdot u_i=1$ and $u_j\cdot u_i=0$ if $j\neq i$.
Therefore, by (1), we have the representation $$v= (u_1\cdot v) u_1+\cdots (u_n\cdot v) u_n.$$
Now, $$\|v\|^2= v\cdot v= \left((u_1\cdot v) u_1+\cdots (u_n\cdot v) u_n\right)\cdot\left( (u_1\cdot v) u_1+\cdots (u_n\cdot v) u_n\right)$$ $$=\sum_{i=1}^{n}\sum_{j=1}^{n} (u_i\cdot v)(u_j\cdot v) u_i \cdot u_j$$ $$=\sum_{i=1}^{n} (u_i\cdot v)(u_i\cdot v) u_i \cdot u_i= \sum_{i=1}^{n} (u_i\cdot v)^2.$$