Definition of orthogonal projection The concept of the orthogonal projection is an easy one to grasp, but I'm confused about the following definition in my book:

Let $\{u_1,\dots,u_k\}$ be an orthonormal basis of a finite-dimensional subspace $U$ of a vector space $V$ with an inner product. Let $v$ be a vector in $V$ such that $v\notin U$. A vector $u_0$ which satisfies
  $$\left\{
\begin{array}\\
u_{0}=\sum_{i=1}^{k}\alpha_i u_i
\\ 
\alpha_i = \left \langle v,u_i \right \rangle , i=1,\dots,k
\end{array}\right.$$
  is called an orthogonal projection of $v$ on $U$.

They say it is because $v-u_0 \perp U$ (which is true).
However, we know that for any orthonormal basis $\{u_1,\dots,u_n\}$ of a vector space $U$ with an inner product, and for any $v\in U$ the following identity holds:
$$v=\sum_{i=1}^{n}\left \langle v,u_i \right \rangle u_i$$
So in fact, $v-u_0=v-v=0 \implies u_0=v$. So actually, the "orthogonal projection" of $v$ as my book defines it is $v$ itself. Isn't it a contradiction?
 A: Let $U$ be a finite dimensional subspace of an arbitrary vector space with inner product and the definition gets her non-trivial cases. And yes, you have just to check, that $u_0\in U$ and $v-u_0\in U^⊥$, which is a more geometric definition of the perpendicular projection.
A: Just an example to clarify the situation. Consider $V=\mathbb{R}^2$ and $U=\{(x,0)\in V: x\in \mathbb{R}\}.$ Consider $v=(1,2).$ The orthogonal projection of $v$ over $U$ is the vector $u=(1,0).$ Note that
$$v-u=(1,2)-(1,0)=(0,2)\perp U.$$ Now, if $U=U=\{(0,y)\in V: y\in \mathbb{R}\}$ then the orthogonal projection of $v$ over $U$ is the vector $u=(0,2).$ Note that
$$v-u=(1,2)-(0,2)=(1,0)\perp U.$$
That is, the orthogonal projection of $v\in V$ over $U$ is equal to $v$ if and only if $v\in U.$ Also, the orthogonal projection depends on the vector and on the subspace. 
Of course, if you consider the projection of $V$ over $V$ then you get $V.$
Edit
As you say, it is
$$v=\sum_{i=1}^{n}\left \langle v,u_i \right \rangle u_i,$$ with $\{u_i\}$ orthonormal basis of $V.$ But note that to get the orthogonal projection you only consider the set of $u_i\in U.$
