@@ -3054,15 +3054,15 @@ def random_diagonalizable_matrix(parent, eigenvalues=None, dimensions=None):
3054
3054
"""
3055
3055
Create a random matrix that diagonalizes nicely.
3056
3056
3057
- To be used as a teaching tool. Return matrices have only real
3058
- eigenvalues.
3057
+ To be used as a teaching tool. If the ring used is QQ then return matrices
3058
+ have real eigenvalues. Otherwise eignevalues are elements of the ring .
3059
3059
3060
3060
INPUT:
3061
3061
3062
3062
If eigenvalues and dimensions are not specified in a list,
3063
3063
they will be assigned randomly.
3064
3064
3065
- - ``parent`` -- the desired size of the square matrix
3065
+ - ``parent`` -- the matrix space required
3066
3066
3067
3067
- ``eigenvalues`` -- the list of desired eigenvalues (default=None)
3068
3068
@@ -3071,9 +3071,10 @@ def random_diagonalizable_matrix(parent, eigenvalues=None, dimensions=None):
3071
3071
3072
3072
OUTPUT:
3073
3073
3074
- A square, diagonalizable, matrix with only integer entries. The
3075
- eigenspaces of this matrix, if computed by hand, give basis
3076
- vectors with only integer entries.
3074
+ A square, diagonalizable, matrix. If the ring used is QQ then we have
3075
+ integer entries. Otherwise entries are elements of the ring. If the
3076
+ ring used is QQ the eigenspaces of this matrix, if computed by hand,
3077
+ give basis vectors with only integer entries.
3077
3078
3078
3079
.. NOTE::
3079
3080
@@ -3120,7 +3121,7 @@ def random_diagonalizable_matrix(parent, eigenvalues=None, dimensions=None):
3120
3121
3121
3122
TESTS:
3122
3123
3123
- Eigenvalues must all be integers . ::
3124
+ Eigenvalues must all be elements of the ring . ::
3124
3125
3125
3126
sage: random_matrix(QQ, 3, algorithm='diagonalizable', # needs sage.symbolic
3126
3127
....: eigenvalues=[2+I, 2-I, 2], dimensions=[1,1,1])
0 commit comments