MatrixForm

MatrixForm[list]
prints with the elements of list arranged in a regular array.

Details and OptionsDetails and Options

  • In StandardForm the array is shown enclosed in parentheses.
  • MatrixForm prints a single-level list in a column. It prints a two-level list in standard matrix form. More deeply nested lists are by default printed with successive dimensions alternating between rows and columns.
  • Elements in each column are by default centered.
  • MatrixForm prints SparseArray objects like the corresponding ordinary lists. »
  • MatrixForm takes the same set of options as TableForm.
  • MatrixForm acts as a "wrapper", which affects printing, but not evaluation.

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Show the matrix form of a matrix:

In[1]:=
Click for copyable input
Out[1]//MatrixForm=

Show the matrix form of a SparseArray:

In[1]:=
Click for copyable input
Out[1]//MatrixForm=

Show vector, matrix, and general arrays in matrix form:

In[1]:=
Click for copyable input
Out[1]//MatrixForm=
In[2]:=
Click for copyable input
Out[2]//MatrixForm=
In[3]:=
Click for copyable input
Out[3]//MatrixForm=
In[4]:=
Click for copyable input
Out[4]//MatrixForm=
New in 1 | Last modified in 5
New to Mathematica? Find your learning path »
Have a question? Ask support »