Suppose B:U-> V and A:V->W. The rank of B is the dimension of B(U) in V, the rank of A is the dimension of A(V)->W, and the rank of AB is the dimension of AB(U) in W. In order that z be in AB(U), it must be in A(V) so that z= A(y) for some y in U. And y must be in B(U) so that y= Bx for some x in U.