Both Howard Eves' Elementary Matrix Theory and Howard Anton's Elementary Linear Algebra(at least since 7th ed., I'm not sure about before that) both cover the conditions that need to hold on the partitions in order to multiply block matrices using the products of the respective blocks.