Legacy Documentation

Mathematica® Teacher's Edition (2002)

This is documentation for an obsolete product.
Current products and services
 Documentation /  Mathematica Teacher's Edition /  The Teacher's Book /  Front Matter /  Tour of Mathematica /

Vectors and Matrices

Mathematica TE represents a vector as a list.

In[1]:= v = {a, b, c}

Out[1]=

You can add two vectors together term by term.

In[2]:= v + {-1, 0, 1}

Out[2]=

You can also multiply a vector by a number.

In[3]:= 10 v

Out[3]=

This is the dot product of two vectors.

In[4]:= v . {x, y, z}

Out[4]=

This generates a matrix whose element is . Mathematica TE represents the matrix as a list of lists.

In[5]:= m = Table[ 1 / (i + j + 1), {i, 3}, {j, 3} ]

Out[5]=

The matrix can also be shown as a two-dimensional array.

In[6]:= MatrixForm[ % ]

Out[6]//MatrixForm=

This is the product of the matrix m and v, treated here as a column vector.

In[7]:= m . v

Out[7]=

Here is the inverse of the matrix.

In[8]:= Inverse[ m ]

Out[8]=

Multiplying the inverse by the original matrix gives the identity matrix.

In[9]:= % . m

Out[9]=

Mathematica TE can also manipulate symbolic matrices. This finds the eigenvectors of a matrix.

In[10]:= Eigenvectors[ {{a, b}, {-b, 2a}} ]

Out[10]=