Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

matrix base ring changes by a complex multiplication

The complex multiplication of matrix changes the base ring.

A = matrix(CDF,[[1,2],[3,4]]); print(A)
B = 2*A
C = I*A
print(type(A))
print(type(B))
print(type(C))

The result is

[1.0 2.0]
[3.0 4.0]
<class 'sage.matrix.matrix_complex_double_dense.Matrix_complex_double_dense'>
<class 'sage.matrix.matrix_complex_double_dense.Matrix_complex_double_dense'>
<class 'sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense'>

So the multiplication by an imaginary number breaks the CDF property. This is very inconvenient for numerical calculations, because the symbolic computation is very slow.