In an exercise stated as the following.
Consider the real inner product space $\mathbb{R}^3$ (using scalar-product as the inner product), and let $W=\text{Span}(v_1,v_2)$ where
$$v_1 = \begin{bmatrix}1\\2\\1\end{bmatrix}, v_2 = \begin{bmatrix}2\\1\\2\end{bmatrix}$$.
The orthogonal projection $P_W : \mathbb{R}^3 \rightarrow W$ is given by
$$P_W(\begin{bmatrix}a\\b\\c\end{bmatrix})=\begin{bmatrix}\alpha\\\beta\\\alpha\end{bmatrix}$$.
Find $\alpha,\beta$.
I was able to use the hints to determine that
$$\alpha=\frac{1}{2}(a+c),\quad \beta=b$$
but I don't understand why, and I don't know how to solve similar problems without the hints. Can anyone explain why $\alpha, \beta$ are given as they are.
I think one should be able to determine them from the orthogonal projection formula
Given a inner product space $V$ with $W=\text{Span}(v_1,\dots, v_n)$, then any vector $v\in V$ can be written as
$$v=p+h$$
where $p\in W,h\in W^\perp$ and where we can write $p$ as
$$p=\sum_{i=1}^n \frac{\langle v, v_i \rangle}{\langle v_i, v_i \rangle} v_i$$.
However, I'm unable to relate the two.