Consider a vector $a$ in a $k-$dimensional space, whose orthonormal basis is $\{v_1, v_2, v_3,\cdots, v_k\}$.
It is given that
$$\sum\limits_{i=1}^{k} (a.v_i)^2 = \|a\|^2$$
That is, the sum of squares of lengths of projections is equal to the square of norm of the vector.
It is obvious to derive if each vector $v_i$ contains all zeros except an entry which contains 1. But, orthonormal basis is not unique.
How to prove the equation for general case?
Notations used:
$a.v_i$ stands for dot product between a and unit vector $v_i$.
$\|a\|$ stands for distance of the vector a from origin, also called as norm of the vector $a$