|   | 1 |  initial version  | 
The generalized eigenvector decomposition is not implemented over the integer ring:
sage: A = matrix.identity(2) 
sage: B = matrix([[3, 5], [6, 10]])
sage: A.eigenmatrix_right(B)                                                    
Traceback (most recent call last):
...
NotImplementedError: generalized eigenvector decomposition is implemented for RDF and CDF, but not for Integer Ring
sage: A.parent()                                                                
Full MatrixSpace of 2 by 2 dense matrices over Integer Ring
As mentionned above in the error message, it works over the real double field RDF and over the complex double field CDF:
sage: A_cdf = A.change_ring(CDF)                                                
sage: A_cdf.parent()                                                            
Full MatrixSpace of 2 by 2 dense matrices over Complex Double Field
sage: B_cdf = B.change_ring(CDF)
sage: A_cdf.eigenmatrix_right(B_cdf)                                            
(
[0.07692307692307694                 0.0]
[                0.0           +infinity],
[-0.4472135954999579 -0.8574929257125443]
[-0.8944271909999161  0.5144957554275263]
)
You may specify the field from the start:
sage: A = matrix.identity(RDF, 2) 
sage: B = matrix(RDF, [[3, 5], [6, 10]])
This code was added recently to SageMath, more precisely, in version 9.2 thanks to Markus Wageringel, see ticket #29243.
|   | 2 |  No.2 Revision  | 
The This code doing this was added recently to SageMath, more precisely, in version 9.2 thanks to Markus Wageringel, see ticket #29243. I believe the error you obtain comes from an earlier version of SageMath.
For example, the generalized eigenvector decomposition is not implemented over the integer ring:ring. A NotImplementedError is raised instead of a TypeError:
sage: A = matrix.identity(2) 
sage: B = matrix([[3, 5], [6, 10]])
sage: A.eigenmatrix_right(B)                                                    
Traceback (most recent call last):
...
NotImplementedError: generalized eigenvector decomposition is implemented for RDF and CDF, but not for Integer Ring
sage: A.parent()                                                                
Full MatrixSpace of 2 by 2 dense matrices over Integer Ring
As mentionned above in the error message, it works over the real double field RDF and over the complex double field CDF:
sage: A_cdf = A.change_ring(CDF)                                                
sage: A_cdf.parent()                                                            
Full MatrixSpace of 2 by 2 dense matrices over Complex Double Field
sage: B_cdf = B.change_ring(CDF)
sage: A_cdf.eigenmatrix_right(B_cdf)                                            
(
[0.07692307692307694                 0.0]
[                0.0           +infinity],
[-0.4472135954999579 -0.8574929257125443]
[-0.8944271909999161  0.5144957554275263]
)
You may specify the field from the start:
sage: A = matrix.identity(RDF, 2) 
sage: B = matrix(RDF, [[3, 5], [6, 10]])
10]])       
sage: A.eigenmatrix_right(B)
This code was added recently to SageMath, more precisely, in version 9.2 thanks to Markus Wageringel, see ticket #29243.
|   | 3 |  No.3 Revision  | 
This code doing this was added recently to SageMath, more precisely, in version 9.2 thanks to Markus Wageringel, see ticket #29243. I believe the error you obtain comes from an earlier version of SageMath.
For example, the generalized eigenvector decomposition is not implemented over the integer ring. A NotImplementedError is raised instead of a TypeError:
sage: A = matrix.identity(2) 
sage: B = matrix([[3, 5], [6, 10]])
sage: A.eigenmatrix_right(B)                                                    
Traceback (most recent call last):
...
NotImplementedError: generalized eigenvector decomposition is implemented for RDF and CDF, but not for Integer Ring
sage: A.parent()                                                                
Full MatrixSpace of 2 by 2 dense matrices over Integer Ring
As mentionned above in the error message, it works over the real double field RDF and over the complex double field CDF:
sage: A_cdf = A.change_ring(CDF)                                                
sage: A_cdf.parent()                                                            
Full MatrixSpace of 2 by 2 dense matrices over Complex Double Field
sage: B_cdf = B.change_ring(CDF)
sage: A_cdf.eigenmatrix_right(B_cdf)                                            
(
[0.07692307692307694                 0.0]
[                0.0           +infinity],
[-0.4472135954999579 -0.8574929257125443]
[-0.8944271909999161  0.5144957554275263]
)
You may prefer to specify the field from the start:
sage: A = matrix.identity(RDF, 2) 
sage: B = matrix(RDF, [[3, 5], [6, 10]])       
sage: A.eigenmatrix_right(B)
|   | 4 |  No.4 Revision  | 
This code doing this feature was added recently to SageMath, more precisely, in version 9.2 thanks to Markus Wageringel, see ticket #29243. I believe the error you obtain comes from an earlier version of SageMath.
For example, the generalized eigenvector decomposition is not implemented over the integer ring. A NotImplementedError is raised instead of a TypeError:
sage: A = matrix.identity(2) 
sage: B = matrix([[3, 5], [6, 10]])
sage: A.eigenmatrix_right(B)                                                    
Traceback (most recent call last):
...
NotImplementedError: generalized eigenvector decomposition is implemented for RDF and CDF, but not for Integer Ring
sage: A.parent()                                                                
Full MatrixSpace of 2 by 2 dense matrices over Integer Ring
As mentionned above in the error message, it works over the real double field RDF and over the complex double field CDF:
sage: A_cdf = A.change_ring(CDF)                                                
sage: A_cdf.parent()                                                            
Full MatrixSpace of 2 by 2 dense matrices over Complex Double Field
sage: B_cdf = B.change_ring(CDF)
sage: A_cdf.eigenmatrix_right(B_cdf)                                            
(
[0.07692307692307694                 0.0]
[                0.0           +infinity],
[-0.4472135954999579 -0.8574929257125443]
[-0.8944271909999161  0.5144957554275263]
)
You may prefer to specify the field from the start:
sage: A = matrix.identity(RDF, 2) 
sage: B = matrix(RDF, [[3, 5], [6, 10]])       
sage: A.eigenmatrix_right(B)
|   | 5 |  No.5 Revision  | 
This feature was added recently to SageMath, more precisely, in version 9.2 thanks to Markus Wageringel, see ticket #29243. I believe the error you obtain comes from an earlier version of SageMath.
For example, the generalized eigenvector decomposition is not implemented over the integer ring. A NotImplementedError is raised instead of a TypeError:
sage: A = matrix.identity(2) 
sage: B = matrix([[3, 5], [6, 10]])
sage: A.eigenmatrix_right(B)                                                    
Traceback (most recent call last):
...
NotImplementedError: generalized eigenvector decomposition is implemented for RDF and CDF, but not for Integer Ring
sage: A.parent()                                                                
Full MatrixSpace of 2 by 2 dense matrices over Integer Ring
As mentionned above in the error message, it works over the real double field RDF and over the complex double field CDF:
sage: A_cdf = A.change_ring(CDF)                                                
sage: A_cdf.parent()                                                            
Full MatrixSpace of 2 by 2 dense matrices over Complex Double Field
sage: B_cdf = B.change_ring(CDF)
sage: A_cdf.eigenmatrix_right(B_cdf)                                            
(
[0.07692307692307694                 0.0]
[                0.0           +infinity],
[-0.4472135954999579 -0.8574929257125443]
[-0.8944271909999161  0.5144957554275263]
)
You may prefer to specify the field from the start:
sage: A = matrix.identity(RDF, 2) 
sage: B = matrix(RDF, [[3, 5], [6, 10]])       
sage: A.eigenmatrix_right(B)
sage: A.eigenmatrix_left(B)
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.