Eigenvalue and EigenVector with Numpy

- 2 mins

png

Image is from wikipedia

In linear algebra, an eigenvector or characteristic vector of a linear transformation is a non-zero vector that only changes by a scalar factor, when that linear transformation is applied to it. More formally, if T is a linear transformation from a vector space V over a field F into itself and v is a vector in V that is not the zero vector, then v is an eigenvector of T if T(v) is a scalar multiple of v. This condition can be written as the equation

Definition:

let A be an n by n matrix.A scalar is called an Eigenvalue of matrix A if there is a non zero vector such that . Such a vector is called an eigenvector of matrix A corresponding to eigenvector

Example

show that is an eigenvector of \( : A = \left\lgroup \matrix{3 & 2 \cr 3 & -2} \right\rgroup : \) corresponding to

Solution

from we want to show that \( \left\lgroup \matrix{3 & 2 \cr 3 &-2} \right\rgroup \) = we simply multiply the matrix and if the both side are equal then we say the vector is an eigenvector corresponding to the scalar eigenvalue

solving the above matrixes give Hence is an Eigenvector of corresponding to an eigenvalue

Solving Eigenvector and Eigenvalue of a matrix using Numpy

>>import numpy as np

>>A = np.array([[3,2],[3,-2]])

>>A
>>array([[ 3,  2],
     [ 3, -2]])

>>eigenvalue, eigenvector = np.linalg.eig(A)

>>eigenvalue
>>array([ 4., -3.])

>>eigenvector
>>array([[ 0.89442719, -0.31622777],
                   [ 0.4472136 ,  0.9486833 ]])

we usually get two eigenvalues which we will subsequently use to get the corresponding eigenvector of the given matrix

Mustapha Omotosho

Mustapha Omotosho

constant learner,machine learning enthusiast,huge Barcelona fan

comments powered by Disqus
rss facebook twitter github youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora