$\int_{\Omega} \nabla u_{h} \cdot \nabla v_{h}=\int_{\Omega} f v_{h} \equiv \int_{\Omega} \nabla u_{h} \cdot \nabla \phi_{i}=\int_{\Omega} f \phi_{i}$ Let $\Omega$ be a bounded domain in $\mathbb{R}^{d}$, with $d=2,3$. Let $V_{h}$ be a finite dimensional space of dimension $n$ :
$$
V_{h}=\operatorname{Span}\left\{\phi_{1}, \ldots, \phi_{n}\right\}
$$
i.e, the functions $\phi_{i}$ form a basis for $V_{h} .$ Let $u_{h} \in V_{h}$ and $f \in L^{2}(\Omega)$ such that
$$
\int_{\Omega} \nabla u_{h} \cdot \nabla v_{h}=\int_{\Omega} f v_{h}, \quad \forall v_{h} \in V_{h} .
$$
How do I show that
(i) For all $1 \leq i \leq N$
$$
\int_{\Omega} \nabla u_{h} \cdot \nabla \phi_{i}=\int_{\Omega} f \phi_{i}
$$
(ii) For all $v_{h} \in V_{h}$
$$
\int_{\Omega} \nabla u_{h} \cdot \nabla v_{h}=\int_{\Omega} f v_{h}
$$
are equivalent?

Keep in mind that, since $\{\phi_i\}$ is a basis of $V_h$, any $v_h \in V_h$ can be represented as $v_h = \sum_i \alpha_i \phi_i$. So, $(i) \Rightarrow (ii)$ is justified by
\begin{align*}
\int_{\Omega} \nabla u_h \cdot \nabla v_h = &\int_{\Omega} \nabla u_h\cdot \nabla\left(\sum_ i \alpha_i \phi _i\right) = \sum_i \alpha_i \int_{\Omega}\nabla u_h \cdot \nabla \phi_i\\
 = & \sum_i \alpha_i \int_{\Omega} f \phi_i = \int_{\Omega} f \sum_i \alpha_i \phi_i = \int_{\Omega} f v_h
\end{align*}
$(ii) \Rightarrow (i)$ is trivial... If the relation holds for any $v_h \in V_h$, it also holds for the basis functions.
