单位矩阵属性(I ^ k = I)| 使用Python的线性代数

Prerequisites:

先决条件:

In linear algebra, the identity matrix, of size n is the n × n square matrix with ones on the main diagonal and zeros elsewhere. It is denoted by I. Also known as the unit matrix because its determinant value is 1 irrespective of size. This is the key feature of an Identity matrix and it plays an important role in Linear Algebra.

在线性代数中,大小为n的单位矩阵是n×n方阵,主对角线上为1,其他地方为零。 用I表示。 也称为单位矩阵,因为其行列式值为1,与大小无关。 这是恒等矩阵的关键特征,在线性代数中起着重要的作用。

The identity matrix has the property that, Multiplying k identity matrices gives an identity matrix (Ik = I).

单位矩阵具有以下性质:将k个单位矩阵相乘得到一个单位矩阵( I k = I )。

身份矩阵属性的Python代码( IK = I) (Python code for identity matrix property (Ik = I))

# Linear Algebra Learning Sequence
# Identity Matrix Property (I^k = I)

import numpy as np

# identity Matrix 
I = np.eye(4)   
print("\n---I(4x4)---\n", I)

k = 14
Ik = I

for i in range(14):
    Ik = I*Ik

print('\n\n--- I^k ----\n', Ik)

Output:

输出:

---I(4x4)---
 [[1. 0. 0. 0.]
 [0. 1. 0. 0.]
 [0. 0. 1. 0.]
 [0. 0. 0. 1.]]


--- I^k ----
 [[1. 0. 0. 0.]
 [0. 1. 0. 0.]
 [0. 0. 1. 0.]
 [0. 0. 0. 1.]]


翻译自: https://www.includehelp.com/python/identity-matrix-property-i-k-i.aspx

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值