# Finding Eigenvectors and Eigenvalues

concon

## Homework Statement

The Matrix A is as follows
A= [4 -4 0
2 -2 0
-2 5 3]

and has 3 distinct eigenvalues λ1<λ2<λ3
Let Vi be the unique eigenvector associated with λi with a 1 as its first nonzero component.
Let
D = [ λ1 0 0
0 λ2 0
0 0 λ3]

and P= [v1|v2|v3]

Find D and P.

## Homework Equations

not going to right it out but I know you find eigenvectors by (λI-A)X = 0
and eigenvalues by det(λI-A).

## The Attempt at a Solution

So I already found D with the eigenvalues as {0,2,3}

I tried to solve for P and got

[-1 -2 0
1 1 0
1 1 1]
but this is wrong.

I am kinds confused b/c the textbook says (λI-A)X=0 but my professor uses (A-λI)X=0 in class!

## Answers and Replies

Homework Helper
Gold Member
So I already found D with the eigenvalues as {0,2,3}

I tried to solve for P and got

[-1 -2 0
1 1 0
1 1 1]
but this is wrong.
The columns of ##P = [v_1 | v_2 | v_3]## should be eigenvectors of ##A##. But calculating ##Av_1## and ##Av_2## shows that the first two columns are not eigenvectors.

I am kinds confused b/c the textbook says (λI-A)X=0 but my professor uses (A-λI)X=0 in class!
Both are correct. One is simply the negative of the other. Since a vector is zero if and only if its negative is zero, the equations are equivalent.

concon
The columns of ##P = [v_1 | v_2 | v_3]## should be eigenvectors of ##A##. But calculating ##Av_1## and ##Av_2## shows that the first two columns are not eigenvectors.

Both are correct. One is simply the negative of the other. Since a vector is zero if and only if its negative is zero, the equations are equivalent.

What do you mean? That the eigenvectors that I calculated v1,v2,v3 are not correct? Or that they are not actual eigenvectors?

What should I do then?

Homework Helper
Gold Member
What do you mean? That the eigenvectors that I calculated v1,v2,v3 are not correct? Or that they are not actual eigenvectors?

What should I do then?
They are not eigenvectors:
$$Av_1 = \begin{bmatrix}4 & -4 & 0 \\ 2 & -2 & 0 \\ -2 & 5 & 3 \\ \end{bmatrix} \begin{bmatrix} -1 \\ 1 \\ 1 \end{bmatrix} = \begin{bmatrix} -8 \\ -4 \\ 10 \end{bmatrix}$$
which is not a multiple of
$$\begin{bmatrix} -1 \\ 1 \\ 1 \end{bmatrix}$$
Similarly, ##A v_2## is not a multiple of ##v_2##.

concon
They are not eigenvectors:
$$Av_1 = \begin{bmatrix}4 & -4 & 0 \\ 2 & -2 & 0 \\ -2 & 5 & 3 \\ \end{bmatrix} \begin{bmatrix} -1 \\ 1 \\ 1 \end{bmatrix} = \begin{bmatrix} -8 \\ -4 \\ 10 \end{bmatrix}$$
which is not a multiple of
$$\begin{bmatrix} -1 \\ 1 \\ 1 \end{bmatrix}$$
Similarly, ##A v_2## is not a multiple of ##v_2##.

So then what is/how do i find P?

Homework Helper
Gold Member
So then what is/how do i find P?
The columns of ##P## should be eigenvectors of ##A##. Your eigenvalues are correct. How did you calculate the corresponding eigenvectors? Maybe you just made an arithmetic mistake.

concon
The columns of ##P## should be eigenvectors of ##A##. Your eigenvalues are correct. How did you calculate the corresponding eigenvectors? Maybe you just made an arithmetic mistake.

So I took each value 0,2,3 and did (A-λI)X = 0

For zero:
(4-0) -4 0
2 (-2-0) 0
-2 5 (3-0)

then I reduced and got
v1 = -1,-1,1
and did same process for the other values and got

v2=-2,-1,1
v3=0,0,1

Everytime I solve this problem I get the same values, but the signs change but the numbers are still the same. Have you tried solving it? Is this what you got? What could I be doing wrong?

Homework Helper
Gold Member
So I took each value 0,2,3 and did (A-λI)X = 0

For zero:
(4-0) -4 0
2 (-2-0) 0
-2 5 (3-0)

then I reduced and got
v1 = -1,-1,1
OK, that's fine. Using this ##v_1## we calculate ##Av_1 = 0##, so ##v_1## is an eigenvalue associated with the eigenvalue ##0##. In your original post you had v1 = [-1, 1, 1], so maybe you made a sign error last time you calculated it.
and did same process for the other values and got

v2=-2,-1,1
Nope, using this ##v_2## I calculate ##A v_2 = [0, 0, -3]##, which is not a multiple of ##[-2, -1, 1]##.
v3=0,0,1
This is fine, assuming it goes with the eigenvalue 3.
Everytime I solve this problem I get the same values, but the signs change but the numbers are still the same. Have you tried solving it? Is this what you got? What could I be doing wrong?
I think you're making sign errors in some of your calculations. Can you show how you computed ##v_2##?

