[ QUOTE ]
is it even possible to invert a non square matrix?
I didnt think it was.. but, like I said, Im not that knowledgeable of matrices
(also... yeah, it does seem like the only way is to RR it)
[/ QUOTE ]
http://en.wikipedia.org/wiki/Pseudoinverse
This problem is generally not solvable when n>m. If m>n, and A has full column rank, you can use a least-squares method where norm(C-AB) is minimized. For a well-conditioned A you can probably just solve the normal equation, but most likely you'll need to use a QR or SVD decomposition. It's pretty easy to automate with python.