gQ=1/Sqrt[1-(vx^2+vy^2+vz^2)]
b3Q=IdentityMatrix[3] + (gQ-1){{vx},{vy},{vz}}.{{vx,vy,vz}}/(vx^2+vy^2+vz^2)
b4Q=DiagonalMatrix[{0,0,0,gQ}]
Do[Do[b4Q[[i,j]]=b3Q[[i,j]],{j,3}],{i,3}]
b4Q[[1,4]]=I gQ vx
b4Q[[2,4]]=I gQ vy
b4Q[[3,4]]=I gQ vz
b4Q[[4,1]]=-I gQ vx
b4Q[[4,2]]=-I gQ vy
b4Q[[4,3]]=-I gQ vz
boost[vx_,vy_,vz_]=b4Q

