ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 06 Oct 2018 08:04:49 +0200Characteristic polynomial of symbolic matrix of size 7https://ask.sagemath.org/question/43839/characteristic-polynomial-of-symbolic-matrix-of-size-7/There is a problem when computing the characteristic polynomial of a matrix of size greater than 7 containing a large number of symbolic variables.
<pre><code>a = SR.var('a', 100)
M = identity_matrix(SR, 7)
for i in range(7):
for j in range(7):
M[i,j] = a[i*7+j]
print(M.charpoly().degree()) # prints 5
</code></pre>
The value it should print is 7. Over $\mathbb{Z}[a_0,a_1,\dots]$, the result is correct.
I use Sage 8.3 (Release Date: 2018-08-03), installed from the official repository of Archlinux. The bug is present both in command line and with `sage file.sage` (if I copy and paste the code above).ScreenNameSat, 06 Oct 2018 08:04:49 +0200https://ask.sagemath.org/question/43839/canonicalize_radical for matrices.https://ask.sagemath.org/question/34302/canonicalize_radical-for-matrices/The following all works
sage: a = sqrt(2)*sqrt(3)*sqrt(6)
sage: v = vector([a])
sage: M = Matrix([v, v])
sage: a.canonicalize_radical()
6
sage: v.canonicalize_radical()
(6)
However the following doesn't work:
sage: M = Matrix([v, v])
sage: M.canonicalize_radical()
EDIT: Could somebody please tell me the right place to ask for "vectorization of canonicalize_radical for matrices" as a new feature of sage?Saul SchleimerTue, 02 Aug 2016 20:46:22 +0200https://ask.sagemath.org/question/34302/Anticommutator of matriceshttps://ask.sagemath.org/question/9278/anticommutator-of-matrices/Dear all.
I was playing around with matrices, and found out that the commutator is defined, however, I didn't find the anti-commutator.
**Question**
- Is it implemented?
The implementation of commutator is about 5 lines (including comments), so the inclusion of it would be marginal.
Cheers.DoxThu, 30 Aug 2012 12:52:52 +0200https://ask.sagemath.org/question/9278/