How many eigenvalues of a Gaussian random matrix are positive?
We study the probability distribution of the index N{sub +}, i.e., the number of positive eigenvalues of an NxN Gaussian random matrix. We show analytically that, for large N and large N{sub +} with the fraction 0{<=}c=N{sub +}/N{<=}1 of positive eigenvalues fixed, the index distribution P(N{sub +}=cN,N){approx}exp[-{beta}N{sup 2}{Phi}(c)] where {beta} is the Dyson index characterizing the Gaussian ensemble. The associated large deviation rate function {Phi}(c) is computed explicitly for all 0{<=}c{<=}1. It is independent of {beta} and displays a quadratic form modulated by a logarithmic singularity around c=1/2. As a consequence, the distribution of the index has a Gaussian form near the peak, but with a variance {Delta}(N) of index fluctuations growing as {Delta}(N){approx}lnN/{beta}{pi}{sup 2} for large N. For {beta}=2, this result is independently confirmed against an exact finite-N formula, yielding {Delta}(N)=lnN/2{pi}{sup 2}+C+O(N{sup -1}) for large N, where the constant C for even N has the nontrivial value C=({gamma}+1+3ln2)/2{pi}{sup 2}{approx_equal}0.185 248... and {gamma}=0.5772... is the Euler constant. We also determine for large N the probability that the interval [{zeta}{sub 1},{zeta}{sub 2}] is free of eigenvalues. Some of these results have been announced in a recent letter [Phys. Rev. Lett. 103, 220603 (2009)].