Problem 1:

Clear["Global`*"]

Three equal mass points are located at (a,0,0),  (0, a, 2a) and (0, 2a, a).  Find the principal moments of inertia about the origin and a set of principal axes.

location={
{a,0,0},
{0,a,a},
{0,a,-a}};
mass={1,2,3};
v={vx,vy,vz}={{1,0,0},{0,1,0},{0,0,1}};
nMax=3  (* Number of masses *)

Note, we program diagonal and off - diagonal with different formulas below!!!

Clear[term]
term[n_,i_,i_]:= +mass[[n]](location[[n]].location[[n]]- (location[[n]].v[[i]])^2)
term[n_,i_,j_]:= -mass[[n]] (location[[n]].v[[i]]*location[[n]].v[[j]])

mat=Table[ Sum[ term[n,i,j],{n,1,nMax}],{i,1,3},{j,1,3}];
mat //MatrixForm

evec=(Normalize /@ Eigenvectors[mat] ) //Simplify//Transpose ;
evec//MatrixForm (* Column form *)

evec[[2]]

eval=Eigenvalues[mat] ;
eval //Simplify//TableForm

Eigenvalues by hand

one=DiagonalMatrix[{1,1,1}];
eq= Det[mat - λ one] ==0

sol=Solve[eq,λ]

Eigenvectors by hand

eqs=(mat-λ one).{x,y,z} ==0 //Thread

eqs /.sol[[1]]

Eigenvector for λ1

Solve[eqs /.sol[[1]],{x,y,z}]

v1={0,1,-1};

mat.v1 == λ v1

mat.v1 == λ v1 /.sol[[1]]

Eigenvector for λ4

Solve[eqs /.sol[[2]],{x,y,z}]

v2={0,1,1};

mat.v2 == λ v2

mat.v2 == λ v2 /.sol[[2]]

Eigenvector for λ3

Solve[eqs /.sol[[3]],{x,y,z}]

v3={1,0,0};

mat.v3 == λ v3

mat.v3 == λ v3 /.sol[[3]]

Use Eigenvectors to diagonalize the matrix

Transpose[evec] .mat. evec //Simplify //MatrixForm

Transpose[evec] . evec //Simplify //MatrixForm

Use Rotation Matrix to diagonalize the matrix

mx[θ_]={{1,0,0},{0,Cos[θ],-Sin[θ]},{0,+Sin[θ],Cos[θ]}};
my[θ_]={{Cos[θ],0,+Sin[θ]},{0,1,0},{-Sin[θ],0,Cos[θ]}};
mz[θ_]={{Cos[θ],-Sin[θ],0},{+Sin[θ],Cos[θ],0},{0,0,1}};
mx[θ] //MatrixForm
my[θ] //MatrixForm
mz[θ] //MatrixForm

mx[π/4] //MatrixForm

mx[π/4].mat.Transpose[mx[π/4]]  //Simplify//MatrixForm

Problem 2:

Clear["Global`*"]

Three equal mass points are located at (a,0,0),  (0, a, 2a) and (0, 2a, a).  Find the principal moments of inertia about the origin and a set of principal axes.

location={
{a,0,0},
{0,a,2a},
{0,2a,a}};
mass={1,1,1};
v={vx,vy,vz}={{1,0,0},{0,1,0},{0,0,1}};
nMax=3  (* Number of masses *)

Note, we program diagonal and off - diagonal with different formulas below!!!

Clear[term]
term[n_,i_,i_]:= +mass[[n]](location[[n]].location[[n]]- (location[[n]].v[[i]])^2)
term[n_,i_,j_]:= -mass[[n]] (location[[n]].v[[i]]*location[[n]].v[[j]])

mat=Table[ Sum[ term[n,i,j],{n,1,nMax}],{i,1,3},{j,1,3}];
mat //MatrixForm

evec=(Normalize /@ Eigenvectors[mat] ) //Simplify//Transpose ;
evec//MatrixForm (* Column form *)

evec[[2]]

eval=Eigenvalues[mat] ;
eval //Simplify//TableForm

Transpose[evec] .mat. evec //Simplify //MatrixForm

Transpose[evec] . evec //Simplify //MatrixForm

Eigenvalues by hand

one=DiagonalMatrix[{1,1,1}];
eq= Det[mat - λ one] ==0

sol=Solve[eq,λ]

Eigenvectors by hand

eqs=(mat-λ one).{x,y,z} ==0 //Thread

eqs /.sol[[1]]

Eigenvector for λ1

Solve[eqs /.sol[[1]],{x,y,z}]

v1={0,1,1};

mat.v1 == λ v1

mat.v1 == λ v1 /.sol[[1]]

Eigenvector for λ4

Solve[eqs /.sol[[2]],{x,y,z}]

v2={0,1,-1};

