MatrixRank
Usage
Notes
Further Examples
Here is a matrix.
In[1]:=
|
Out[1]//MatrixForm=
|
The rank of a matrix of exact numbers is computed by row reduction.
In[2]:=
|
Out[2]=
|
The rank of a matrix of inexact numbers can be computed by taking the length of the list of positive singular values of the matrix.
In[3]:=
|
Out[3]=
|
Using the option Tolerance gives a different result.
In[4]:=
|
Out[4]=
|
The difference is due to the algorithm, which generates roundoff errors. Usually Mathematica replaces small numbers of order $MachineEpsilon with unless Tolerance is set to .
In[5]:=
|
Out[5]=
|
In[6]:=
|
Out[6]=
|
In[7]:=
|
Out[7]=
|
Sometimes using higher precision will help to correctly determine the rank.
In[8]:=
|
Out[8]=
|
The rank of a matrix is the difference between the dimension of the range and the dimension of the null space.
In[9]:=
|
Out[9]=
|
MatrixRank works with symbolic matrices.
In[10]:=
|
Out[10]=
|
MatrixRank also works with complex matrices.
In[11]:=
|
Out[11]=
|
You can set Tolerance to be large.
In[12]:=
|
Out[12]=
|
In[13]:=
|
Out[13]=
|
In[14]:=
|
|