To write a python program to find the rank of a matrix
- Hardware – PCs
- Anaconda – Python 3.7 Installation / Moodle-Code Runner
Step 1:import numpymodule to use the built-in functions for calculation
Step 2:prepare the lists from each rank of matrix and assign in np. array
Step 3:Using the np.linalg.matrix_rank(), we can find the rank of the given matrix.
Step 4:End the program
#Program to find the rank of a matrix.
#Developed by: jegadeesh s
#RegisterNumber:22004355
import numpy as np
a=np.array([[5,-3,-10],[2,2,-3],[-3,-1,5]])
rank =np.linalg.matrix_rank(a)
print(rank)
Thus the rank for the given matrix is successfully solved by using a python program.