首页 > 编程知识 正文

如何用python求矩阵的行列式,矩阵的转置用python怎样输入

时间:2023-05-05 18:51:11 阅读:270386 作者:3338

线性代数矩阵转置乘法

Prerequisite:

先决条件:

Defining Matrix using Numpy

使用Numpy定义矩阵

Determinant of a Matrix

矩阵的行列式

Transpose Matrix

转置矩阵

Here, we will learn that the determinant of the transpose is equal to the matrix itself. This is one of the key properties in Linear Algebra and is being used in major parts of Matrix and Determinants.

在这里,我们将了解转置的行列式等于矩阵本身。 这是线性代数的关键属性之一,并且在矩阵和行列式的主要部分中使用。

Example:

例:

使用Python代码查找转置矩阵的行列式 (Python code to find the determinant of a transpose matrix) # Linear Algebra Learning Sequence# Transpose Determinantimport numpy as npM1 = np.array([[2,1,4], [2,1,2], [2,3,2]])print("Matrix (M1) :n", M1)print("Transpose (M1.T) :n", M1.T)print()print('nnDeterminant of Matrix : ', np.linalg.det(M1))print('nDeterminant of transpose : ', np.linalg.det(M1.T))

Output:

输出:

Matrix (M1) : [[2 1 4] [2 1 2] [2 3 2]]Transpose (M1.T) : [[2 2 2] [1 1 3] [4 2 2]]Determinant of Matrix : 7.999999999999998Determinant of transpose : 7.999999999999998

翻译自: https://www.includehelp.com/python/determinant-of-a-transpose-matrix.aspx

线性代数矩阵转置乘法

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。