To write a python program to find the rank of a matrix.
- Hardware – PCs
- Anaconda – Python 3.7 Installation / Moodle-Code Runner
Import numpy as py.
Assign in py.array() in rank of matrix.
Using the py.linalg.matrix_rank(), we can find the rank of the given matrix.
Print the value and end the program.
#Program to find the rank of a matrix.
#Developed by: Mohammed Faizal.J
#RegisterNumber:22003412
import numpy as py
a=py.array([[1,2,3],[3,6,9]])
rank=py.linalg.matrix_rank(a)
print(rank)
Thus the rank for the given matrix is successfully solved by using a python program.