Hey, all Given a square matrix, how can I check if this matrix is positive definite or not? Thanks. Fred
Dear Feng Zhang, If the matrix is *symmetric* and positive-definite, then all of its eigenvalues are positive. I hope that this helps, John At 01:17 PM 3/22/2003 -0600, Feng Zhang wrote:>Given a square matrix, how can I check if this matrix >is positive definite or not?----------------------------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: jfox at mcmaster.ca phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox -----------------------------------------------------
> tst <- array(c(1,2,2,1), dim=c(2,2))> eigen(tst) $values [1] 3 -1 $vectors [,1] [,2] [1,] 0.7071068 0.7071068 [2,] 0.7071068 -0.7071068 Does this answer your question? Spencer Graves Feng Zhang wrote:> Hey, all > > Given a square matrix, how can I check if this matrix > is positive definite or not? > > Thanks. > > Fred > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help