ベクトルと行列

基本計算

m={{a,b,c},{d,e,f},{g,h,i}}

m // MatrixForm

v={x,y,z}

m . v

v . m

u = {r,s,t}

v . u

m . m

% //MatrixForm

KroneckerProduct[u,v]

% //MatrixForm

行列計算

Array[a, {3,3}]

ma =Array[a, {3,3}] /. a[x_,y_]-> x -y

Transpose[ma]

IdentityMatrix[3]

d=DiagonalMatrix[{a,b,c}]

d.ma

a = {{1,2,3},{1,0,1},{1,2,1}}

Det[a]

tr=Sum[a[[i,i]],{i, 1, Length[a]}]

Inverse[a]

MatrixPower[a, 2]

Inverse[MatrixPower[a, 2]]

Eigenvalues and Eigenvectors

Eigenvalues[b={{0,1,1},{1,0,1},{0,1,1}}]

Eigenvectors[b]

es=Eigensystem[b]

ee=Table[{es[[1,i]], es[[2,i]]}, {i,1,Length[b]}]

固有値と固有ベクトル

正方行列 m の固有値と固有ベクトルのリスト {values, vectors} を与えるEigensystem[m]

r={{1,1,1},{1,0,0},{0,1,0}}

Eigensystem[r]

EigenSet[m_] := Module[ {i,es = Eigensystem[m] },
 Table[{es[[1,i]], es[[2,i]]}, {i,1,Length[m]}]
]

res=N[EigenSet[r]]

ListOfEigenvalue = Table[res[[i,1]],{i, 1, Length[res]}]

showEigenvalues[lst_List] := Module[{x,eigenpoints},
pt[x_Complex] := Point[{Re[x], Im[x]}];
eigenpoints = Map[pt[#] &,lst];
Show[Graphics[{AbsolutePointSize[8],eigenpoints, Circle[{0,0}, 1]}], Axes->Automatic, AspectRatio->Automatic, AxesLabel->{"Re", "Im"}]
]

showEigenvalues[ListOfEigenvalue]