In the book of linear algebra by Werner Greub, at pages $194 - 195$, it is given that
If $E_1$ is a subspace of n-dimensional inner product space $E$, and $E_1^\perp \subseteq E$ is the orthogonal complement of $E_1$ in $E$, then since $$dim(E_1) + dim(E_1^\perp) = dim (E)$$, and
But in the problems following this page, it is asked that
Given an inner product space $E$ and a subspace $E_1$ of finite dimension, consider the decomposition
$$x = x_1 + x_2 \qquad x_1 \in E_1$$ and the projection $$x = p+h \qquad p\in E_1, h\in E_1^\perp$$ Prove that
$$|x_2| \geq |h|$$
But since $E = E_1 \oplus E_1^\perp$, shouldn't the decomposition
$$x = x_1 + x_2 \qquad x_1\in E_1, x_2 \in E_1^\perp$$ be unique ? And hence $p = x_1 $ and $h = x_2$ ?

In $3$-space, let $E_1$ be the $x$-axis, $$ x = (3, 1, 2) = x_1 + x_2 = (1, 0, 0) + (2, 1, 2) $$ Then $x_1$ is in $E_1$ as required, but $x_2$ is not perpendicular to it. The $p+h$ decomposition is $$ x = p + h = (3, 0,0) + (0, 1, 2) $$ by the way.
Note that $\|(2, 1, 2) \| \ge \|(0, 1, 2) \|$ as claimed.