Let $\Omega\subset \mathbb{R}^{2}$ and $\tau_{h} = \{\Omega_{k}\}_{k=1}^{N}$ be a triangulation of $\Omega$. The $L^2$ error for a FEM approximation $u_{h}$ is given by:
$ || u-u_{h} ||_{L^2} = \sqrt{ \int_{\Omega} \left( u-u_{h} \right)^2 } = \sqrt{ \sum_{k=1}^{N} \int_{\Omega_{k}} \left( u-u_{h}^{k} \right)^2 } $.
Where $u_{h}^{k}$ is the approximation in the element $\Omega_{k}$. Suppose that I also have an approximation $q_{h} = ( q_{1h}, q_{2h} )$ for the gradient $q = ( q_{1}, q_{2} ) = \nabla u$.
My question is: how do you compute the $L^{2}$ error for the gradient? i.e, $|| q-q_{h} ||_{L^2} =$ ?
I was thinking in something like $|| q-q_{h} ||_{L^2} = \sqrt{\int_{\Omega} \left( q_{1}-q_{1h}^{k} \right)^2+\int_{\Omega} \left( q_{2}-q_{2h}^{k} \right)^2 } $, but I'm not sure if it is correct. Thanks!