Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Documentation  / Mathematica / Built-in Functions  / Advanced Documentation / Linear Algebra / Matrix and Tensor Operations /

 

Visualization of Matrices

This section reviews the functions that are available for formatting and plotting matrices.

Formatting Matrices

Matrices can be formatted with the function MatrixForm.

In[1]:=

Out[2]//MatrixForm=

MatrixForm also works for vectors and higher rank tensors; the braces can help to understand the grouping.

In[3]:=

Out[3]//MatrixForm=

Plotting Matrices

A convenient way to plot matrices is with the function MatrixPlot. It is defined in the package LinearAlgebra`MatrixManipulation`. First, the package must be loaded.

In[1]:=

In[2]:=

Out[3]//MatrixForm=

In[4]:=

MatrixPlot has a number of graphics options for controlling the appearance of the plot. Many of these are the typical options of Mathematica DensityGraphics objects. It also has a special option, MaxMatrixSize, that controls the maximum size for the display of a matrix. Above this size the matrix is downsampled. Some of the important options are summarized in the following.

Options of MatrixPlot.

By default, no mesh is drawn around the elements; this can be enabled with the Mesh option. Typically you would not want to draw the mesh if the matrix is very large. When the mesh is drawn, it has a default style that uses white lines in order to reduce interference with the picture. The style of the mesh can be altered with the MeshStyle option.

In[5]:=

Color can be given to the picture with the ColorFunction option.

In[6]:=



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information


 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: