Problem 1 :

Clear["Global`*"]

ContourPlot[(x^2)+(y^2),{x,-1,1},{y,-1,1}]

v={x,y};
g=DiagonalMatrix[{1,1}];
g //MatrixForm

rot={{Cos[θ],Sin[θ]},{-Sin[θ],Cos[θ]}};
rot //MatrixForm

v2=rot.v;
v2 //MatrixForm

v.g.v

v2.g.v2

v2.g.v2 //Simplify

Problem 2:

Clear["Global`*"]

v={x,y};
g={{1,1},{1,1}};
g //MatrixForm

v.g.v //Simplify

ContourPlot[(((Abs[x]+Abs[y]))^2),{x,0,1},{y,0,1}]

ContourPlot[(((Abs[x]+Abs[y]))^2),{x,-1,1},{y,-1,1}]

Problem 3:

Clear["Global`*"]

ContourPlot[(t^2)-(x^2),{t,-1,1},{x,-1,1}]

v={t,x};
g=DiagonalMatrix[{1,-1}];
g //MatrixForm

rot={{Cosh[θ],Sinh[θ]},{+Sinh[θ],Cosh[θ]}};
rot //MatrixForm

v2=rot.v;
v2 //MatrixForm

v.g.v

v2.g.v2

v2.g.v2 //Simplify

Problem 4:

Clear["Global`*"]

g=DiagonalMatrix[{1,-1,-1,-1}];

p1={e1,0,0,+p};
p2={e2,0,0,-p};
p12=p1+p2;

eqs=
{p1.g.p1 ==m12,
p2.g.p2 ==m22,
p12.g.p12 ==s}

Solve[eqs,{m12,m22,s}]  //Transpose//TableForm

sol=Solve[eqs,{e1,e2,p}]   //Simplify

(* TAKE THE SOLUTION THAT IS POSITIVE FOR BIG S *)
sol[[4]]

del2[a_,b_,c_]:=(a^2)+(b^2)+(c^2)-2(a b + b c + c a)

test1=((del2[m12,m22,s])/(4 s))

test2 = p^2 /.sol[[4]]

test1==test2 //Simplify

Problem 5:
Start in CMS, equal mass particles

Clear["Global`*"]

g=DiagonalMatrix[{1,-1,-1,-1}];

p1={e,0,0,+p};
p2={e,0,0,-p};
p12=p1+p2;

eqs=
{p1.g.p1 ==m2,
p2.g.p2 ==m2,
p12.g.p12 ==s}

Invariant mass before : = s = 4e^2

Invariant mass after:

p3={m,0,0,0};
p4={m,0,0,0};
p5={mHiggs,0,0,0};
p345=p3+p4+p5

eq= p345.g.p345 == 4 (e^2)

sol=Solve[eq,e] //Simplify

(* Take positive solution *)
sol[[2]]

(* Take positive solution *)
sol[[2]] /.{m->1, mHiggs->126}

Now in lab frame, equal mass particles

p1={e,0,0,+p};
p2={m,0,0,0};
p12=p1+p2;

s==p12.g.p12  /.{p^2-> (e^2)-m2} //Simplify

(* Invariant mass after remains the same:  *)
p345.g.p345

eq2= p345.g.p345  == p12.g.p12  //.{p^2-> (e^2)-m2,m2->m^2} //Simplify

sol2=Solve[eq2,e] //Simplify

e /.sol2[[1]] /.{m->1, mHiggs->126}

Problem 6:

Clear["Global`*"]

g=DiagonalMatrix[{1,-1,-1,-1}];

p1={e,0,0,+p};
p2={e,0,0,-p};
p12=p1+p2;

b={{γ,0,0,γ β},{0,1,0,0},{0,0,1,0},{γ β,0,0,γ}};
b //MatrixForm

eq= b.p2 =={m,0,0,0} //Thread

sol= Solve[eq,{β,γ}] /.{(e^2)-(p^2)->(m^2)}

Now Check

b.p2 //.sol //Simplify

(b.p2 //.sol //Simplify)/.{(p^2)-> (e^2)-(m^2)}

(b.p1 //.sol //Simplify)

Problem 7:

Clear["Global`*"]

F={{0,Ex,Ey,Ez},{-Ex,0,Bz,-By},{-Ey,-Bz,0,Bx},{-Ez,By,-Bx,0}};
F //MatrixForm

B={{γ,γ β,0,0},{γ β,γ,0,0},{0,0,1,0},{0,0,0,1}};
B //MatrixForm

result=B.F.Transpose[B]  //Simplify;
result //MatrixForm

rule={γ^2->(1/(1-(β^2)))}

result /.rule //Simplify //MatrixForm

To match book convention :

result /.rule /.{β->-β}//Simplify //MatrixForm

(-1+(β^2)) (γ^2) /.rule//Simplify