Ask Your Question

Revision history [back]

Example:

A = Matrix([[2,0,0,0],[1,2,0,0],[0,1,3,0],[0,0,1,3]])
for (l, E) in A.right_eigenspaces():
    print('Eigenvalue', l, 'has geometric multiplicity', E.dimension())

Output:

Eigenvalue 3 has geometric multiplicity 1
Eigenvalue 2 has geometric multiplicity 1