tans(a)*b for NxN * NxP matrices