_NB_: Evidently I used a different convention on divergence. In terms of matrix components my convention is $(\mathrm{div} M)_j = \sum_{i = 1}^2 \partial_{x^i} M_{ij}$. If your convention is $\sum_{i = 1}^2 \partial_{x^i} M_{ji}$, then everywhere I multiplied the divergence on the right by something, you should multiply on the left by the corresponding thing. ----- You don't even need all $a,b$. Let $I$ be the identity matrix and $R = \mathrm{diag}(1,-1) \in O(2)$ is the reflection matrix. With the diagonal being $I$, you have $$ \mathrm{div}(UV^T) = 0 $$ with the diagonal being $R$, you have $$ \mathrm{div}(UR V^T) = 0 \iff \mathrm{div}(URV^T R) = 0 $$ the latter because you are just multiplying on the right with a constant, full rank, matrix so it commutes with taking the divergence. Notice that $RV^TR = V$ by the conjugate action of the reflection on $SO(2)$. Locally we can lift $U, V$ to mappings to the Lie algebra, and since $SO(2)$ is abelian we have that for some real valued functions $u,v$ $$ U = \exp(i u), \quad V = \exp(i v) $$ and that $UV^T = \exp(i(u-v))$ and $UV = \exp(i(u+v))$. You have that $$ 0 = \mathrm{div}(UV^T) VU^T = id(u-v) $$ and similarly $$ 0 = \mathrm{div}(UV) V^T U^T = id(u+v) $$ adding and subtracting you find $du = dv = 0$.