# Python sympy | Matrix.eigenvects() method

With the help of sympy.Matrix().eigenvects() method, we can find the Eigenvectors of a matrix. eigenvects() method returns a list of tuples of the form (eigenvalue:algebraic multiplicity, [eigenvectors]).

Syntax: Matrix().eigenvects()

Returns: Returns a list of tuples of the form (eigenvalue:algebraic multiplicity, [eigenvectors]).

Example #1:

 `# import sympy  ` `from` `sympy ``import` `*` `M ``=` `Matrix([[``3``, ``-``2``,  ``4``, ``-``2``],  ` `                                ``[``5``,  ``3``, ``-``3``, ``-``2``], ` `                                ``[``5``, ``-``2``,  ``2``, ``-``2``], ` `                                ``[``5``, ``-``2``, ``-``3``,  ``3``]]) ` ` `  `print``(``"Matrix : {} "``.``format``(M)) ` `  `  `# Use sympy.eigenvects() method  ` `M_eigenvects ``=` `M.eigenvects()   ` `     `  `print``(``"Eigenvects of a matrix : {}"``.``format``(M_eigenvects))   `

Output:

Matrix : Matrix([[3, -2, 4, -2], [5, 3, -3, -2], [5, -2, 2, -2], [5, -2, -3, 3]])
Eigenvects of a matrix : [(-2, 1, [Matrix([
[0],
[1],
[1],
[1]])]), (3, 1, [Matrix([
[1],
[1],
[1],
[1]])]), (5, 2, [Matrix([
[1],
[1],
[1],
[0]]), Matrix([
[ 0],
[-1],
[ 0],
[ 1]])])]

Example #2:

 `# import sympy  ` `from` `sympy ``import` `*` `M ``=` `Matrix([[``1``, ``-``3``, ``3``], [``3``, ``-``5``, ``3``], [``6``, ``-``6``, ``4``]])  ` `print``(``"Matrix : {} "``.``format``(M)) ` `  `  `# Use sympy.eigenvects() method  ` `M_eigenvects ``=` `M.eigenvects()   ` `     `  `print``(``"Eigenvects of a matrix : {}"``.``format``(M_eigenvects)) `

Output:

Matrix : Matrix([[1, -3, 3], [3, -5, 3], [6, -6, 4]])
Eigenvects of a matrix : [(-2, 2, [Matrix([
[1],
[1],
[0]]), Matrix([
[-1],
[ 0],
[ 1]])]), (4, 1, [Matrix([
[1/2],
[1/2],
[ 1]])])]

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.