December 2017
Intermediate to advanced
386 pages
10h 42m
English
In the following section, we will look into how to implement the same in Python.
The function to extract the matrix rank of a given matrix is available in numpy.linalg as matrix_rank.
import numpy as np
a=np.array([[3,2,-1],[2,-3,-5],[-1,-4,-3]])
np.linalg.matrix_rank(a)2
From the preceding code, we can see that the rank of the initialized matrix is 2.
The nullity of a matrix is the difference between the number of columns and the rank of a matrix.
In this particular example, the nullity of matrix is as follows:
In the following code, we'll ...
Read now
Unlock full access