Here is a simple eigenvector problem solution

m = {{2, Sqrt[15]}, {Sqrt[15], 4}};
v = Eigenvectors[m]

However, the list of vectors v is not normalized. The command


returns an error. It seems Normalize doesn't want a list of vectors. The following works just fine:

u = Table[Normalize[v[[i]]], {i, 2}];

...but it seems clunky to me. I found an alternate way to use Normalize with a second argument, namely

Normalize[v, Norm]

but the list of vectors returned is not the same as u.

Is there something better than using Table to normalize the list of eigenvectors?

  • 2
    $\begingroup$ try Normalize /@ v? $\endgroup$
    – kglr
    Commented Mar 4, 2017 at 14:30

2 Answers 2


Here's a range of incremental improvements:

Table[Normalize[v[[i]]], {i, 2}]

Table[Normalize[v[[i]]], {i, Length[v]}] (* like a for loop in other languages *)

Table[Normalize[ev], {ev, v}] (* like a for each loop in other languages *)

Map[Normalize, v]

Normalize /@ v (* shorthand for Map *)

Look up Map and all the syntaxes of Table and read this:

Note that Eigenvectors will return normalized eigenvectors if its input are floating point numbers, but not if the input is exact. Eigenvactors@N[m] gives a normalized approximate result because N[m] is floating point. Eigenvalues[m] doesn't because m is exact.

Normalize[v, Norm] does not do what you think it is doing. Normalize[vector, function] simply computes vector / function[vector]. In your case it uses Norm[v], which is a matrix norm, not a vector norm.

  • 1
    $\begingroup$ What is ev? eigenvalues? $\endgroup$
    – Alex
    Commented Mar 8, 2020 at 22:40
  • 1
    $\begingroup$ @Alex It is the name of the iterator used in Table. It is not a global variable. $\endgroup$
    – Szabolcs
    Commented Mar 9, 2020 at 8:17

Normalize is not a Listable function, which means that you cannot expect it to act on a list of arguments in the same way that it acts on an argument. That is why you have to Map its action into the list of vectors.

So as @kglr writes in the comments, Map[Normalize,v], or equivalently Normalize/@v, will do the job:

Normalize /@ {{1, 1}, {1, -1}}

(* {{1/Sqrt[2], 1/Sqrt[2]}, {1/Sqrt[2], -(1/Sqrt[2])}} *)
  • $\begingroup$ Thank you both very much. This is just what I needed. $\endgroup$ Commented Mar 4, 2017 at 16:39
  • $\begingroup$ Another way to think about your problem (and the answers) is that you were trying to normalize a matrix. Instead you want to normalize each row (vector) in the matrix. Thus you have to map Normalize to each of the rows. $\endgroup$ Commented Mar 4, 2017 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.