When writing fractions, Mathematica has a quite intelligent behaviour: If the fraction gets too long to fit on the width of the notebook, it is automatically replaced by
However, by default nothing like this happens for matrices given in
MatrixForm. Therefore my question is: Is it possible to write a
DecayingMatrixForm which shows as
MatrixForm if the matrix fits into the notebook's width, but switches to showing the list when the notebook is resized to be more narrow?
If that is not possible, is it at least possible to have that decision dependent on the current notebook width when first displaying the matrix?
Note that the solution should work correctly also if
MatrixForm is used inside an expression, as in