This repository was archived by the owner on Feb 1, 2023. It is now read-only.
Commit bd3334c
Release Manager
Trac #30518: eigenvectors over QQbar are incorrectly conjugated
Eigenvectors over QQbar could get incorrectly conjugated. In the
following example from [https://groups.google.com/g/sage-
devel/c/9Ss98-XKR9c devel], the eigenvectors of a matrix over
`QuadraticField(-1)` are computed in two ways, one of which incorrectly
returns the conjugate of some eigenvectors.
By converting the matrix to `QQbar` first:
{{{
sage: K.<i> = QuadraticField(-1)
sage: m = matrix(K, 4, [2,4*i,-i,0, -4*i,2,-1,0, 2*i,-2,0,0, 4*i+4,
4*i-4,1-i,-2])
sage: sorted([(e, matrix.column(vs)) for e, vs, _ in
m.change_ring(QQbar).eigenvectors_right()])
[(
[ 1 0]
[1*I 0]
[ 0 0]
-2, [ 0 1]
),
(
[ 1.000000000000000? + 0.?e-16*I]
[ 0.?e-16 - 1.000000000000000?*I]
[ 0.?e-16 - 6.605551275463989?*I]
-0.6055512754639893?, [1.000000000000000? + 1.000000000000000?*I]
),
(
[ 1.000000000000000? + 0.?e-17*I]
[ 0.?e-17 - 1.000000000000000?*I]
[ 0.?e-17 + 0.6055512754639893?*I]
6.605551275463989?, [1.000000000000000? + 1.000000000000000?*I]
)]
}}}
Supposedly, this result is correct. In contrast, computing the
eigenvectors directly, without first converting to `QQbar`, leads to
some eigenvectors getting conjugated:
{{{
sage: sorted([(QQbar(e), matrix.column(QQbar, vs)) for e, vs, _ in
m.eigenvectors_right()])
[(
[1 0]
[I 0]
[0 0]
-2, [0 1]
),
(
[ 1]
[ 0.?e-54 + 1.000000000000000?*I]
[ 0.?e-53 + 6.605551275463989?*I]
-0.6055512754639893?, [1.000000000000000? - 1.000000000000000?*I]
),
(
[ 1]
[ 0.?e-53 + 1.000000000000000?*I]
[ 0.?e-52 - 0.6055512754639893?*I]
6.605551275463989?, [1.000000000000000? - 1.000000000000000?*I]
)]
}}}
Note that the `QuadraticField` constructor automatically sets an
embedding.
{{{
sage: K.coerce_embedding()
Generic morphism:
From: Number Field in i with defining polynomial x^2 + 1 with i = 1*I
To: Complex Lazy Field
Defn: i -> 1*I
}}}
URL: https://trac.sagemath.org/30518
Reported by: gh-mwageringel
Ticket author(s): Vincent Delecroix
Reviewer(s): Marc Mezzarobba1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6590 | 6590 | | |
6591 | 6591 | | |
6592 | 6592 | | |
| 6593 | + | |
| 6594 | + | |
| 6595 | + | |
| 6596 | + | |
| 6597 | + | |
| 6598 | + | |
6593 | 6599 | | |
6594 | 6600 | | |
6595 | 6601 | | |
| |||
0 commit comments