线性代数矩阵乘积的逆
Prerequisites:
先决条件:
In linear algebra, an nxn square matrix A can be called as invertible if its inverse exists. Notice that, there cannot be a non-square matrix whose inverse exists. In this tutorial, we are going to check and verify one of the properties of Invertible Matrices.
在线性代数中,如果存在一个nxn方阵A的逆,则它可以称为可逆的。 注意,不能存在一个存在逆函数的非方阵。 在本教程中,我们将检查和验证可逆矩阵的属性之一。
用于查找矩阵乘积及其逆属性的Python代码 (Python code to find the product of a matrix and its inverse property)
# Linear Algebra Learning Sequence
# Inverse Property A.AI = I [AI = inverse of A]
import numpy as np
M = np.array([[2,3,4], [4,4,8], [4,8,7]])
print("---Matrix A---\n", M)
MI = np.linalg.inv(M)
print('\n\nInverse of A (AI) as ----\n', MI)
pro = np.dot(MI,M)
print('\n\nProduct of Matrix A with its Inverse : A * AI = I \n\n', pro)
Output:
输出:
---Matrix A---
[[2 3 4]
[4 4 8]
[4 8 7]]
Inverse of A (AI) as ----
[[-9. 2.75 2. ]
[ 1. -0.5 0. ]
[ 4. -1. -1. ]]
Product of Matrix A with its Inverse : A * AI = I
[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]
翻译自: https://www.includehelp.com/python/product-of-a-matrix-and-its-inverse-property.aspx
线性代数矩阵乘积的逆