concon
OK, that's fine. Using this ##v_1## we calculate ##Av_1 = 0##, so ##v_1## is an eigenvalue associated with the eigenvalue ##0##. In your original post you had v1 = [-1, 1, 1], so maybe you made a sign error last time you calculated it.

Nope, using this ##v_2## I calculate ##A v_2 = [0, 0, -3]##, which is not a multiple of ##[-2, -1, 1]##.

This is fine, assuming it goes with the eigenvalue 3.

I think you're making sign errors in some of your calculations. Can you show how you computed ##v_2##?
Okay here is calculation again for v2:
λ=2

(4-2) -4 0
2 (-2-2) 0
-2 5 1

simplified:
2 -4 0
2 -4 0
-2 5 1

row 1 minus row 2
2 -4 0
0 0 0
-2 5 1

row 1 plus row 3

2 -4 0
0 0 0
0 1 1

divide row one by 2

1 -2 0
0 0 0
0 1 1

x= 2t
y= t
z= -t

thus v2 = 2,1,-1

Homework Helper
Gold Member
x= 2t
y= t
z= -t

thus v2 = 2,1,-1
OK, that calculation is correct. You originally had ##v_2 = [-2, 1, 1]##, so you probably made a sign error in your earlier attempt.

So let's summarize: you have eigenvalues ##0,2,3## with corresponding eigenvectors ##v_1 = [-1, -1, 1]##, ##v_2 = [2, 1, -1]##, and ##v_3 = [0, 0, 1]##. So your ##P## matrix could be
$$P = [v_1 | v_2 | v_3] = \begin{bmatrix} -1 & 2 & 0 \\ -1 & 1 & 0 \\ 1 & -1 & 1 \end{bmatrix}$$
However, there is one more thing the original problem asked for:
Let Vi be the unique eigenvector associated with λi with a 1 as its first nonzero component.
Your ##v_1## has ##-1## as its first component, and your ##v_2## has ##-2##. So you have to normalize your vectors to get ##1## as the first nonzero component. (##v_3## is OK as is.)

concon
OK, that calculation is correct. You originally had ##v_2 = [-2, 1, 1]##, so you probably made a sign error in your earlier attempt.

So let's summarize: you have eigenvalues ##0,2,3## with corresponding eigenvectors ##v_1 = [-1, -1, 1]##, ##v_2 = [2, 1, -1]##, and ##v_3 = [0, 0, 1]##. So your ##P## matrix could be
$$P = [v_1 | v_2 | v_3] = \begin{bmatrix} -1 & 2 & 0 \\ -1 & 1 & 0 \\ 1 & -1 & 1 \end{bmatrix}$$
However, there is one more thing the original problem asked for:

Your ##v_1## has ##-1## as its first component, and your ##v_2## has ##-2##. So you have to normalize your vectors to get ##1## as the first nonzero component. (##v_3## is OK as is.)

Wait but doesn't normalizing a vector mean taking v1/||v1|| ?

How would that give me a 1 as the first nonzero component?
Also if I use v2 = 2,1,-1 do I also need to normalize it if the 2 isn't negative?

Homework Helper
Gold Member
Wait but doesn't normalizing a vector mean taking v1/||v1|| ?

How would that give me a 1 as the first nonzero component?
Sorry, I meant you need to scale the vectors so that the first nonzero component is 1. So for example, if you had an eigenvector ##v = [-3, 1, -5]## you would multiply it by -1/3 to get ##[1, -1/3, 5/3]##.

Note that any nonzero multiple of an eigenvector is still an eigenvector associated with the same eigenvalue, because if ##Av = \lambda v## then multiplying ##v## by a constant scalar ##c##, we get ##A(cv) = c(Av) = c(\lambda v) = \lambda(cv)##.

Generally there's no need to scale the eigenvectors in any particular way unless the problem requests it. Probably your instructor wants them scaled with a 1 in the first nonzero component so your answer is guaranteed to match his/hers if it is correct.

concon
Sorry, I meant you need to scale the vectors so that the first nonzero component is 1. So for example, if you had an eigenvector ##v = [-3, 1, -5]## you would multiply it by -1/3 to get ##[1, -1/3, 5/3]##.

Note that any nonzero multiple of an eigenvector is still an eigenvector associated with the same eigenvalue, because if ##Av = \lambda v## then multiplying ##v## by a constant scalar ##c##, we get ##A(cv) = c(Av) = c(\lambda v) = \lambda(cv)##.

Generally there's no need to scale the eigenvectors in any particular way unless the problem requests it. Probably your instructor wants them scaled with a 1 in the first nonzero component so your answer is guaranteed to match his/hers if it is correct.

Okay so scaling would give me:
1 2 0
1 1 0
-1 -1 1
Is this correct?

Homework Helper
Gold Member
Okay so scaling would give me:
1 2 0
1 1 0
-1 -1 1
Is this correct?
The first and third columns are OK. The second column's first component is 2, not 1, so it is not scaled as requested.

concon
The first and third columns are OK. The second column's first component is 2, not 1, so it is not scaled as requested.
whoops forget to scale that one! Thanks for all your help I really appreciate it! For some reason the scaling thing didn't register with me on what the professor wanted and I was confused with the sign changing.