0
$\begingroup$

Consider matrix $A=\left[\begin{matrix}1 & -2\\-2 & 1\\\end{matrix}\right]$, with characteristic equation $\begin{vmatrix}1-\lambda & -2\\-2 & 1-\lambda\\\end{vmatrix}=(\lambda+1)(\lambda-3)$

$\lambda_1=-1$ gives eigenvector $\begin{bmatrix}1\\1\\\end{bmatrix}$ and $\lambda_2=3$ gives eigenvector $\begin{bmatrix}-1\\1\\\end{bmatrix}$, resulting in $P=\begin{bmatrix}1&-1\\1&1\\\end{bmatrix}$

$D=P^TAP=\begin{bmatrix}1&1\\-1&1\\\end{bmatrix}\begin{bmatrix}1&-2\\-2&1\\\end{bmatrix}\begin{bmatrix}1&-1\\1&1\\\end{bmatrix}$ gives me $D=\begin{bmatrix}-1&0\\0&3\\\end{bmatrix}$

But, the answer tells me it's supposed to be $D=\begin{bmatrix}3&0\\0&-1\\\end{bmatrix}$

Does the order of eigenvalues and eigenvectors make a difference? If so, how? Or is both of the resulting $D$ "equal" and correct? Also, maybe I made a mistake somewhere...

Thank you!

$\endgroup$
  • $\begingroup$ It's $P^{-1}AP$ for eigenvalue decomposition. And no the order doesn't matter if you also change the order of the eigenvectors. $\endgroup$ – percusse Dec 8 '17 at 9:43
0
$\begingroup$

Or is both of the resulting $D$ "equal" and correct? Also, maybe I made a mistake somewhere...

Your answer is fine too, but it doesn't only change $D$, it's connected with $P$:

Does the order of eigenvalues and eigenvectors make a difference? If so, how?

The order of the eigenvalues on the diagonal in $D$, match the order of the corresponding eigenvectors in the columns of $P$ : if eigenvector $\vec v_i$ is in the $i$-th column of $P$, then the corresponding eigenvalue $\lambda_i$ is on the $ i$-th (diagonal) position in $D$ and vice versa.

$\endgroup$
  • $\begingroup$ Thank you! So it's just a matter of preference? If I want my i-th eigenvector to be the first "basis" then I use that in the first column of P, and its corresponding eigenvalue in the first diagonal position of D? Is that what you mean that it's "connected with P"? That it's dependent on my choice of P? $\endgroup$ – Defindun Dec 8 '17 at 10:11
  • $\begingroup$ @Defindun Indeed: the order of the eigenvalues in $D$ is directly linked to the order of the (corresponding) eigenvectors in $P$. You can choose the order of the eigenvalues (in $D$) or the eigenvectors (in $P$), but one choice will determine the other. $\endgroup$ – StackTD Dec 8 '17 at 10:19
  • $\begingroup$ Okey, so is there a "convention" or preference of what order to use? I wonder since my textbook actually told me the answer was the "opposite"? Thanks! $\endgroup$ – Defindun Dec 8 '17 at 10:24
  • $\begingroup$ @Defindun I don't think there is a convention. In some contexts, you might want to order the eigenvalues in a specific way (e.g. if they're real, in ascending or descending order) but usually there is no real preference. When there are more possible answers, textbooks often only give one. This can be confusing as it doesn't necessarily mean that this answer is the only correct one... $\endgroup$ – StackTD Dec 8 '17 at 10:27
0
$\begingroup$

$D_1=\left(\frac1{\sqrt{2}}\begin{bmatrix}1&1\\-1&1\\\end{bmatrix}\right)\begin{bmatrix}1&-2\\-2&1\\\end{bmatrix}\left(\frac1{\sqrt2}\begin{bmatrix}1&-1\\1&1\\\end{bmatrix}\right)$ gives me $D_1=\begin{bmatrix}-1&0\\0&3\\\end{bmatrix}$

$D_2=\left(\frac1{\sqrt2}\begin{bmatrix}-1&1\\1&1\\\end{bmatrix}\right)\begin{bmatrix}1&-2\\-2&1\\\end{bmatrix}\left(\frac1{\sqrt2}\begin{bmatrix}-1&1\\1&1\\\end{bmatrix}\right)$ gives me $D_2=\begin{bmatrix}3&0\\0&-1\\\end{bmatrix}$

Yes, the order matters, also remember to normalize your matrix if you want them to be orthogonal.

The $i$-diagonal entry correspond to the $i$-th column of $P$.

$\endgroup$
  • $\begingroup$ Thank you! So, it's necessary to normalize even for it to be orthogonal, not just to be orthonormal? $\endgroup$ – Defindun Dec 8 '17 at 10:12
  • $\begingroup$ If you want to write $P^TAP$, it seems that you are assuming $P^T=P^{-1}$. We require the matrix to be orthogonal, that is the columns of the matrix forms an orthonormal basis. So yup, we have to normalize it. $\endgroup$ – Siong Thye Goh Dec 8 '17 at 10:18
  • $\begingroup$ Alright, thank you very much! $\endgroup$ – Defindun Dec 8 '17 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.