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

Documentation / Mathematica / The Mathematica Book / A Practical Introduction to Mathematica / Input and Output in Notebooks /

1.10.5 Entering Tables and Matrices

The Mathematica front end typically provides a Create Table/Matrix/Palette menu item which allows you to create a blank array with any specified number of rows and columns. Once you have such an array, you can then edit it to fill in whatever elements you want.

Mathematica treats an array like this as a matrix represented by a list of lists.

In[1]:=

Out[1]=

Putting parentheses around the array makes it look more like a matrix, but does not affect its interpretation.

In[2]:=

Out[2]=

Using MatrixForm tells Mathematica to display the result of the Transpose as a matrix.

In[3]:=

Out[3]//MatrixForm=

Entering tables and matrices.

Note that you can use ControlKeyLeftModified,RightModified and ControlKeyLeftModifiedRightModified to start building up an array, and particularly for small arrays this is often more convenient than using the Create Table/Matrix/Palette menu item.

Section 2.9.11 will describe how to adjust many aspects of the appearance of arrays you create in Mathematica. The Create Table/Matrix/Palette menu item typically allows you to make basic adjustments, such as drawing lines between rows or columns.