1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Python [線形代数~行列式,逆行列,固有値,固有ベクトル]

Last updated at Posted at 2019-09-21

#目次
1.必要なライブラリ一覧
2.numpyを用いた行列表記方法
3.行列式
4.逆行列
5.固有値と固有ベクトル

##1.必要なライブラリ一覧

python05.py
import scipy.linalg as linalg
from scipy.optimize import minimize_scalar
import numpy as np

##2.numpyを用いた行列表記方法

python06.py
mat=np.array([[1,2,3] , [1,3,2] , [3,1,2]])
print(mat)

##3.行列式

python06.py
mat=np.array([[1,2,3] , [1,3,2] , [3,1,2]])
print(mat)

a = linalg.det(mat)
print("行列式")
print(a)

##4.逆行列

python07.py
b = linalg.inv(mat)
print("逆行列")
print(b)

##5.固有値と固有ベクトル

python0.py
c , d = linalg.eig(mat)

print("固有値")
print(c)

print("固有ベクトル")
print(d)
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?