Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Python Tutorial
  • Interview Questions
  • Python Quiz
  • Python Glossary
  • Python Projects
  • Practice Python
  • Data Science With Python
  • Python Web Dev
  • DSA with Python
  • Python OOPs
Open In App
Next Article:
Python | sympy.Matrix.col() method
Next article icon

Python sympy | Matrix.eigenvects() method

Last Updated : 26 Aug, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report

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]])])]



Next Article
Python | sympy.Matrix.col() method
author
rupesh_rao
Improve
Article Tags :
  • Python
  • SymPy
Practice Tags :
  • python

Similar Reads

  • Python | sympy.Matrix.eigenvals() method
    With the help of sympy.Matrix.eigenvals() method, we can find the eigen values of the matrix. Syntax : sympy.Matrix().eigenvals() Return : Return the eigen values of a matrix. Example #1 : In the given example we can see that the sympy.Matrix.eigenvals() method is used to find the eigen values of a
    1 min read
  • Python | sympy.Matrix.col() method
    With the help of sympy.Matrix().col() method, we can extract the columns of the matrix. Syntax : sympy.Matrix().col() Return : Return the col of a matrix. Example #1 : In the given example we can see that the sympy.Matrix.col() method is used to extract the columns of a matrix. # Import all the meth
    1 min read
  • Python sympy | Matrix.diagonalize() method
    With the help of sympy.Matrix().diagonalize() method, we can diagonalize a matrix. diagonalize() returns a tuple [Tex](P, D)[/Tex], where [Tex]D[/Tex] is diagonal and [Tex]M = PDP^{-1}[/Tex]. Syntax: Matrix().diagonalize() Returns: Returns a tuple of matrix where the second element represents the di
    1 min read
  • Python | sympy.Matrix() method
    With the help of sympy.Matrix() method, we can make, rearrange, extract the different rows and columns in a matrix which is created by sympy.Matrix() method. Syntax : sympy.Matrix() Return : Return a matrix. Example #1 :In this example, we can see that by using sympy.Matrix() method, we can create a
    1 min read
  • Python | sympy.eigenvals() method
    With the help of sympy.eigenvals() method, we can find the eigenvalues of a matrix by using sympy.eigenvals() method. Syntax : sympy.eigenvals() Return : Return eigenvalues of a matrix. Example #1 : In this example, we can see that by using sympy.eigenvals() method, we are able to find the eigenvalu
    1 min read
  • Python | sympy.Matrix.row_del() method
    With the help of sympy.Matrix.row_del() method, we can delete the rows of the matrix. Syntax : sympy.Matrix().row_del() Return : Return a new matrix. Example #1 : In the given example we can see that the sympy.Matrix.row_del() method is used to delete the row of a matrix and return a new matrix. # I
    1 min read
  • Python | sympy.Matrix.col_del() method
    With the help of sympy.Matrix.col_del() method, we can delete the columns of the matrix. Syntax : sympy.Matrix().col_del() Return : Return a new matrix. Example #1 : In the given example we can see that the sympy.Matrix.col_del() method is used to delete the column of a matrix and return a new matri
    1 min read
  • Python | sympy.Matrix.row() method
    With the help of sympy.Matrix.row() method, we can extract the rows of the matrix. Syntax : sympy.Matrix.row() Return : Return the row of a matrix. Example #1 : In the given example we can see that the sympy.Matrix().row() method is used to extract the rows of a matrix. # Import all the methods from
    1 min read
  • Python sympy | Matrix.columnspace() method
    With the help of sympy.Matrix().columnspace() method, we can find the Columnspace of a Matrix. Matrix().columnspace() returns a list of column vectors that span the columnspace of the matrix. Syntax: Matrix().columnspace() Returns: Returns a list of column vectors that span the columnspace of the ma
    1 min read
  • Python | Sympy Ellipse.equation() method
    In sympy, the function Ellipse.equation() is used to make the equation of the given ellipse. Syntax: Ellipse.equation(x='x', y='y', _slope=None) Parameters: x : Label for the x-axis. Default value is ‘x’. y : Label for the y-axis. Default value is ‘y’. _slope : The slope of the major axis. Ignored w
    1 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences