Let the inner product of the vectors X and Y on a given four dimensional manifold (EDIT: make this R^{4}) be defined as (X*Y) = g_{ik}X^{i}Y^{k}; using the summation convention for repeated indicies.

Let A be a 4 x 4 matrix which satisfies: (X*Y)=(AX*AY).

Then the set of all A is a matrix lie group. My question is this, what properties characterize the matrices A which preserve this inner product, and furthermore, what properties characterize the lie algebra of this group?

Is there a nice formula that gives the parametrized components of the orthogonal matrices A, analogous to the case of a euclidean metric? (i.e. the rotation matrix)

Is there a nice formula that determines the matrix lie algebra of this group?

EDIT:

As stated in my comment below, what I really want is an expression for the matrix components of the lie algebra as functions of the components of the metric tensor.