IsTotallyNonsingular: Difference between revisions

From QETLAB
Jump to navigation Jump to search
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
|name=IsTotallyNonsingular
|name=IsTotallyNonsingular
|desc=Determines whether or not a matrix is [[totally nonsingular]]
|desc=Determines whether or not a matrix is [[totally nonsingular]]
|req=[[opt_args]]<br />[[sporth]]
|rel=[[IsTotallyPositive]]
|rel=[[IsTotallyPositive]]
|cat=[[List of functions#Miscellaneous|Miscellaneous]]
|upd=December 13, 2012
|upd=December 13, 2012
|v=1.00}}
|v=1.00}}
<tt>'''IsTotallyNonsingular'''</tt> is a [[List of functions|function]] that determines whether or not a given matrix is [[totally nonsingular]] (i.e., all of its square submatrices are nonsingular). The input matrix can be either full or sparse and, if requested, a submatrix that is singular can be returned.
<tt>'''IsTotallyNonsingular'''</tt> is a [[List of functions|function]] that determines whether or not a given matrix is [[totally nonsingular]] (i.e., all of its square submatrices are nonsingular). The input matrix can be either full or sparse.


==Syntax==
==Syntax==
Line 27: Line 27:
===The [[Fourier matrix]]===
===The [[Fourier matrix]]===
A well-known result of Cebotarev says that the [[quantum Fourier matrix]] is totally nonsingular in prime dimensions<ref>M. Newman. On a theorem of Cebotarev. <em>Linear Multilinear Algebra</em>, 3:259&ndash;262, 1976.</ref>, which we can verify in the 5-by-5 case as follows:
A well-known result of Cebotarev says that the [[quantum Fourier matrix]] is totally nonsingular in prime dimensions<ref>M. Newman. On a theorem of Cebotarev. <em>Linear Multilinear Algebra</em>, 3:259&ndash;262, 1976.</ref>, which we can verify in the 5-by-5 case as follows:
<pre<noinclude></noinclude>>
<syntaxhighlight>
>> IsTotallyNonsingular([[FourierMatrix|FourierMatrix(5)]])
>> IsTotallyNonsingular(FourierMatrix(5))


ans =
ans =


     1
     1
</pre<noinclude></noinclude>>
</syntaxhighlight>


When the dimension is composite, the Fourier matrix is <em>not</em> totally nonsingular. For example, the following code shows in the 6-dimensional case a 2-by-2 submatrix of the Fourier matrix that is singular:
When the dimension is composite, the Fourier matrix is <em>not</em> totally nonsingular. For example, the following code shows in the 6-dimensional case a 2-by-2 submatrix of the Fourier matrix that is singular:


<pre<noinclude></noinclude>>
<syntaxhighlight>
>> F = FourierMatrix(6);
>> F = FourierMatrix(6);
>> [itn,wit] = IsTotallyNonsingular(F)
>> [itn,wit] = IsTotallyNonsingular(F)
Line 57: Line 57:
   0.4082            0.4082           
   0.4082            0.4082           
   0.4082            0.4082
   0.4082            0.4082
</pre<noinclude></noinclude>>
</syntaxhighlight>


===Almost all matrices are totally nonsingular===
===Almost all matrices are totally nonsingular===
A randomly-chosen matrix will, with probability 1, be totally nonsingular:
A randomly-chosen matrix will, with probability 1, be totally nonsingular:
<pre<noinclude></noinclude>>
<syntaxhighlight>
>> IsTotallyNonsingular(randn(10))
>> IsTotallyNonsingular(randn(10))


Line 67: Line 67:


     1
     1
</pre<noinclude></noinclude>>
</syntaxhighlight>


==Notes==
==Notes==
In practice, this function is practical for matrices of size up to about 15-by-15.
In practice, this function is practical for matrices of size up to about 15-by-15.
{{SourceCode|name=IsTotallyNonsingular}}


==References==
==References==
<references />
<references />

Latest revision as of 15:43, 29 September 2014

IsTotallyNonsingular
Determines whether or not a matrix is totally nonsingular

Other toolboxes required none
Related functions IsTotallyPositive
Function category Miscellaneous

IsTotallyNonsingular is a function that determines whether or not a given matrix is totally nonsingular (i.e., all of its square submatrices are nonsingular). The input matrix can be either full or sparse.

Syntax

  • ITN = IsTotallyNonsingular(X)
  • ITN = IsTotallyNonsingular(X,SUB_SIZES)
  • ITN = IsTotallyNonsingular(X,SUB_SIZES,TOL)
  • [ITN,WIT] = IsTotallyNonsingular(X,SUB_SIZES,TOL)

Argument descriptions

Input arguments

  • X: A matrix.
  • SUB_SIZES (optional, default 1:min(size(X))): A vector specifying the sizes of submatrices to be checked for nonsingularity.
  • TOL (optional, default length(X)*eps(norm(X,'fro'))): The numerical tolerance used when determining nonsingularity.

Output arguments

  • ITN: A flag (either 1 or 0) indicating that X is or is not totally nonsingular.
  • WIT (optional): If ITN = 0 then WIT specifies a submatrix of X that is singular. More specifically, WIT is a matrix with 2 rows such that X(WIT(1,:),WIT(2,:)) is singular.

Examples

A well-known result of Cebotarev says that the quantum Fourier matrix is totally nonsingular in prime dimensions[1], which we can verify in the 5-by-5 case as follows:

>> IsTotallyNonsingular(FourierMatrix(5))

ans =

     1

When the dimension is composite, the Fourier matrix is not totally nonsingular. For example, the following code shows in the 6-dimensional case a 2-by-2 submatrix of the Fourier matrix that is singular:

>> F = FourierMatrix(6);
>> [itn,wit] = IsTotallyNonsingular(F)

itn =

     0


wit =

     1     3
     1     4

>> F([1,3],[1,4])

ans =

   0.4082             0.4082          
   0.4082             0.4082

Almost all matrices are totally nonsingular

A randomly-chosen matrix will, with probability 1, be totally nonsingular:

>> IsTotallyNonsingular(randn(10))

ans =

     1

Notes

In practice, this function is practical for matrices of size up to about 15-by-15.

Source code

Click here to view this function's source code on github.

References

  1. M. Newman. On a theorem of Cebotarev. Linear Multilinear Algebra, 3:259–262, 1976.