id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
30518 eigenvectors over QQbar are incorrectly conjugated Markus Wageringel "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.* = 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
}}}" defect closed blocker sage-9.3 number fields fixed Vincent Delecroix Vincent Delecroix Marc Mezzarobba N/A c227dad03dbef66c5ab1b2ba3c3cd9e7155c8bed c227dad03dbef66c5ab1b2ba3c3cd9e7155c8bed #31628
*