Suppose there is a group-homomorphism $f: G \rightarrow \operatorname{GL}(n,K)$ with $a\mapsto A, b\mapsto B$ for a group $G$ which is generated by two elements $a,b$ and matrices $A,B \in \operatorname{GL}(n,K)$. How can you calculate here the $f$-invariant subspaces of $K^n$?
My problem here is, that there are two matrices $A$ and $B$. If $f$ would be defined just by one matrix $A$ than I can get the $f$-invariant subspaces by calculating the generalized eigenspaces (for n=2 just the normal eigenspaces) of $A$. What do I have to do when there is a second matrix $B$ and why?
Could someone help me please.