How do I know if my eigenvectors are right?

  • Thread starter Thread starter David Koufos
  • Start date Start date
  • Tags Tags
    Eigenvectors
Click For Summary
SUMMARY

The discussion centers on verifying eigenvectors for the matrix M = [[2, 2], [2, -1]]. The characteristic equation yields eigenvalues λ = 3 and λ = -2. The user initially derived eigenvectors (2, 1) and (-1, 2), but upon using the software Maxima, discovered the correct eigenvectors are (2, 1) and (1, -2). The confusion arose from the incorrect application of the diagonalization process, specifically mixing up the equations CMC^T and C^TMC. The correct approach confirms that if the matrix is diagonalizable, the diagonal elements correspond to the eigenvalues.

PREREQUISITES
  • Understanding of eigenvalues and eigenvectors
  • Familiarity with matrix diagonalization
  • Proficiency in using mathematical software like Maxima or Matlab
  • Knowledge of matrix multiplication and properties
NEXT STEPS
  • Study the process of diagonalization in linear algebra
  • Learn about the geometric and algebraic multiplicities of eigenvalues
  • Explore the implications of eigenvector scaling on diagonalization
  • Practice using Matlab for eigenvalue and eigenvector calculations
USEFUL FOR

Students and professionals in mathematics, engineering, and data science who are working with linear transformations and matrix theory, particularly those focusing on eigenvalue problems and matrix diagonalization.

David Koufos
Messages
9
Reaction score
4
Homework Statement
Given ##M = \begin{pmatrix}
2 & 2\\
2 & -1
\end{pmatrix}##, find the eigenvalues and eigenvectors and use them to find the matrix which gives the deformation relative to the new axes.
Relevant Equations
##CMC^{T} = D##,
C is the matrix whose columns are the unit eigenvectors derived from M,
D is a diagonal matrix which gives the deformation relative to the new axes,
Remember ##C^{T} = C^{-1}##, meaning C is orthogonal.
For
##M = \begin{pmatrix}
2 & 2\\
2 & -1
\end{pmatrix}##

I found the characteristic equation:
##( λ - 3 )( λ + 2)
\therefore λ = 3,-2##Going back we multiply
$$\begin{pmatrix}
2 - \lambda & 2\\
2 & -1 - \lambda
\end{pmatrix}\begin{pmatrix} x\\ y \end{pmatrix}$$

Which gives
\begin{matrix}
2x - \lambda x + 2y = 0\\
2x - y - \lambda y = 0
\end{matrix}

Now plugging in ##\lambda_{1}## and ##\lambda_{2}## we get
\begin{matrix}
-x_{1} + 2y_{1} = 0\\
2x_{1} - 4y_{1} = 0
\end{matrix}

\begin{matrix}
4x_{2} + 2y_{2} = 0\\
2x_{2} + y_{2} = 0
\end{matrix}

Using this system of equations I derived
##\left( 2, 1 \right )## & ##\left( -1, 2 \right )## for the eigenvectors. My question comes from this.

Moving on, the unit eigenvectors are
\begin{bmatrix}
\dfrac{2}{\sqrt{5}}& , \dfrac{1}{\sqrt{5}}
\end{bmatrix} and
\begin{bmatrix}
\dfrac{-1}{\sqrt{5}}& , \dfrac{2}{\sqrt{5}}
\end{bmatrix}The matrix C which is composed of the unit eigenvectors as columns is
$$C = \begin{pmatrix}
\dfrac{2}{\sqrt{5}} & \dfrac{-1}{\sqrt{5}}\\
\dfrac{1}{\sqrt{5}} & \dfrac{2}{\sqrt{5}}
\end{pmatrix}$$

and
$$C^{T} = \begin{pmatrix}
\dfrac{2}{\sqrt{5}} & \dfrac{1}{\sqrt{5}}\\
\dfrac{-1}{\sqrt{5}} & \dfrac{2}{\sqrt{5}}
\end{pmatrix}$$

But when I perform the multiplication I get
$$CMC^{T} = \begin{pmatrix}
\dfrac{-1}{5} & \dfrac{12}{5}\\
\dfrac{12}{5} & \dfrac{6}{5}
\end{pmatrix}$$ which is not a diagonal matrix.

I used maxima to compare answers and realize why my answer wasn't right. Maxima found for eigen vectors
##[ 2, 1 ] [ 1, -2]## whereas I have ##[ 2, 1] [ -1, 2]##.

