sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 481 forks source link

Add "eigendecomposition" to docstring #20465

Closed f29946bc-ee7b-48cd-9abc-3445948c551d closed 8 years ago

f29946bc-ee7b-48cd-9abc-3445948c551d commented 8 years ago

It took a while to found commands for doing "eigendecomposition", also called "spectral decomposition", to a matrix. Hence I suggest adding those words to documentation of jordan_form(), so that next one will found them more easy.

Also "Matrix.random(GF(3), 2) never generates [[2,0],[0,2]]" must be changed to have Matrix.random(GF(3), 2), algorithm='unimodular').

matrix2.pyx, rref() has error in link to "echelon_form".

CC: @rbeezer @kedlaya

Component: documentation

Author: Jori Mäntysalo

Branch/Commit: 49b57f9

Reviewer: Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/20465

f29946bc-ee7b-48cd-9abc-3445948c551d commented 8 years ago

Description changed:

--- 
+++ 
@@ -1,2 +1,3 @@
 It took a while to found commands for doing "eigendecomposition", also called "spectral decomposition", to a matrix. Hence I suggest adding those words to documentation of `jordan_form()`, so that next one will found them more easy.

+Also "`Matrix.random(GF(3), 2)` never generates `[[2,0],[0,2]]`" must be changed to have `Matrix.random(GF(3), 2), algorithm='unimodular')`.
f29946bc-ee7b-48cd-9abc-3445948c551d commented 8 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,5 @@
 It took a while to found commands for doing "eigendecomposition", also called "spectral decomposition", to a matrix. Hence I suggest adding those words to documentation of `jordan_form()`, so that next one will found them more easy.

 Also "`Matrix.random(GF(3), 2)` never generates `[[2,0],[0,2]]`" must be changed to have `Matrix.random(GF(3), 2), algorithm='unimodular')`.
+
+`matrix2.pyx`, `rref()` has error in link to "echelon_form".
f29946bc-ee7b-48cd-9abc-3445948c551d commented 8 years ago

Branch: u/jmantysalo/addeigendecompositionto_docstring

f29946bc-ee7b-48cd-9abc-3445948c551d commented 8 years ago

Author: Jori Mäntysalo

f29946bc-ee7b-48cd-9abc-3445948c551d commented 8 years ago

New commits:

b4b58dbTrivial additions.
f29946bc-ee7b-48cd-9abc-3445948c551d commented 8 years ago

Commit: b4b58db

c370f75d-aa64-4088-b68b-2377dcc777c5 commented 8 years ago
comment:5

I do not believe that the jordon canonical form and the eigen value decomposition are equivalent? I do not know much about this topic, but on this pdf: https://www.mathworks.com/moler/eigs.pdf

Section 10.8(page 16) seems to indicate that the JCF(jordon canonical form) gives a numerically imperfect approximation compared to the Schur form? What am I missing?

f29946bc-ee7b-48cd-9abc-3445948c551d commented 8 years ago
comment:6

Replying to @sagetrac-zonova:

I do not believe that the jordon canonical form and the eigen value decomposition are equivalent? I do not know much about this topic, but on this pdf: https://www.mathworks.com/moler/eigs.pdf

Section 10.8(page 16) seems to indicate that the JCF(jordon canonical form) gives a numerically imperfect approximation compared to the Schur form? What am I missing?

I am not an expert, got this as a comment from a teahcer. Any expert of are here?

Numerical instability is another issue, and does not count if we do not use RR on other inexact base rign.

The page says "If A is not defective, then the JCF is the same as the eigenvalue decomposition." So yes, this should be rephrased.

mezzarobba commented 8 years ago
comment:7

Replying to @jm58660:

I am not an expert, got this as a comment from a teahcer. Any expert of are here?

I'm no expert, but afaik the terms “eigendecomposition” and “spectral decomposition” are used for diagonalizable matrices only, while the Jordan form is defined for all matrices (and coincides with the eigendecomposition when the matrix is diagonalizable).

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

10286f8Eigendecomposition is only defined for diagonalizable matrices.
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from b4b58db to 10286f8

f29946bc-ee7b-48cd-9abc-3445948c551d commented 8 years ago
comment:9

Replying to @mezzarobba:

Replying to @jm58660:

(and coincides with the eigendecomposition when the matrix is diagonalizable).

OK, this corrected.

fchapoton commented 8 years ago
comment:10
sage -t --long src/sage/matrix/matrix2.pyx
    Error: TAB character found at lines 9792,9793
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from 10286f8 to 49b57f9

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

49b57f9Tabs to spaces.
f29946bc-ee7b-48cd-9abc-3445948c551d commented 8 years ago
comment:12

Arghs. Emacs and .py vs. .pyx.

fchapoton commented 8 years ago

Reviewer: Frédéric Chapoton

fchapoton commented 8 years ago
comment:13

ok, let it be.

vbraun commented 8 years ago

Changed branch from u/jmantysalo/addeigendecompositionto_docstring to 49b57f9