线性代数矩阵乘积的逆_矩阵的乘积及其逆性质 使用Python的线性代数

线性代数矩阵乘积的逆

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的逆,则它可以称为可逆的。 注意,不能存在一个存在逆函数的非方阵。 在本教程中,我们将检查和验证可逆矩阵的属性之一。

-.1 = I-.1 = I

用于查找矩阵乘积及其逆属性的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

线性代数矩阵乘积的逆

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值