Let's say you are given the following easy matrix:

$$\begin{bmatrix}{-1}&{0}\\ {1}&{1}\end{bmatrix}$$

and you've calculated the following two eigenvalues:

$\lambda_{1} = -1$

$ \lambda_{2} = 1$

Is there a way to check whether the calculated eigenvalues are correct?

I know that with the eigenvectors you can just check everything all at once by checking it with this formula:

$$A. \vec{x} = \lambda \vec{x}$$

But how can you check the correctness of the computed results without having to calculate all the eigenvectors and fill in the formula?

  • 3
    $\begingroup$ Check trace (T) and determinant (D): $T=0=\lambda_1+\lambda_2$ (OK) and $D=-1=\lambda_1\lambda_2$ (OK). Done. $\endgroup$ – Pierpaolo Vivo Jan 23 '16 at 19:35
  • $\begingroup$ Are you sure the trace of a matrix is always equal 0? And the sum of the eigenvalues as well? $\endgroup$ – privetDruzia Jan 23 '16 at 19:37
  • $\begingroup$ @privetDruzia: The trace of this particular matrix happens to be $0$. $\endgroup$ – Henning Makholm Jan 23 '16 at 19:39
  • $\begingroup$ Never said that. The trace is the sum of diagonal entries, which is also equal to the sum of the eigenvalues (always). So the sum of diagonal entries of YOUR matrix (not ALL matrices) is $-1+1=0$, which is also equal to the sum of your eigenvalues. $\endgroup$ – Pierpaolo Vivo Jan 23 '16 at 19:39
  • $\begingroup$ @PierpaoloVivo, that s the trick I'll always be using from now on! Does this also work for complex eigenvalues? Are there some corner cases this might not work? $\endgroup$ – privetDruzia Jan 23 '16 at 19:42

For a $2\times 2$ matrix $A$, the characteristic polynomial equation defining the eigenvalues is given by [https://en.wikipedia.org/wiki/Characteristic_polynomial] $$ \lambda^2-(\mathrm{Tr}A)\lambda+\det(A)=0\ , $$ where $A$ is the matrix trace (the sum of diagonal entries $a_{11}+a_{22}$), and $\det(A)$ is its determinant $a_{11}a_{22}-a_{12}a_{21}$. If you solve this equation, its two roots $\lambda_{1,2}$ are the eigenvalues of $A$. It follows from the general theory of quadratic equation that $\lambda_1+\lambda_2$ is equal to the coefficient of the $\lambda$ term (with a minus sign), while the product $\lambda_1\lambda_2$ is equal to the zeroth order (constant) term of the equation. Therefore, if you compute somehow two eigenvalues (call them $\mu_1,\mu_2$) and want to check whether they are correct or not, you need to verify that $\mu_1+\mu_2=a_{11}+a_{22}$ and $\mu_1\mu_2=a_{11}a_{22}-a_{12}a_{21}$. These two equations are sufficient to tell you with certainty whether your postulated eigenvalues are OK or not - but you need both conditions - you might easily engineer situations where the 'trace' test works, but the 'det' test fails (which means your postulated eigenvalues are wrong).

  • $\begingroup$ didn't work for this example: imgur.com/ZqXZ1BC, I didn't even try to calculate the determinant as the first step of the check already fails. Did I misunderstand anything? $\endgroup$ – privetDruzia Jan 24 '16 at 9:10
  • 1
    $\begingroup$ it works perfectly, instead: $-\frac{1}{2}-\frac{\mathrm{i} \sqrt{3}}{2}-\frac{1}{2}+\frac{i \sqrt{3}}{2}-2=-3$. $\endgroup$ – Pierpaolo Vivo Jan 24 '16 at 9:13
  • $\begingroup$ For a $3\times 3$, the trace is the sum of the three diagonal elements $\endgroup$ – Pierpaolo Vivo Jan 24 '16 at 9:15
  • $\begingroup$ How about the determinant? imgur.com/e0OLqYZ $\endgroup$ – privetDruzia Jan 24 '16 at 9:29
  • 2
    $\begingroup$ wikihow.com/Find-the-Determinant-of-a-3X3-Matrix You'd need to check that the determinant computed from the entries of the matrix agrees with the product of eigenvalues you have computed. Let me further remark that the trace-det test is only conclusive for $2\times 2$ matrices. For larger sizes, it is a quick and nice crosscheck, but it is not conclusive. For instance, you might engineer a $3\times 3$ matrix $A$ and find three numbers $\{\mu_1,\mu_2,\mu_3\}$ such that the trace of $A$ (sum of diagonal elements) is equal to $\mu_1+\mu_2+\mu_3$, the determinant of $A$ is equal to... $\endgroup$ – Pierpaolo Vivo Jan 24 '16 at 10:20

Suppose you have a $2\times 2$ matrix, A. You can use the fact that $$\lambda^2 -\lambda\tau(A)+\det(A)=0$$ Where $\tau(A)$ is the trace of your matrix $A$.

  • $\begingroup$ which eigenvalue does $\lambda$ refer to? the first, second or sum? Does this work for imaginary eigenvalues? $\endgroup$ – privetDruzia Jan 23 '16 at 19:38
  • $\begingroup$ @privetDruzia: The characteristic polynomial of the $2 \times 2$-matrix $A$ is given by $P(X) = X^2 - \tau(A)X + \det(A)$, so this is just a reformulation of the fact that the eigenvalues are roots of the characteristic polynomial. So it holds for all eigenvalues of $A$. $\endgroup$ – Jendrik Stelzner Jan 23 '16 at 19:47
  • $\begingroup$ Yes, it works for both $\lambda_1$ and $\lambda_2$. $\endgroup$ – fosho Jan 23 '16 at 19:49

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.