When using the eigen vectors the computer found, I get
##CMC^{T} = \begin{pmatrix}
3 & 0\\
0 & -2
\end{pmatrix}## which is the solution I'm looking for.
My problem is that my eigen vectors satisfy the characteristic equation so why don't I get the same answer. For future problems how do I really know if my eigen vectors are right, or if they're off by a factor of -1?
 
Last edited:
  • Like
Likes sysprog
Physics news on Phys.org
Check them using the basic definition of the eigenvector and the associated eigenvalue. Check if the matrix times the eigenvector equals the eigenvalue times the eigenvector.
 
  • Like
Likes DaveE and sysprog
FactChecker said:
Check them using the basic definition of the eigenvector and the associated eigenvalue. Check if the matrix times the eigenvector equals the eigenvalue times the eigenvector.
I just tried that with this specific example, and using my 2nd eigen vector ##(-1, 2)## I do indeed get that [M]u = λu. So now I'm just more puzzled. I don't understand why my eigen vector doesn't yield the desired diagonal matrix. I know that you can just assume the diagonalized matrix is just the eigen values along its diagonal and zeroes elsewhere, but my book says that's not true %100 of the time so I want to make sure I have the process right before I move on to higher dimensions.
 
  • Like
Likes docnet
David Koufos said:
I know that you can just assume the diagonalized matrix is just the eigen values along its diagonal and zeroes elsewhere, but my book says that's not true %100 of the time so I want to make sure I have the process right before I move on to higher dimensions.
Dear David,

I think what you said is correct. The diagonal matrices are matrices whose diagonal entries are the eigenvalues. This works in higher dimensions. I think when the book mentions it is not true 100% of the time, they probably mean that for some matrices

geometric multiplicity of λ ≠ algebraic multiplicity of λ

meaning these matrices are not diagonalizable.
 
Your eigenvectors are just multiples of their eigenvectors. If ##Mu=\lambda u## then clearly ##M(ru)=\lambda (ru)## for any real multiplier, ##r##. Likewise, if ##CMC^T = A##, then ##(rC)M(rC)^T = r^2A## for any real multiplier, ##r##. If one is a diagonal, the other one should also be a diagonal.
 
  • Like
Likes sysprog and docnet
Try calculating ##C^{-1}MC##.
 
  • Like
Likes FactChecker
David Koufos said:
So now I'm just more puzzled. I don't understand why my eigen vector doesn't yield the desired diagonal matrix. I know that you can just assume the diagonalized matrix is just the eigen values along its diagonal and zeroes elsewhere, but my book says that's not true %100 of the time so I want to make sure I have the process right before I move on to higher dimensions.
If the matrix is indeed diagonalizable, then it is 100% true that the diagonal elements of the diagonalized matrix are precisely the eigenvalues. Can you provide a verbatim quote of what your book is saying? Perhaps there is a subtlety that you are overlooking.
 
Maxima found for eigen vectors
[2,1][1,−2] whereas I have [2,1][−1,2].
That's absolutely fine. Note that ##[1,-2]## is a scalar multiple of ##[-1,2]##. (The scalar is ##-1##.) In general, if ##v## is an eigenvector associated with a particular eigenvalue, then so is ##cv## for any nonzero scalar ##c##.
 
Last edited:
  • Like
Likes DaveE and sysprog
I think you need to simply interchange ##C## and ##C^T##.

Using Matlab, I find that if ##v_1 = \begin{bmatrix}2/\sqrt{5} \\ 1/\sqrt{5}\end{bmatrix}## and ##v_2 = \begin{bmatrix}-1/\sqrt{5} \\ 2/\sqrt{5}\end{bmatrix}##, and
$$C = \begin{bmatrix}v_1 & v_2\end{bmatrix} = \frac{1}{\sqrt{5}}\begin{bmatrix}2 & -1 \\ 1 & 2 \end{bmatrix}$$
then indeed
$$CDC^{T} =
\frac{1}{5}\begin{bmatrix}2 & -1 \\ 1 & 2 \end{bmatrix}
\begin{bmatrix}3 & 0 \\ 0 & -2 \end{bmatrix}
\begin{bmatrix}2 & 1 \\ -1 & 2 \end{bmatrix}
= \begin{bmatrix}2 & 2 \\ 2 & -1 \end{bmatrix} = M$$

