Actually, you don't define the "direct product" of two matrices, that's the wrong word. The direct product is a product of sets, not matrices. What youj are talking about, , is the "outer product" or "tensor product". It is an array of all possible products of numbers in A times numbers in B "organized" in four-dimensional array. If A is an n by m matrix then it has mn numbers in it in n rows and m columns. If B is an P by Q matrix then it has PQ numbers in it in P rows and Q columns. would have mnPQ members arranged along 4 axes, m numbers along one axis, n along another, P along the third axis, and Q along the fourth. Of course, that would be very hard to write in three dimensional space, not to mention a two dimensional page!
What you might do is this: write the first (ij= 11) number in B times each member of A as an m by n matrix. Write the next number in the first row (ij= 12) of B times each member of A as another m by n matrix immediately below it. Do that for each of the Q members of the first row of B. Then, on a new page repeat with the numbers on the second row of B. Do that, using a new page, for each of the P rows of B. You will now have P pages, each containing Q n by m matrices, giving a full representation of .
For example, if m= n= P= Q= 2, so that A and B are 2 by two matrices, say
then the first page would have the two matrices
(The "2" in the B matrix times A) and
(the "1" in the B matrix times A) while the second page would have
showing all 2 x 2 x 2 x 2= 16 numbers in in a "2 by 2 by 2 by 2" array.