How do I know if my eigenvectors are right?

  • Thread starter David Koufos
  • Start date
  • Tags
    Eigenvectors
In summary: C = C \begin{bmatrix}\lambda_1 & 0 \\ 0 & \lambda_2\end{bmatrix}$$where the number of ##C## factors on the left is one less than the number of ##C## factors on the right. This is because the ##C^T## on the right combines with the final ##C## on the left to give ##C##.
  • #1
David Koufos
9
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
  • #2
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
  • #3
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
  • #4
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.
 
  • #5
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
  • #6
Try calculating ##C^{-1}MC##.
 
  • Like
Likes FactChecker
  • #7
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.
 
  • #8
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
  • #9
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

1. What are eigenvectors and why are they important?

Eigenvectors are special vectors that do not change direction when multiplied by a matrix. They are important because they help us understand the behavior of linear transformations and are used in many fields of science, including physics, engineering, and computer science.

2. How do I calculate eigenvectors?

To calculate eigenvectors, you first need to find the eigenvalues of a matrix. Then, for each eigenvalue, you can solve a system of equations to find the corresponding eigenvector. Alternatively, you can use software or online calculators to find eigenvectors.

3. How do I know if my eigenvectors are right?

One way to check if your eigenvectors are correct is to multiply them by the original matrix and see if the result is equal to the eigenvalue times the eigenvector. Additionally, you can check if the eigenvectors are orthogonal to each other, meaning their dot product is equal to 0.

4. Can eigenvectors be complex numbers?

Yes, eigenvectors can be complex numbers. In fact, complex eigenvectors are often encountered in quantum mechanics and other areas of physics where complex numbers are used to describe physical phenomena.

5. Are there any real-life applications of eigenvectors?

Yes, eigenvectors have many real-life applications. For example, they are used in image processing to identify patterns and features in images. They are also used in machine learning algorithms to reduce the dimensionality of data. Additionally, eigenvectors are used in finance to analyze stock market data and in chemistry to study molecular vibrations.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
98
  • Calculus and Beyond Homework Help
Replies
2
Views
129
  • Calculus and Beyond Homework Help
Replies
2
Views
668
  • Calculus and Beyond Homework Help
Replies
6
Views
309
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
517
  • Calculus and Beyond Homework Help
Replies
2
Views
530
  • Calculus and Beyond Homework Help
Replies
20
Views
1K
  • Calculus and Beyond Homework Help
Replies
14
Views
400
  • Calculus and Beyond Homework Help
Replies
6
Views
668
Back
Top