线性代数行列式 和矩阵
Prerequisites:
先决条件:
In linear algebra, the determinant is a scalar value that can be computed for a square matrix and represents certain properties of the matrix. The determinant of a matrix A is denoted det(A) or det A or |A|. There are matrices such as Zero and Ones matrices which have a constant determinant value and that is 0.
在线性代数中,行列式是可以为方矩阵计算的标量值,代表矩阵的某些属性。 矩阵A的行列式表示为det(A)或det A或| A |。 。 存在矩阵(例如零和一的矩阵)具有恒定的行列式值且为0。
Using python library function, we will find the determinant of various zero and ones matrices.
使用python库函数,我们将找到各种零和一矩阵的行列式 。
用于演示零和一矩阵行列式的Python代码 (Python code for demonstrating the determinant of a zeros and ones matrices)
# Linear Algebra Learning Sequence
# Determinant of a Zeros and Ones matrices
import numpy as np
oneM = np.ones([4,4])
det_oneM = np.linalg.det(oneM)
zeroM = np.zeros([4,4])
det_zeroM = np.linalg.det(zeroM)
print("Ones Matrix: \n", oneM, "\nDeterminant : ", det_oneM)
print("\n\nZeros Matrix: \n", zeroM, "\nDeterminant : ", det_zeroM)
Output:
输出:
Ones Matrix:
[[1. 1. 1. 1.]
[1. 1. 1. 1.]
[1. 1. 1. 1.]
[1. 1. 1. 1.]]
Determinant : 0.0
Zeros Matrix:
[[0. 0. 0. 0.]
[0. 0. 0. 0.]
[0. 0. 0. 0.]
[0. 0. 0. 0.]]
Determinant : 0.0
翻译自: https://www.includehelp.com/python/determinant-of-a-zeros-and-ones-matrices.aspx
线性代数行列式 和矩阵