Path: news.mathworks.com!newsfeed-00.mathworks.com!newscon02.news.prodigy.net!prodigy.net!wns13feed!worldnet.att.net!199.45.49.37!cyclone1.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny03.POSTED!702e7bde!not-for-mail
From: James Tursa <aclassyguywithaknotac@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: generate a positive semi-definite matrices??
Message-ID: <3dkuq3ls0516g4inapn6hvll7sac7k44np@4ax.com>
References: <b082bc0e-5d7a-4bcf-ab79-478ad6a820f9@e4g2000hsg.googlegroups.com> <fols5h$e71$1@fred.mathworks.com> <fomfee$os8$1@fred.mathworks.com>
X-Newsreader: Forte Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 58
Date: Sun, 10 Feb 2008 19:52:17 GMT
NNTP-Posting-Host: 71.112.98.218
X-Complaints-To: abuse@verizon.net
X-Trace: trndny03 1202673137 71.112.98.218 (Sun, 10 Feb 2008 14:52:17 EST)
NNTP-Posting-Date: Sun, 10 Feb 2008 14:52:17 EST
Xref: news.mathworks.com comp.soft-sys.matlab:450469


On Sun, 10 Feb 2008 09:17:02 +0000 (UTC), "Roger Stafford"
<ellieandrogerxyzzy@mindspring.com.invalid> wrote:

>"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in 
>message <fols5h$e71$1@fred.mathworks.com>...
>> ..............
>> 2. Check that M is positive semi-definite:
>> 
>>  all(diag(eig((M+M')/2))) >= 0
>> 
>> If this is true, then M is positive semi-definite
>---------
>  In the check for M to be positive semi-definite I should have written:
>
> all(eig((M+M')/2)) >= 0
>
>I forgot that eig with only one output produces a vector result, not a square 
>array, and the diag operation should not be used.
>
>  Second observation: There seem to be two definitions of a semi-definite 
>matrix floating around.  One, as for example in Wikipedia, insists that it both 
>be Hermitian and have non-negative eigenvalues.  The other definition, as for 
>example in MathWorld and which I have used here, requires only that its 
>Hermitian part, (M+M')/2, have non-negative eigenvalues.
>
>Roger Stafford
>

Where, exactly, are you getting these definitions from? Can you post
some web links? The Hermitian restriction does not agree with my
understanding at all. For a matrix M to be positive semi-definite, it
simply has to satisfy this (which I am sure you already know but I
repeat for others):

   x' * M * x >= 0   for all non-zero vectors x

where x' is the complex conjugate transpose operator.

And testing the sign of all of the eigenvalues of M is a necessary and
sufficient test for this. I am not sure what the M + M' calculation in
your post (from other links) has to do with this. For example, see
this wiki link which agrees with my understanding:

http://en.wikipedia.org/wiki/Positive-definite_matrix

Here is an example of a random matrix I generated in MATLAB that is
not Hermitian but is positive semi-definite:

   0.95012928514718   0.48598246870930   0.45646766516834
   0.23113851357429   0.89129896614890   0.01850364324822
   0.60684258354179   0.76209683302739   0.82140716429525

A Hermitian matrix  (i.e., where isequal(M,M') is true ) *will* be
positive semi-definite (an easy thing to prove), but it is not a
necessary condition for positive semi-definiteness. Perhaps this is
where the confusion is?

James Tursa