Was ich tun möchte: Schauen Sie sich den Trace-Satz der linearen Algebra an
{\rm Tr}(PAP^{-1})={\rm Tr}(A)
$ n $ Orthogonale Matrix $ A = (a_ {ij}) $ plus die Summe der diagonalen Komponenten:
{\rm Tr}(A):=\sum_{i=1}^na_{ii}
A=\left(
\begin{matrix}
1 & 2 \\
3 & 4
\end{matrix}
\right),
P=\left(
\begin{matrix}
2 & 3 \\
4 & 5
\end{matrix}
\right)
Wird besorgt. In der Implementierung sieht es so aus:
> import numpy as np
> A = np.array([[1,2],[3,4]])
> P = np.array([[2,3],[4,5]])
> A
array([[1, 2],
[3, 4]])
> P
array([[2, 3],
[4, 5]])
Wenn der Matrixausdruck 0 ist, gibt es keine inverse Matrix.
> np.linalg.det(P)
-2.0
→ Es sieht okay aus!
> np.trace(np.dot(np.dot(P,A),inv_P))
5.0
> np.trace(A)
5
Nun, das Ergebnis ist, dass es so scheint, aber w
Dies kann natürlich kein mathematischer Beweis sein, sondern als Übungsmaterial für Python.
Recommended Posts