Nullity of a Matrix
Prerequisite – Mathematics | System of Linear Equations
Let A be a matrix. Since, number of non-zero rows in the row reduced form of a matrix A is called the rank of A, denoted as rank(A) and Nullity is the complement to the rank of a matrix .Please go through the Prerequisite first and read the rank topic, then come to this topic.
Therefore, Nullity of a matrix is calculated from rank of the matrix using the following steps:Let A[m*n] matrix, then:
- Calculate rank (r) of the Matrix.
- Use The Rank Plus Nullity Theorem, it says
Nullity + rank = number of columns (n)
Therefore, you will be able to calculate nullity as
Nullity = no. of columns(n) - rank(r)
Consider the examples:
Example-1:
Input: mat[][] = {{10, 20, 10},
{20, 40, 20},
{30, 50, 0}}
Output: Rank is 2 and hence Nullity is 1
Explanation: Ist and IInd rows are linearly dependent. But Ist and 3rd or IInd and IIIrd are independent, so Rank is 2 and hence Nullity is (3-2) = 1.
Example-2:
Input: mat[][] = {{1, 2, 1},
{2, 3, 1},
{1, 1, 2}}
Output: Rank is 3 and hence Nullity is 0
Explanation: Ist and IInd and IIIrd rows are linearly dependent, so Rank is 3 and hence Nullity is (3-3) = 0.
Recommended Posts:
- Mathematics | Matrix Introduction
- Conditions for Deadlock in Operating System
- Determining Countability in TOC
- Thread Control Block in Operating System
- Thread States in Operating Systems
- Algorithm for non recursive Predictive Parsing
- Adders and Subtractors in Digital Logic
- Advantages of Database Management System
- Program to show Belady's Anomaly
- Static and Dynamic Linking in Operating Systems
- Removing Direct and Indirect Left Recursion in a Grammar
- Total Recursive Functions and Partial Recursive Functions in Automata
- Introduction of Shortest Remaining Time First (SRTF) algorithm
- IIT Kanpur M. Tech Interview Experience
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.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.


