Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur 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 /

 

1. Introduction

Mathematica has a broad range of functions to support linear algebra operations and to integrate them into the system. It can work with vectors, matrices, and tensors that can contain machine-precision floating point numbers, arbitrary-precision floating point numbers, complex floating point numbers, integers, rational numbers, and general symbolic quantities. Linear algebra operations are supported for matrices that contain all these different types of entry.

While Mathematica supports both dense and sparse matrices, the initial parts of this document will concentrate on dense matrices; sparse matrices are documented in their own section. In general, all the operations that work on dense matrices work on sparse matrices in an equivalent way.

Matrices are represented in Mathematica with lists. They can be entered directly with the { } notation that Mathematica provides for lists.

They can be created programmatically with Table.

You can extract size information.

It is also possible to test if something is a matrix.

MatrixForm helps to make the structure of the matrix clearer.

Matrices are important in many areas of computation because they are an efficient way to represent linear systems of equations. Many computer applications can work with matrices because they can work efficiently with arrays of numbers. However, Mathematica can also work directly with the systems of linear equations the matrices represent. Here, a matrix is multiplied by a vector of the unknowns and a system of equations is formed.

These equations can be solved with the algebraic equation solver, Solve.

Alternatively, the matrix representation of the equations can be solved directly with the LinearSolve command.

Conversion between matrices and the linear systems they represent is often useful in order to understand the underlying principles. Using one form or the other can also be a very useful way to set up particular problems.


In[1]:=

Out[1]=

In[2]:=

Out[2]=

In[3]:=

Out[3]=

In[4]:=

Out[4]=

In[5]:=

Out[5]=

In[6]:=

Out[6]//MatrixForm=

In[7]:=

Out[8]=

In[9]:=

Out[9]=

In[10]:=

Out[10]=



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: