Suppose $(X,*)$ is a pre-hilbert real space. Is it true that a linear projection $P:X\rightarrow X, P(X)=Y$, self-adjoint respect $*$, is the identity on $Y$? this means that $Px$ realize $\min_{y \in Y} \Vert x-y \Vert$
i know that $$(x-Px)*Px=(P(x-Px))*x=(Px-P^2x)*x=0$$ so if $Py=y$ on $Y$ $$(x-Px)*y=(x-Px)*Py=(P(x-Px))*y=0$$
then $\forall y \in Y$ $$\Vert x-Px \Vert \leq \Vert x-y \Vert$$
but idk if $Py=y, \space \forall y \in Y$ is true.
#edited after the answers
I use the definition of @Shaqinho about projection
For me, if we assume that exists $P$ linear proj self-adjoint respect inner product, both completeness and $Py =y$ on $Y$ are not necessary to realize the $\min$, in fact $x-Px$ and $Px$ are orthogonal. Moreover $x-Px$ is orthogonal with every $y \in Y$ because i can write $y=Pz$ for some $z \in X$ and $$(x-Px)*y= (x-Px)*Pz=(P(x-Px))*z=...=0$$ so we can easily show $$\Vert x-Px \Vert \leq \Vert x - y \Vert$$ for every $y \in Y$
Someone could check it?
If such a linear projection $P$ exists, (that is, a linear operator such that $Px$ minimizes $\min_{y\in Y}\|x-y\|$, or, equivalently, $\|x-Px\| \leq \|x-y\|$ for all $y\in Y$) then yes, $Pz=z$ is indeed true for all $z\in Y$.
Let $z\in Y$ be given. Then we have $$ \|z-Pz\| \leq \|z - y\| \qquad \forall y\in Y. $$ If we choose $y=z$ here we get $\|z-Pz\| \leq \|z-z\|=0$, which implies $\|z-Pz\|=0$ and $z=Pz$.
However, as paul garrett notes in the comments, for a given subspace $Y$ such an operator $P$ does not always exist in a pre-Hilbert space.