Theorem: Let V be an inner product space and S={v_1,v_2,...,v_k} be an orthogonal subset of V consisting of nonzero vectors. If $y \in span (S)$, then $y=\sum_{i=1}^k \frac{<y,v_i>}{||v_i||^2} v_i$.
I don't know intuitively how people come up with $y=\sum_{i=1}^k \frac{<y,v_i>}{||v_i||^2} v_i$
Write $y = \sum_{i=1}^k a_i v_i$. You can do this because the $v_i$ span $S$ and $y \in S$. But how to find each $a_i$? Hit both sides with $\langle \cdot, v_j\rangle$ to get $$\langle y, v_j\rangle = \sum_{i=1}^k a_i \langle v_i,v_j\rangle = a_j\|v_j\|^2,$$using that the $v_i$'s are orthogonal. So $a_j = \langle y,v_j\rangle/\|v_j\|^2$. This means that $$y = \sum_{i=1}^k \frac{\langle y,v_i\rangle}{\|v_i\|^2}v_i,$$as wanted.