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 np
Assign in np.array()in rank of matrix
Using the np.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 matrix
#Devoloped by:Monisha T
#Registernumber:21500314
import numpy as np
A = np.array([[5,-3,-10],[2,2,-3],[-3,-1,5]])
value = np.linalg.matrix_rank(A)
print(value)
Thus the rank for the given matrix is successfully solved by using a python program.