mat.v2 == λ v2

mat.v2 == λ v2 /.sol[[2]]

Eigenvector for λ3

Solve[eqs /.sol[[3]],{x,y,z}]

v3=Cross[v2,v1] //Normalize

mat.v3 == λ v3

mat.v3 == λ v3 /.sol[[3]]

Use Eigenvectors to diagonalize the matrix

Transpose[evec] .mat. evec //Simplify //MatrixForm

Transpose[evec] . evec //Simplify //MatrixForm

Use Rotation Matrix to diagonalize the matrix

mx[θ_]={{1,0,0},{0,Cos[θ],-Sin[θ]},{0,+Sin[θ],Cos[θ]}};
my[θ_]={{Cos[θ],0,+Sin[θ]},{0,1,0},{-Sin[θ],0,Cos[θ]}};
mz[θ_]={{Cos[θ],-Sin[θ],0},{+Sin[θ],Cos[θ],0},{0,0,1}};
mx[θ] //MatrixForm
my[θ] //MatrixForm
mz[θ] //MatrixForm

mx[π/4] //MatrixForm

mx[π/4].mat.Transpose[mx[π/4]]  //Simplify//MatrixForm

Problem 3:

Clear["Global`*"]

m={{1/Sqrt[2],1/Sqrt[2],0},{0,0,1},{1/Sqrt[2],-1/Sqrt[2],0}};
m //MatrixForm

Det[m]

Tr[m]

eval=Eigenvalues[m] //Simplify

Eigenvectors[m] //Simplify

Find the Eigenvalues

one=DiagonalMatrix[{1,1,1}];
eq= Det[m - λ one]==0

Solve[eq,λ]

Find the Eigenvalues

eqs= (m-λ one).{a,b,c}==0 //Thread

sol=Solve[eqs /.{λ->1},{a,b,c}][[1]]

v1={a,b,c}  /.sol /.{a->1}

m.v1 == λ v1

m.v1 == λ v1 /.{λ->1}

Find the angle

eq=Tr[m]==1 + 2 Cos[θ]

sol=Solve[eq,θ]  /.{C[_]:>0}//Normal

θ /Degree/.sol //N

ev3=Eigenvectors[m][[3]]

Find the angle a different way:  λ = (e^(iθ))

eqθ=Eigenvalues[m][[1]]== Cos[θ] + I Sin[θ]

solθ=Solve[eqθ,θ][[1]] /.{C[_]->0}

θ0=θ /.solθ

((θ0)/Degree) //N

Problem 4:

Clear["Global`*"]

evals={1,(Sqrt[3]+I)/2,(Sqrt[3]-I)/2}

Abs /@ evals

Solve[# == Exp[I θ],θ]& /@ evals  /.{C[1]->0}//Normal

trace= Sum[evals[[i]],{i,1,3}] //Expand

eq=trace==1 + 2 Cos[θ]

sol=Solve[eq,θ]  /.{C[_]:>0}//Normal

θ /Degree/.sol //N

Problem 5:

Clear["Global`*"]

m=DiagonalMatrix[{3,2}];
m //MatrixForm

Eigenvalues[m]

Eigenvectors[m]

makeVec[v_]:=Arrow[{{0,0},v}]

xVec={1,0};
yVec={0,1};
m.xVec //MatrixForm
m.yVec //MatrixForm

Graphics[{
Opacity[0.5],LightYellow,Rectangle[{0,0},{3,2}],
Opacity[1.0],Green,Rectangle[{0,0},{1,1}],Thickness[0.04],
Blue,makeVec[xVec],makeVec[yVec],Thickness[0.01], 
Red,makeVec[m.xVec],makeVec[m.yVec]},
GridLines->Automatic]

Problem 6:

Clear["Global`*"]

m={{5/4,-(Sqrt[3])/4},{-(Sqrt[3])/4,7/4}};
m //MatrixForm

Eigenvalues[m]

ev=Eigenvectors[m]

makeVec[v_]:=Arrow[{{0,0},v}]

ev1=ev[[1]] //Normalize
ev2=ev[[2]] //Normalize

ev1p=m.ev[[1]] //Simplify
ev2p=m.ev[[2]]

Graphics[{
Opacity[0.7],LightYellow,Rotate[Rectangle[{0,0},{1,2}],π/6,{0,0}],
Opacity[1.0],Green,Rotate[Rectangle[{0,0},{1,1}],π/6,{0,0}],
GridLines->Automatic,Thickness[0.04],
Blue,makeVec[ev1],makeVec[ev2],Thickness[0.01], 
Red,makeVec[m.ev1],makeVec[m.ev2]},
GridLines->Automatic]

Problem 7: Tennis Racquet

https://youtu.be/1VPfZ_XzisU
See about 3:00 mark