I am not sure how to find the $H^{1}(D)$ inner product for two functions $u,v: D \rightarrow \mathbb{R}^2$, ($D \subset \mathbb{R}^2$). The inner product for scalar functions is defined as:
$\int_{D} f \; g \; dx + \int_{D} \nabla f \cdot \nabla g \; dx$
For extending this definition to vector valued functions, I found this link (Inner product for vector - valued functions) but it treats only the first term ($L^2$ norm). For the second term ($H^1$ seminorm), I tried to look up definitions of inner product for matrices but found multiple answers. Can someone please tell me which is the correct way to compute this?
Edit: I need to compute it for calculating the Gramian Matrix for a finite set of vector valued functions, with respect to the $H^1(D)$ norm. Is this the right way to do it?
Thank you!