# 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 saysNullity + 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
- Personnel involved in Database Management System
- System Protection in Operating System
- Difference between Fixed and Dynamic Channel Allocations
- C-SCAN Disk Scheduling Algorithm
- Advantages of cracking GATE from Indian Perspective
- Different Classes of CPU Registers
- OSI, TCP/IP and Hybrid models
- Last Minute Notes Computer Organization
- Local Broadcast and Loopback Address
- Difference between Posteriori and Priori analysis
- Cascadeless in DBMS
- Weak Entity Set in ER diagrams
- Boyce-Codd Normal Form (BCNF)

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.