Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • $\begingroup$ This is definitely correct (as a result), since the vectors stay in place, but how does it work exactly? And, even more relevant, does it work for the critical second example? $\endgroup$ Commented Nov 16, 2022 at 12:00
  • $\begingroup$ If the second example is {{0, 1, 2, 4}, {1, 0, 3, 5}, {2, 3, 0, 1}, {4, 5, 1, 0}} then it sorts to {{0, 1, 1, 2}, {1, 0, 3, 4}, {1, 3, 0, 5}, {2, 4, 5, 0}}. I will edit my answer to make the algorithm clearer $\endgroup$ Commented Nov 16, 2022 at 14:01
  • $\begingroup$ What do you mean by “the vectors stay in place” $\endgroup$ Commented Nov 16, 2022 at 23:12
  • $\begingroup$ Bad wording...The numbers of the vector stay "together". Obviously, this can't work with just sorting all numbers of the matrix - it's just a lucky accident that (0123),(0145),(0246) and (0356) stay together after sorting. OK, I reword it: if a matrix contains the vector (a1,a2,...) before, it must also contain this vector after sorting (in any order of the vector elements). $\endgroup$ Commented Nov 17, 2022 at 13:02
  • 1
    $\begingroup$ @IntroductionToProbability Your solution does not have the same eigenvalues as the starting matrix. The "staying together" means the rows can change position and the numbers in a row change position within the row. Numbers should not leave their row, only be rearranged within it. $\endgroup$ Commented Mar 27, 2023 at 12:59