Positive Eigenvalued Matrix

Author

Eric W. Weisstein
December 3, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/LinearAlgebra/PositiveEigenvaluedMatrix.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/PositiveEigenvaluedMatrix.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

(0,1)-Matrices

Numbers of nxn binary matrices

Table[2^(n^2),{n,5}]

a=Select[Matrices[3],PositiveEigenvaluedQ];
b=Select[Matrices[3],PositiveDefiniteQ];

Length/@{a,b}

MatrixForm/@Complement[b,a]

pd=({{x,y,z}}.#.{{x},{y},{z}})[[1,1]]&/@b;

And@@(Resolve[ForAll[{x,y,z},
(x|y|z)∈Reals&&x y z≠0,
#>0
]]&/@pd)

Counts of binary matrices with positive eigenvalues

Count[#,_?PositiveEigenvaluedQ]&/@Matrices/@Range[4]//Timing

Count[#,_?PositiveEigenvaluedQ]&/@Matrices/@Range[4]//Timing

Running in parallel (2003-07-10), a(5) = 29281

a[0]:=1
a[n_]:=a[n]=Sum[-(-1)^k Binomial[n,k]2^(k(n-k))a[n-k],{k,n}]

a/@Range[10]

l={1,3,25,543,29281,3781503,1138779265,783702329343,1213442454842881,4175098976430598143};

FindSequenceFunction[l]

FindLinearRecurrence[l]

FindGeneratingFunction[l,n,x]

2x2

MatrixForm/@(l=Select[Matrices[2],PositiveEigenvaluedQ])

Eigenvalues/@l

5x5

Size of a 5x5 matrix

Table[ByteCount[BinaryMatrix[5,Random[Integer,{0,10^6}]]],{10}]

Memory required for all 5x5 arrays

2^(5^2)160/10^9. Gigabyte

Number of chunks needed to fit into .5 GB machines

%/(.5 Gigabyte)

Approximate maximum chunk size

2^(5^2)/%

In practice, I seem to have to divide this by 3 to fit in 512 MB

29281

Symmetric (0,1)-Matrices

Length/@Table[Matrices[n],{n,4}]

Length/@Table[Select[Matrices[n],SymmetricQ],{n,4}]

Count[#,_?PositiveEigenvaluedQ]&/@Table[Select[Matrices[n],SymmetricQ],{n,4}]

Select[#,PositiveEigenvaluedQ]&/@Table[Select[Matrices[n],SymmetricQ],{n,2,4}]

Eigenvalues/@Select[#,PositiveEigenvaluedQ]&/@Table[Select[Matrices[n],SymmetricQ],{n,2,4}]

(-1,1)-Matrices

Table[Count[Matrices[n,{-1,1}],_?PositiveEigenvaluedQ],{n,4}]//Timing

Table[Count[Matrices[n,{-1,1}],_?PositiveEigenvaluedQ],{n,5,5}]//Timing

(-1,0,1)-Matrices

Counts

Table[Count[Matrices[n,{-1,0,1}],_?PositiveEigenvaluedQ],{n,3}]//Timing

4x4

Size of a 4x4 matrix

Table[ByteCount[Matrix101[4,Random[Integer,{0,10^6}]]],{10}]

Memory required for all 5x5 arrays

3^(4^2)456/10^9. Gigabyte

Number of chunks needed to fit into .5 GB machines

%/(.5 Gigabyte)

Approximate maximum chunk size

3^(4^2)/%

18905