Python | sympy.eigenvals() method Last Updated : 29 Jun, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 eigenvalues of a matrix. Python3 1=1 # import sympy from sympy import * # Use sympy.eigenvals() method mat = Matrix([[1, 0, 1], [2, -1, 3], [4, 3, 2]]) d = mat.eigenvals() print(d) Output : {2/3 + 46/(9*(241/54 + sqrt(36807)*I/18)**(1/3)) + (241/54 + sqrt(36807)*I/18)**(1/3): 1, 2/3 + 46/(9*(-1/2 + sqrt(3)*I/2)*(241/54 + sqrt(36807)*I/18)**(1/3)) + (-1/2 + sqrt(3)*I/2)*(241/54 + sqrt(36807)*I/18)**(1/3): 1, 2/3 + (-1/2 - sqrt(3)*I/2)*(241/54 + sqrt(36807)*I/18)**(1/3) + 46/(9*(-1/2 - sqrt(3)*I/2)*(241/54 + sqrt(36807)*I/18)**(1/3)): 1} Example #2 : Python3 1=1 # import sympy from sympy import * # Use sympy.eigenvals() method mat = Matrix([[1, 5, 1], [12, -1, 31], [4, 33, 2]]) d = mat.eigenvals() print(d) Output : {2/3 + 3268/(9*(16225/54 + sqrt(15482600967)*I/18)**(1/3)) + (16225/54 + sqrt(15482600967)*I/18)**(1/3): 1, 2/3 + 3268/(9*(-1/2 + sqrt(3)*I/2)*(16225/54 + sqrt(15482600967)*I/18)**(1/3)) + (-1/2 + sqrt(3)*I/2)*(16225/54 + sqrt(15482600967)*I/18)**(1/3): 1, 2/3 + (-1/2 - sqrt(3)*I/2)*(16225/54 + sqrt(15482600967)*I/18)**(1/3) + 3268/(9*(-1/2 - sqrt(3)*I/2)*(16225/54 + sqrt(15482600967)*I/18)**(1/3)): 1} Comment More infoAdvertise with us Next Article Python | sympy.eigenvals() method J jitender_1998 Follow Improve Article Tags : Python 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 1 min read Python | sympy.evalf() method With the help of sympy.evalf() method, we are able to evaluate the mathematical expressions. Syntax : sympy.evalf() Return : Return the evaluated mathematical expression. Example #1 : In this example we can see that by using sympy.evalf() method, we are able to evaluate the mathematical expressions. 1 min read Python | sympy.eye() method With the help of sympy.eye() method, we can find the identity matrix by using sympy.eye() method. Syntax : sympy.eye() Return : Return an identity matrix. Example #1 : In this example, we can see that by using sympy.eye() method, we are able to find identity matrix having dimension nxn, where n will 1 min read Python | sympy.diag() method With the help of sympy.diag() method, we can create a matrix having dimension nxn and filled with numbers in the diagonal by using sympy.diag() method. Syntax : sympy.diag() Return : Return a new matrix. Example #1 : In this example, we can see that by using sympy.diag() method, we are able to creat 1 min read 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:algebra 2 min read Like