I am trying to derive Galerkin type weak formulation for the Stokes equations. I'm having a bit of a problem reconciling the notation in the integration by parts. I know that the answer I'm looking for is: $ \int_\Omega \Delta\mathbf{u}\cdot\mathbf{v}d\Omega = \int_\Gamma (\mathbf{n}\cdot\nabla\mathbf{u})\cdot\mathbf{v}d\Gamma - \int_\Omega \nabla\mathbf{u}:\nabla\mathbf{v}d\Omega $
When I integrate by parts myself I get: $ \int_\Omega \nabla u\cdot\mathbf{v}d\Omega = \int_\Gamma u(\mathbf{v}\cdot\mathbf{n})d\Gamma - \int_\Omega u \nabla\cdot\mathbf{v}d\Omega\\\ \quad\quad\quad \Rightarrow \int_\Omega\Delta\mathbf{u}\cdot\mathbf{v}d\Omega = \int_\Omega (\nabla\cdot (\nabla\mathbf{u}))\cdot\mathbf{v}d\Omega = \int_\Gamma \nabla\mathbf{u} (\mathbf{v}\cdot\mathbf{n})d\Gamma - \int_\Omega\nabla\mathbf{u}\nabla\cdot\mathbf{v}d\Omega $
I assume I should be using a dot product for the vector/matrix multiplication, but even so I can't reconcile my answer with what I know the correct answer to be. For instance the line integral should be a scalar, but with my answer $\nabla\mathbf{u}$ is a matrix and $\mathbf{v}\cdot\mathbf{n}$ is a scalar so I fail to see how their product could be a scalar.
I did notice that the formula I used applies for scalar $u$'s. Is there another identity I should be using when $u$ is a vector?