This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

MatrixForm

MatrixForm[list]
prints with the elements of list arranged in a regular array.
  • 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 acts as a "wrapper", which affects printing, but not evaluation.
Show the matrix form of a matrix:
Show the matrix form of a SparseArray:
Show vector, matrix, and general arrays in matrix form:
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=
Matrices of numbers and formulas:
A matrix of lists:
Use options to control the layout directions:
Format a SparseArray in matrix form:
Specify the alignment of columns:
Set alignments for successive dimensions:
By default, all dimensions are formatted:
Only use matrix formatting for the outermost dimension:
By default, the outermost dimension is a column:
Format the first dimension as a row instead:
Specify headings for rows:
Specify headings for columns:
Specify headings for rows and columns:
The default automatic spacing:
Explicitly specify the spacing between rows and between columns:
Display special matrices with matrix formatting:
Matrices from a matrix decomposition:
Formula for a matrix multiplication:
Display a block matrix as a matrix of matrices:
The array flattened to a matrix:
MatrixForm formats arrays using standard matrix formatting:
TableForm formats arrays in a tabular form:
Grid formats two-dimensional arrays as a grid:
Use MatrixPlot to visualize the structure of large matrices:
Use ArrayPlot to visualize the structure of large discrete matrices:
Use Style to affect the display of MatrixForm:
Use any number form such as ScientificForm or BaseForm to affect the display of numbers:
New in 1 | Last modified in 5