# Representation of a vector as sum of vectors from an orthonormal basis

Let $B=\{p_1, \cdots, p_n\}$ be an orthonormal basis for $V$ and let $p \in V$. For $i=1,2,\cdots,n$, let $a_i=p\cdot p_i$, then $$p=a_1p_1+\cdots +a_np_n.$$

My idea
I know here only that definition of orthonormal basis so $\langle p_i,p_j\rangle=0,$ for every $i,j$.

How to we start from this problem… Can any help me? Thank you.

How $\lbrace p_1, \ldots, p_n \rbrace$ is a basis, then $p$ can be write as $$p = b_1\cdot p_1 + \ldots +b_n\cdot p_n$$
So, for each $i = 1, \ldots, n$ holds
$$a_i = \langle p, p_i\rangle = \langle b_1\cdot p_1 + \ldots +b_n\cdot p_n, p_i \rangle = b_1\langle p_1, p_i\rangle +\ldots + b_i\cdot\langle p_i, p_i \rangle +\ldots + b_n\cdot\langle p_n, p_i \rangle= b_i$$
Therefore $$p = b_1\cdot p_1 + \ldots +b_n\cdot p_n = a_1\cdot p_1 + \ldots +a_n\cdot p_n$$