Overview:
- When a square matrix is multiplied with its inverse matrix, the resulatant matrix is the identity matrix.
- The function inv() of the numpy.linalg module returns the inverse matrix of a given matrix.
- Not all matrices have their inverse matrices. The matrices that do not have an inverse are called singular matrices.
Example:
# Example Python program that finds the inverse matrix of a given matrix # Format of floating point numbers while printing # Create a square matrix # Find the inverse of the matrix |
Output:
Matrix: [[1 3] [5 7]] Inverse of the matrix: [[-0.88 0.38] [0.62 -0.12]] |