To write a python program to find the rank of a matrix
- Hardware – PCs
- Anaconda – Python 3.7 Installation / Moodle-Code Runner
import a python library called numpy
assign numpy array
Using the np.linalg.matrix_rank(), we can find the rank of the given matrix.
give print statement and end the program
#Program to find the rank of a matrix.
#Developed by:Sowmiya N
#RegisterNumber:21500134
import numpy as np ## iim
A=np.array([[3,2,5],[1,1,2],[3,3,6]])
values=np.linalg.matrix_rank(A)
print(values)
Thus the rank for the given matrix is successfully solved by using a python program.