Tag Info

Hot answers tagged

3

This behavior is present in both version 7 and version 10 (Windows). Illustrated: IdentityMatrix[2] // matrixform {{1, 0}, {0, 1}} // matrixform There is a difference between {{1, 0}, {0, 1}} and (the evaluated form of) IdentityMatrix[2]: the latter is a packed array. {{1, 0}, {0, 1}} // Developer`PackedArrayQ IdentityMatrix[2] // ...


2

I can't explain this strange behaviour of GridBox. But replacing it with Grid I get the desired output (also with a.a // matrixform) matrixform[mat_] := TraditionalForm[ DisplayForm[ RowBox[{StyleBox["[", SpanMaxSize -> \[Infinity]], Grid[mat], StyleBox["]", SpanMaxSize -> \[Infinity]]}]]]; To align the numbers properly use Grid[mat, ...



Only top voted, non community-wiki answers of a minimum length are eligible