What's the easiest way of making diagrams depicting matrix dimensions such as the following?
I can do it with simple subscripts, but I like the visual effect that these diagrams give.
Here I do it with stacks, setting the indices below the boxes. The primary macro is
A helper macro is
I introduce the factor
EDITED to set array indices in
Just to clarify, in case it wasn't clear. One can use actual (very large) matrix dimensions, as long as one scales suitably small. For example, the following works::
This is one possible solution via
Here is a way to do it "manually."
Obviously this doesn't compare to Mr. Segletes's powerful and general answer! It does use more basic commands, however, which could have the benefits that it's quicker to compile on a slow machine, and it will work even with a smaller installation that's lacking in packages. Or perhaps you just like getting your hands dirty. The drawback, of course, is that you have to determine all the widths, heights, and depths yourself.
Note: if you use