WOLFRAM LANGUAGE TUTORIAL

Entering Tables and Matrices

The Wolfram System front end provides an Insert Table/Matrix submenu for creating and editing arrays with any specified number of rows and columns. Once you have such an array, you can edit it to fill in whatever elements you want.

The Wolfram Language treats an array like this as a matrix represented by a list of lists.
In[1]:=
Click for copyable input
Out[1]=
Putting parentheses around the array makes it look more like a matrix, but does not affect its interpretation.
In[2]:=
Click for copyable input
Out[2]=
Using MatrixForm tells the Wolfram Language to display the result of the Transpose as a matrix.
In[3]:=
Click for copyable input
Out[3]//MatrixForm=
Ctrl+,add a column
Ctrl+Enteradd a row
Tabgo to the next or element
Ctrl+Spacemove out of the table or matrix

Entering tables and matrices.

Note that you can use Ctrl+, and Ctrl+Enter to start building up an array, and particularly for small arrays this is often more convenient than using the New menu item in the Table/Matrix submenu. The Table/Matrix menu items typically allow you to make basic adjustments, such as drawing lines between rows or columns.

Entering a Piecewise expression is a special case of entering a table.

Enter the \[Piecewise] character and press Ctrl+, to get a template of placeholders for two cases.
In[4]:=
Click for copyable input
Fill in the placeholders to complete the piecewise expression.
In[5]:=
Click for copyable input
To add additional cases, use Ctrl+Enter.
In[6]:=
Click for copyable input

You can make an element in a table span over multiple rows or columns by selecting the entire block that you want the element to span and using the Insert Table/Matrix Make Spanning menu command. To split a spanning element into individual components, use Insert Table/Matrix Split Spanning.

To make the top element span across both columns, first select the row.
In[7]:=
Click for copyable input
Now use the Make Spanning menu command.
In[8]:=
Click for copyable input