Open In App

Python | Numpy np.eigvals() method

Last Updated : 03 Nov, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
With the help of np.eigvals() method, we can get the eigen values of a matrix by using np.eigvals() method.
Syntax : np.eigvals(matrix) Return : Return the eigen values of a matrix.
Example #1 : In this example we can see that by using np.eigvals() method, we are able to get the eigen values of a matrix by using this method. Python3 1=1
# import numpy
from numpy import linalg as LA

# using np.eigvals() method
gfg = LA.eigvals([[1, 2], [3, 4]])

print(gfg)
Output :
[-0.37228132 5.37228132]
Example #2 : Python3 1=1
# import numpy
from numpy import linalg as LA

# using np.eigvals() method
gfg = LA.eigvals([[1, 2, 3], [4, 5, 6], [7, 8, 9]])

print(gfg)
Output :
[ 1.61168440e+01 -1.11684397e+00 -1.30367773e-15]

Next Article

Similar Reads

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy