When I input to Mathematica as follows,
G = {
{-1, 0, 0, 0},
{0, 1, 0, 0},
{0, 0, 1, 0},
{0, 0, 0, 1}};
h = {
{-h00/2, h01, h02, h03},
{0, 0, 0, 0},
{0, 0, 0, 0},
{0, 0, 0, 0}};
L = G + h;
Lt = Transpose[L];
G2raw = Lt . G. L;
G2 = Expand[ G2raw ]
The value of G2 will be as follows.
{ {-1 - h00 - h00^2/4, h01 + (h00 h01)/2, h02 + (h00 h02)/2, h03 + (h00 h03)/2}, {h01 + (h00 h01)/2, 1 - h01^2, -h01 h02, -h01 h03},
{h02 + (h00 h02)/2, -h01 h02, 1 - h02^2, -h02 h03}, {h03 + (h00 h03)/2, -h01 h03, -h02 h03, 1 - h03^2} }
If [h00,h01,h02,h03] are very small values, I cut off secondary approximate parts and leave first approximate parts, and I'd like to obtain the following output.
{ {-1 - h00, h01, h02, h03}, {h01, 1, 0, 0}, {h02, 0, 1, 0},
{h03, 0, 0, 1} }
What kind of input should be added to Mathematica to obtain the above expected output ?
Thank you.