You should probably rename this as just `match` - I named it `rmatch` to not clash with other match variables in the main code.

Here and above, you can use docstrings rather than inline comment blocks. You should also say that a2*b1 -a1*b2 is also being returned.