Projection operator for non-orthonormal basis Let $V \subset H$ be Hilbert spaces.
Let $\{v_j\}_{j=1}^\infty$ be a basis for $V$ and $H$. Define $V_N$ to be the span of $\{v_j\}_{j=1}^N$.
We can define a projection operator
$P:H \to V_N$ by
$$P(h) = \sum_{j=1}^N(h,v_j)_Hv_j$$
which is bounded from $H$ to $H$.
I can show that $P^2(h) = P(h)$ if the $v_j$ are orthonormal in $H$. If they are not (say they are just a basis, not orthonormal and not orthogonal), then how can I show this identity? Should I define the projection differently?
 A: What you defined is not idempotent (i.e. $P^2\neq P$) in general.
Case N=1: when $v\neq 0$, the projection (= self-adjoint idempotent, i.e. range and nullspace orthgonal to each other) onto $\mbox{span} \,v$ is given by
$$
P_vh=\frac{(h,v)}{\|v\|^2}v.
$$
In your case, you used the formula $Ph=(h,v)v$ which yields $P^2=\|v\|^2P$. So that's an idempotent if and ony if $\|v\|=1$.
Note that more generally, an idempotent (not necessarily self-adjoint) with range $\mbox{span} \,v$ is given by
$$
P_{u,v}h=(h,u)v\quad\mbox{with}\;(u,v)=1
$$
where $u$ is chosen so that $\ker P=u^\perp$. Note that in this case, we have
$$
(P_{u,v})^*=(\cdot,v)u=P_{v,u}.
$$
This describes all the rank one idempotents.
Case N=2: let us look at the simple case $H=\mathbb{C}^2$, $v_1=(1,0)$, $v_2=(1,1)$. Then $\mbox{span}(v_1,v_2)=\mathbb{C}^2$, so the projection onto the latter is just $P=Id$. Now if you compute the matrix of $P=(\cdot,v_1)v_1+(\cdot,v_2)v_2$ in, say, the canonical basis, you find
$$
P=\pmatrix{2&3\\1&2}
$$
which is far from $I_2$. It is not hard to see that such a formula can work if and only if $(v_1,v_2)=0$ and $\|v_1\|=\|v_2\|=1$, that is $(v_1,v_2)$ orthonormal. But what you can do is look for $(u_1,u_2)$ such that
$$
Id=(\cdot,u_1)v_1+(\cdot,u_2)v_2\iff (v_i,u_j)=\delta_{ij}\quad 1\leq i,j\leq 2.
$$
That is $(u_1,u_2)$ dual basis of $(v_1,v_2)$ with respect to the duality induced by the inner product.
General case: the formula $P=\sum_{j=1}^N(\cdot,v_j)v_j$ yields the projection onto $V$ if and only if $(v_j)$ is an orthonormal basis of $V$. Otherwise, $P$ is of the form

$$
P=\sum_{j=1}^nP_{u_j,v_j}=\sum_{j=1}^n(\cdot,u_j)v_j
$$
  where there is one and only one choice for the $u_j$'s, namely
  $$
u_1,\ldots,u_n\in V\qquad (u_i,v_j)=\delta_{ij}\quad 1\leq i,j\leq n.
$$
  That is $(u_j)$ is the dual basis of $(v_j)$ in $V^*$ identified with $V$ via the inner product and Riesz representation.

A: The equation $$P(h) = \sum_{j=1}^N(h,v_j)_Hv_j$$ does not determine an idempotent operator for a general basis. For example, if $v_1=2e_1$ in $\mathbb R^2$, then $P(e_1)=2e_1$, hence $P^2(e_1)=4e_1$. 
It is possible to define orthogonal projection onto closed subspace $V$ without referring to any basis. (As in comments). Given $x\in H$, one shows (using completeness and parallelogram law) that there exists a unique vector $v\in V$ such that $$\|x-v\|=\inf_{u\in V}\|x-u\| \tag1$$
On the basis of (1) it is not hard to prove that $x-v\in V^\perp$. This gives a unique decomposition $x=v+(x-v)$, i.e., $H=V\oplus V^\perp$. The orthogonal projection onto $H$ is $Px=v$. The details can be found in A course in functional analysis by Conway.
