Inverse of a Rectangular Matrix
Explore the inverse of rectangular matrices and the idea of left and right inverses.
We'll cover the following...
We’ve already discussed the inverse of a square matrix in detail and provided multiple examples. In this lesson, we’ll extend the discussion to rectangular matrices, which are matrices that have a different number of columns and rows.
Rank and invertibility
The rank of a matrix generally answers the question of invertibility. An matrix is invertible if it has either a full column rank or a full row rank.
Also, for any matrix, ,
import numpy as npfrom numpy.linalg import matrix_rank as rorder = np.random.randint(low=2, high=10, size=2)m, n = order[0], order[1]A = np.random.rand(m, n)print(f'order(A)={A.shape}\nr(A)={r(A)}\nr(ATA)={r(A.T.dot(A))}\nr(AAT)={r(A.dot(A.T))}')
For square matrices, the number of rows, , is equal to the number of columns, . This allows square matrices to have a
Left inverse
If a matrix, , has full column rank, , then it would have a left inverse, , such that:
A matrix with a full column rank could have multiple left inverses.
One possibility is:
...