Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
$q$ can be greater than the dimension. It only has to be a spanning set, not a basis. That actually takes a little bit of extra work. Also, this is mostly a local thing, so global topological issues don't come up too much. Because of this, I think it should be possible to turn this into a theorem about some kind of compatible families of vector fields defined locally. But my interests were towards a different sort of question, so I haven't pursued that yet.
I checked this by explicitly solving everything, and it's right. The equations are solved by $a=\pi/6$, $b=5\pi/6$, $c=-\pi/6$, $d=\pi/6$, for what it's worth.
Perhaps it's worth mentioning that if $C(n)$ is the best possible constant (so Fedor has shown $C(n)\leq n^{n/2}$), then $C(n)\leq C(nk)^{1/k}$, $\forall k$--as can be seen by creating a block diagonal matrix with $k$ copies of $A$ down the diagonal. This doesn't help much with Fedor's bound, but it shows that either $C(n)$ grows rapidly in $n$ or $C(n)=1$ for all $n$.