next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
SVDComplexes :: numericRank

numericRank

Synopsis

Description

The singular value decomposition (over RR53, or CC53) of the matrix A is performed. If there is a large cutoff in the list of singular values, that value separates the zero singular values from the rest, and the number of singular values larger than this separating value is called the numeric rank.

i1 : B = random(RR^30, RR^5);

                30          5
o1 : Matrix RR     <--- RR
              53          53
i2 : C = random(RR^5, RR^30);

                5          30
o2 : Matrix RR    <--- RR
              53         53
i3 : A = B*C;

                30          30
o3 : Matrix RR     <--- RR
              53          53
i4 : numericRank A

o4 = 5
i5 : first SVD A

o5 = {37.3735    }
     {2.8333     }
     {2.49293    }
     {2.28935    }
     {1.7274     }
     {3.60295e-15}
     {1.24642e-15}
     {1.0415e-15 }
     {9.71987e-16}
     {8.56417e-16}
     {8.21847e-16}
     {7.89317e-16}
     {6.88109e-16}
     {6.266e-16  }
     {5.83289e-16}
     {4.92587e-16}
     {4.5758e-16 }
     {4.03786e-16}
     {3.59374e-16}
     {3.25317e-16}
     {3.195e-16  }
     {2.75268e-16}
     {2.1614e-16 }
     {1.88786e-16}
     {1.65339e-16}
     {1.23697e-16}
     {8.90312e-17}
     {3.24246e-17}
     {1.69578e-17}
     {1.02864e-17}

o5 : VerticalList
i6 : B = mutableMatrix random(RR^100, RR^50);
i7 : C = mutableMatrix random(RR^50, RR^100);
i8 : A = B*C;
i9 : numericRank A

o9 = 50
i10 : B = mutableMatrix random(CC^100, CC^50);
i11 : C = mutableMatrix random(CC^50, CC^100);
i12 : A = B*C;
i13 : numericRank A

o13 = 50

Caveat

The heuristic for determining approximate rank is just that: a heuristic. Thus if you really need to make sure the answer is correct or meaningful, you should review the singular values yourself

See also

Ways to use numericRank :