Re: [R] Beginning Eigen System question.
Which other Linear Algebra system, and which function did you use in R? Cheers Joris On Thu, Jun 24, 2010 at 12:32 AM, rkevinbur...@charter.net wrote: Forgive me if I missunderstand a basic Eigensystem but when I present the following matrix to most any other LinearAlgebra system: 1 3 1 1 2 2 1 1 3 I get an answer like: //$values //[1] 5.00e+00 1.00e+00 -5.536207e-16 //$vectors // [,1] [,2] [,3] //[1,] 0.5773503 -0.8451543 -0.9428090 //[2,] 0.5773503 -0.1690309 0.2357023 //[3,] 0.5773503 0.5070926 0.2357023 But R gives me: //$values //[1] 5.00e+00 1.00e+00 -5.536207e-16 //$vectors // [,1] [,2] [,3] //[1,] -0.5773503 -0.8451543 -0.9428090 //[2,] -0.5773503 -0.1690309 0.2357023 //[3,] -0.5773503 0.5070926 0.2357023 The only difference seems to be the sign on the first eigen vector. What am I missing? Kevin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control tel : +32 9 264 59 87 joris.m...@ugent.be --- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Beginning Eigen System question.
On Thu, Jun 24, 2010 at 12:41 AM, Joris Meys jorism...@gmail.com wrote: Which other Linear Algebra system, and which function did you use in R? Cheers Joris Never mind, off course you used eigen()... Eigenvectors are only determined up to a constant. If I'm not mistaken (but check the help files on it), R normalizes the eigenvectors (and so does your other Linear Algebra system). This makes the eigenvectors defined up to the sign. Cheers Joris On Thu, Jun 24, 2010 at 12:32 AM, rkevinbur...@charter.net wrote: Forgive me if I missunderstand a basic Eigensystem but when I present the following matrix to most any other LinearAlgebra system: 1 3 1 1 2 2 1 1 3 I get an answer like: //$values //[1] 5.00e+00 1.00e+00 -5.536207e-16 //$vectors // [,1] [,2] [,3] //[1,] 0.5773503 -0.8451543 -0.9428090 //[2,] 0.5773503 -0.1690309 0.2357023 //[3,] 0.5773503 0.5070926 0.2357023 But R gives me: //$values //[1] 5.00e+00 1.00e+00 -5.536207e-16 //$vectors // [,1] [,2] [,3] //[1,] -0.5773503 -0.8451543 -0.9428090 //[2,] -0.5773503 -0.1690309 0.2357023 //[3,] -0.5773503 0.5070926 0.2357023 The only difference seems to be the sign on the first eigen vector. What am I missing? Kevin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control tel : +32 9 264 59 87 joris.m...@ugent.be --- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php -- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control tel : +32 9 264 59 87 joris.m...@ugent.be --- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Beginning Eigen System question.
Eigenvectors are unique only up to a constant factor, so any scalar multiple of an eigenvector is also an eigenvector. By convention, most (all) packages normalize the eigenvectors such that their norm is 1. Therefore, eigenvectors are unique up to their sign, i.e. if (+x) is an eigenvector corresponding to an eigenvalue, then (-x) is also an eigenvector for the same eigenvalue. Hope this helps, Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of rkevinbur...@charter.net Sent: Wednesday, June 23, 2010 6:32 PM To: r-help@r-project.org Subject: [R] Beginning Eigen System question. Forgive me if I missunderstand a basic Eigensystem but when I present the following matrix to most any other LinearAlgebra system: 1 3 1 1 2 2 1 1 3 I get an answer like: //$values //[1] 5.00e+00 1.00e+00 -5.536207e-16 //$vectors // [,1] [,2] [,3] //[1,] 0.5773503 -0.8451543 -0.9428090 //[2,] 0.5773503 -0.1690309 0.2357023 //[3,] 0.5773503 0.5070926 0.2357023 But R gives me: //$values //[1] 5.00e+00 1.00e+00 -5.536207e-16 //$vectors // [,1] [,2] [,3] //[1,] -0.5773503 -0.8451543 -0.9428090 //[2,] -0.5773503 -0.1690309 0.2357023 //[3,] -0.5773503 0.5070926 0.2357023 The only difference seems to be the sign on the first eigen vector. What am I missing? Kevin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Beginning Eigen System question.
Kevin, At 3:32 PM -0700 6/23/10, rkevinbur...@charter.net wrote: Forgive me if I missunderstand a basic Eigensystem but when I present the following matrix to most any other LinearAlgebra system: 1 3 1 1 2 2 1 1 3 I get an answer like: //$values //[1] 5.00e+00 1.00e+00 -5.536207e-16 //$vectors // [,1] [,2] [,3] //[1,] 0.5773503 -0.8451543 -0.9428090 //[2,] 0.5773503 -0.1690309 0.2357023 //[3,] 0.5773503 0.5070926 0.2357023 But R gives me: //$values //[1] 5.00e+00 1.00e+00 -5.536207e-16 //$vectors // [,1] [,2] [,3] //[1,] -0.5773503 -0.8451543 -0.9428090 //[2,] -0.5773503 -0.1690309 0.2357023 //[3,] -0.5773503 0.5070926 0.2357023 The only difference seems to be the sign on the first eigen vector. What am I missing? The sign of the eigen vectors is arbitrary. From ?eigen Recall that the eigenvectors are only defined up to a constant: even when the length is specified they are still only defined up to a scalar of modulus one (the sign for real matrices). Bill Kevin __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.