# Orthogonalization is not commutative!

I get stuck into a problem: I am going to produce orthogonalized eigenvectors of a matrix and in any iteration. I shortened my question in the bellow line:

Why do we face to different results of orthogonalization on vectors, and if we have to choose an orthogonalized eigenvectors to next processes, which of them is reliable? for example:

a={{2,4},{3,5}}
b={{3,5},{2,4}}

orthoa={{1/Sqrt[5], 2/Sqrt[5]}, {2/Sqrt[5], -(1/Sqrt[5])}}
orthob={{3/Sqrt[34], 5/Sqrt[34]}, {-(5/Sqrt[34]), 3/Sqrt[34]}}


Although, {3,5} is repeated in to but orthogonalized it seems to e different.

• For me (Mathematica 10.2 on Mac OS), nonorthostorage === storagematrix1. Are you sure you've written down the outputs correctly? Commented Aug 5, 2015 at 14:45
• @PatrickStevens, Ok I am so sorry the line is related to nonorthostorage! I corrected that. Commented Aug 5, 2015 at 15:01
• Er, the commands to generate nonorthostorage and storagematrix1 are identical. Commented Aug 5, 2015 at 15:04
• (1) This really needs to be pruned to a simpler example. Also I don't see an actual question. My guess is you are orthogonalizing the same set of vectors but given in different orders, and want to know if the results can/should be different. If that's the issue, then the answer is yes, they can and should be different. Commented Aug 5, 2015 at 15:21
• @mr.0093 What you are saying, assuming you are the poster of this question, is that you made zero effort to track down the source of the apparent issue. Why would you think others would want to isolate it if it's not important enough for you to do so? Commented Aug 5, 2015 at 15:45

If you call Orthogonalize at the end, you're orthogonalizing the eigenvectors in a different order (i.e. after sorting on eigenvalue, rather than before). Orthogonalizing the same list in a different order usually gives a different output.

Orthogonalize[{{1., 2}, {1, 3}}]

(* {{0.447214, 0.894427}, {-0.894427, 0.447214}} *)

Orthogonalize[{{1, 3}, {1., 2}}]

(* {{0.316228, 0.948683}, {0.948683, -0.316228}} *)

• If the orthogonalized eigenvectors are needed to the next process which of them are dependable? Commented Aug 5, 2015 at 15:33
• The output of Orthogonalize[m] is a collection of orthonormal vectors. They are not in general eigenvectors of m unless there is only one eigenvalue (example: {{1, 0}, {2, 0}}). Commented Aug 5, 2015 at 15:39
• If mr.0093 is the same person as Ackaran, there is a merging procedure: meta.stackexchange.com/help/merging-accounts Commented Aug 5, 2015 at 15:41
• No this is my roommate. he said he didn't have so knowledge to answer me. Commented Aug 5, 2015 at 16:38
• I am so sorry, if @mr.0093 (my roommate)answered instead me, since he did not have any answer to me, collaborated to write question for following it. Commented Aug 5, 2015 at 17:04