101 views (last 30 days)

John D'Errico
on 6 Jan 2021

Edited: John D'Errico
on 6 Jan 2021

Why does V seem strange?

A = [-2 0 2

2 -1 5

0 0 1 ];

[V,D] = eig(A)

The columns of V are eigenvectors. They are normalized to have unit 2-norm. So I'm not sure what you are asking.

If you multiply them with A, as in

A*V(:,2)

How does that compare to

D(2,2)*V(:,2)

norm(A*V - V*D)

Ah, now I know what bothers you. You were expecting an orthogonal set of vectors...

Walter Roberson
on 6 Jan 2021

John D'Errico
on 7 Jan 2021

Why would you expect that all numbers are always going to be integers? Probably because in your class, your teacher showed you only simple integer vectors and arrays. But real world problems are rarely simply composed of integers.

In fact, eigenvectors from eig are normalized (as I said in my answer) to have a Euclidean norm of 1. That means unless the eigenvector is a very rare case, it will NEVER be entirely composed of integers as it is returned by eig. Consider this matrix, and its eigenvectors.

A = [-2 0 2

2 -1 5

0 0 1];

[V,D] = eig(A);

V(:,2)

I said the columns of V are eigenvectors. Is that true?

V2 = V(:,2)

A*V2

Since when I multiply by V2, it multiplies V2 by 2, this is an eigenvector. Can we scale V2 arbitrarily, so that it is composed of integers? In this case, we may be able to do that.

V2new = V2/V2(1)

Is it still true that V2 is an eigenvector? Yes, in the sense that A*V2new=2*V2new is still true. V2new is not normalized to have unit norm though.

A*V2new

And since eig returns UNIT normalized eigenvectors, you will almost always see numbers that are not whole numbers. Only in the rare case like the first eigenvector, where we saw this:

V(:,1)

will an eigenvector happen to be composed of purely integers.

Walter Roberson
on 6 Jan 2021

format long g

A = [

-2 0 2

2 -1 5

0 0 1 ]

[V, D] = eig(A)

A*V

V*D

A*V - V*D

So the values do satisfy the required conditions. But perhaps you would prefer a different normalization?

Vnorm = V ./ max(abs(V),[],1)

A*Vnorm - Vnorm * D

You might prefer a different normalization yet. Note that the columns are in a different order than above.

[V,D] = eig(sym(A))

Walter Roberson
on 6 Jan 2021

Are you aware that eigenvectors are not unique? Multiplying them or dividing them by any constant gives another eigenvector of the same class?

format long g

A = [

-2 0 2

2 -1 5

0 0 1 ]

[V, D] = eig(A)

v = V(:,3);

sym(v./v(3) * 6)/6

sym(v./v(2) * 57)/57

sym(v./v(1) * 3)/3

Walter Roberson
on 6 Jan 2021

By the way, the V returned by matlab has the property that norm() of each column is 1.

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 0 Comments

Sign in to comment.