Some important points about eigenvalues and eigenvectors:
- Eigenvalues can be complex numbers even for real matrices.
- When eigenvalues become complex, eigenvectors also become complex.
- If the matrix is symmetric (e.g A = AT), then the eigenvalues are always real.
- As a result, eigenvectors of symmetric matrices are also real.
- There will always be n linearly independent eigenvectors for symmetric matrices.
Now, let’s discuss the connection between eigenvectors and nullspace.
From this article we show that
AX = λX
Now let me ask you a question. What happens when lambda is 0? That is one of the eigenvalues becomes 0.
So, when one of the eigenvalues becomes 0, then we have this equation which is given by
AX = 0 —(equation 1)
From this article we show that
AB = 0 —(equation 2)
So you notice that equation 1 and equation 2 form are the same.
So, that basically means that X which is an eigenvector corresponding to eigenvalue, lambda equals to 0, is a null space vector, because it is just of the form that we have noticed here. So, we could say, the eigenvectors corresponding to zero eigenvalues are in the null space of the original matrix A. Conversely, if the eigenvalue corresponding to an eigenvector is not 0, then that eigenvector can not be in the null space of A. So, these are important results that we need to know.
So, this is how eigenvectors are connected to nullspace.
Consider the following A matrix
Notice that this is a symmetric matrix hence the eigenvalues are always real as I told before in the important points section.
The eigenvalues for this matrix are
λ = (0, 1, 2)
The eigenvectors corresponding to these eigenvalues are
Code: Python code to calculate eigenvalue and eigenvector
Output: Eigenvalue are : [0. 1. 2.] Eigenvectors are : [[-0.8 -0.6 0. ] [ 0.6 -0.8 0. ] [ 0. 0. 1. ]] [[0.] [0.] [0.]]
So we have noticed from our discussion before that if X1 is an eigenvector corresponding to lambda equal to 0, then this is going to be in the null space of this matrix A. Let’s verify it by multiplying A with X1. We check that
You can quite easily see that when you do this computation, you will get this (0, 0, 0), which basically shows that this is the eigenvector corresponding to zero eigenvalue.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Python sympy | Matrix.nullspace() method
- How to compute the eigenvalues and right eigenvectors of a given square array using NumPY?
- MYSQLdb Connection in Python
- Oracle Database Connection in Python
- Difference between 'and' and '&' in Python
- Important differences between Python 2.x and Python 3.x with examples
- Communication between Parent and Child process using pipe in Python
- Relationship between number of nodes and height of binary tree
- Difference between Method and Function in Python
- Python | Difference between iterable and iterator
- Difference between List and Array in Python
- Python | Difference between Pandas.copy() and copying through variables
- Difference between List comprehension and Lambda in Python
- Difference between map, applymap and apply methods in Pandas
- Difference between Python and C#
- Difference between C and Python
- Python | Check possible bijection between sequence of characters and digits
- Python | Interconversion between Dictionary and Bytes
- Python | Difference Between List and Tuple
- Difference Between Go and Python Programming Language
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.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.