Added B*inv(A) function