Does [V,D] = eig(A) always return normalized eigenvectors for any real matrix A?

I’m looking for clarification on the eig function in MATLAB. When I use the syntax [V, D] = eig(A) for a real matrix A, are the eigenvectors returned in the columns of V guaranteed to be normalized to unit magnitude ( )?
Does this behavior change if the matrix is non-symmetric or if I use the generalized form eig(A, B) or in any other case for a real matrix A?
Thanks!

3 commentaires

A = gallery("circul",3)
A = 3×3
1 2 3 3 1 2 2 3 1
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
[V,D] = eig(A)
V =
-0.5774 + 0.0000i 0.5774 + 0.0000i 0.5774 + 0.0000i -0.5774 + 0.0000i -0.2887 - 0.5000i -0.2887 + 0.5000i -0.5774 + 0.0000i -0.2887 + 0.5000i -0.2887 - 0.5000i
D =
6.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -1.5000 + 0.8660i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -1.5000 - 0.8660i
sqrt(V(:,1).^2 + V(:,2).^2 + V(:,3).^2)
ans = 3×1
1.0000 0.0000 0.0000
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
So, NO, the magnitude of the second and third columns are 0.
I think the intent of Ali's phrase "normalized to unit magnitude" was asking more about this result from your example (regardless of his actual use of nomenclature):
A = gallery("circul",3)
A = 3×3
1 2 3 3 1 2 2 3 1
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
[V,D] = eig(A)
V =
-0.5774 + 0.0000i 0.5774 + 0.0000i 0.5774 + 0.0000i -0.5774 + 0.0000i -0.2887 - 0.5000i -0.2887 + 0.5000i -0.5774 + 0.0000i -0.2887 + 0.5000i -0.2887 - 0.5000i
D =
6.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -1.5000 + 0.8660i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i -1.5000 - 0.8660i
sqrt(sum(conj(V).*V))
ans = 1×3
1 1 1
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
At least that is how I read his question.
dpb
dpb le 17 Mar 2026 à 20:38
Modifié(e) : dpb le 17 Mar 2026 à 21:23
A = gallery("circul",3);
[V,D] = eig(A);
arrayfun(@(i)norm(V(:,i)),1:width(V))
ans = 1×3
1 1 1
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
The individual eigenvectors are, per the documentation, however....
"[V,D] = eig(A) returns matrix V, whose columns are the right eigenvectors of A such that A*V = V*D. The eigenvectors in V are normalized so that the 2-norm of each is 1."
"If A is real symmetric, Hermitian, or skew-Hermitian, then the right eigenvectors V are orthonormal."
I think the above is true although I don't know that can prove it; probably somebody can illustrate a failing case.

Connectez-vous pour commenter.

Réponses (3)

Paul
Paul le 17 Mar 2026 à 20:35
Whether or not the columns of V are normalized to unit magnitude depends on how eig is called.
See eig - Eigenvalues and eigenvectors - MATLAB for all of the documented possibilities.
James Tursa
James Tursa le 17 Mar 2026 à 20:39
A discussion of eigenvector normalization can be found in the doc. In some cases, the answer is yes they are "normalized to unit magnitude" as you put it. But the answer can be no dependeing on the inputs.

1 commentaire

I am only interested in the case where A is positive semidefinite real matrix. I am sorry I did not read the documentation before posting this question. The documentation for the eig function states that [V,D] = eig(A) returns matrix V, whose columns are the right eigenvectors of A such that A*V = V*D. The eigenvectors in V are normalized so that the 2-norm of each is 1. This answers my question.

Connectez-vous pour commenter.

John D'Errico
John D'Errico le 18 Mar 2026 à 13:06
Modifié(e) : John D'Errico le 18 Mar 2026 à 13:08
Be a little careful that A is not in symbolic form, even if it is real and SPD.
A = randn(4,3); A = A'*A % A MUST clearly be SPD
A = 3×3
6.7750 -0.4223 -0.3969 -0.4223 0.5515 -0.1101 -0.3969 -0.1101 3.1915
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
[V,D] = eig(A)
V = 3×3
-0.0705 0.1021 -0.9923 -0.9962 -0.0585 0.0647 -0.0514 0.9930 0.1059
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
D = 3×3
0.5159 0 0 0 3.1572 0 0 0 6.8449
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
It is true the columns of V are unit normalized when A is single or double precision.
diag(V'*V)
ans = 3×1
1.0000 1.0000 1.0000
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
However, the symbolic version of A will not produce the same unit 2-normalized vectors.
[Vs,Ds] = eig(sym(A));
vpa(diag(Vs'*Vs))
ans = 

1 commentaire

James Tursa
James Tursa le 18 Mar 2026 à 19:22
Modifié(e) : James Tursa le 18 Mar 2026 à 19:38
Side Note on this calculation:
A = A'*A % A MUST clearly be SPD
The reason this is true numerically, as well as mathematically, is that MATLAB uses a BLAS symmetric matrix multiply routine in the background that enforces an exact symmetric result down to the least significant bit for this particular syntax. I.e., it only does about 1/2 of the calculations and then copies the results to get the exact numerical symmetry.
E.g., the following calculation would call a BLAS generic matrix multiply routine in the background, which is not guaranteed to generate an exact symmetric result:
AT = A';
A = AT * A; % A not guaranteed to be exactly symmetric

Connectez-vous pour commenter.

Catégories

Question posée :

le 17 Mar 2026 à 18:28

Modifié(e) :

le 18 Mar 2026 à 19:38

Community Treasure Hunt

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

Start Hunting!

Translated by