Note that the eigenvalue-eigenvector equations are
$$Mv_1 = \lambda_1 v_1$$
and
$$Mv_2 = \lambda_2 v_2$$
If you combine these into a matrix equation with ##C = \begin{bmatrix}v_1 & v_2\end{bmatrix}##, then the result should be
$$MC = CD$$
or equivalently
$$C^TMC = D \text{ or }M = CDC^T$$
whereas you have written
$$CMC^T = D$$
which is incorrect.
 
  • Like
Likes FactChecker and sysprog
  • #10
Notice that ##C^TMC = \begin{pmatrix}3 & 0 \\ 0 & -2 \end{pmatrix}##.
 
  • Like
Likes sysprog
  • #11
vela said:
Try calculating ##C^{-1}MC##.
Ok. I tried that and got the right diagonal matrix. Thank you. I mixed up ##CMC^{T}## with ##C^{T}MC##
 
  • #12
jbunniii said:
I think you need to simply interchange ##C## and ##C^T##.

Using Matlab, I find that if ##v_1 = \begin{bmatrix}2/\sqrt{5} \\ 1/\sqrt{5}\end{bmatrix}## and ##v_2 = \begin{bmatrix}-1/\sqrt{5} \\ 2/\sqrt{5}\end{bmatrix}##, and
$$C = \begin{bmatrix}v_1 & v_2\end{bmatrix} = \frac{1}{\sqrt{5}}\begin{bmatrix}2 & -1 \\ 1 & 2 \end{bmatrix}$$
then indeed
$$CDC^{T} =
\frac{1}{5}\begin{bmatrix}2 & -1 \\ 1 & 2 \end{bmatrix}
\begin{bmatrix}3 & 0 \\ 0 & -2 \end{bmatrix}
\begin{bmatrix}2 & 1 \\ -1 & 2 \end{bmatrix}
= \begin{bmatrix}2 & 2 \\ 2 & -1 \end{bmatrix} = M$$

Note that the eigenvalue-eigenvector equations are
$$Mv_1 = \lambda_1 v_1$$
and
$$Mv_2 = \lambda_2 v_2$$
If you combine these into a matrix equation with ##C = \begin{bmatrix}v_1 & v_2\end{bmatrix}##, then the result should be
$$MC = CD$$
or equivalently
$$C^TMC = D \text{ or }M = CDC^T$$
whereas you have written
$$CMC^T = D$$
which is incorrect.
Ok I found the diagonal now. Thank you. I mixed up ##CMC^{T}## with ##C^{T}MC##
 
  • #13
jbunniii said:
I think you need to simply interchange ##C## and ##C^T##.

Using Matlab, I find that if ##v_1 = \begin{bmatrix}2/\sqrt{5} \\ 1/\sqrt{5}\end{bmatrix}## and ##v_2 = \begin{bmatrix}-1/\sqrt{5} \\ 2/\sqrt{5}\end{bmatrix}##, and
$$C = \begin{bmatrix}v_1 & v_2\end{bmatrix} = \frac{1}{\sqrt{5}}\begin{bmatrix}2 & -1 \\ 1 & 2 \end{bmatrix}$$
then indeed
$$CDC^{T} =
\frac{1}{5}\begin{bmatrix}2 & -1 \\ 1 & 2 \end{bmatrix}
\begin{bmatrix}3 & 0 \\ 0 & -2 \end{bmatrix}
\begin{bmatrix}2 & 1 \\ -1 & 2 \end{bmatrix}
= \begin{bmatrix}2 & 2 \\ 2 & -1 \end{bmatrix} = M$$

Note that the eigenvalue-eigenvector equations are
$$Mv_1 = \lambda_1 v_1$$
and
$$Mv_2 = \lambda_2 v_2$$
If you combine these into a matrix equation with ##C = \begin{bmatrix}v_1 & v_2\end{bmatrix}##, then the result should be
$$MC = CD$$
or equivalently
$$C^TMC = D \text{ or }M = CDC^T$$
whereas you have written
$$CMC^T = D$$
which is incorrect.
Ok. I tried that and got the right diagonal matrix. Thank you. I mixed up ##CMC^{T}## with ##C^{T}MC##
 
  • Like
Likes jbunniii and FactChecker

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
836
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
Replies
20
Views
2K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
Replies
9
Views
2K