On the Equivalence of Spacetimes, the Cartan-Karlhede Algorithm

It is well known that in general relativity theory two spacetimes whose metrics are related by a coordinate transformation are physically equivalent. However, given two line elements, it is virtually impossible to implement the most general coordinate transformation in order to check the equivalence of the spacetimes. In this paper we present the so-called Cartan-Karlhede algorithm, which provides a finite sequence of steps to decide whether or not two metrics are equivalent. The point of this note is to illustrate the method through several simple examples, so that the reader can learn the fundamentals and details of the algorithm in practice.


I. INTRODUCTION
In the theory of general relativity, the gravitational field is represented by the metric of the spacetime, a rank two symmetric tensor of Lorentzian signature. One of the main features of this theory is that it is totally covariant, in the sense the equations of motion are written in a way that are invariant under the change of coordinates. This is a quite appealing property, since the observers are totally free to choose how to label the points of the spacetime and the physical results should not depend on these arbitrary choices. However, this desirable feature of the theory comes at a price, the difficulty of knowing whether two metrics are equivalent or not. More precisely, given two line elements in two coordinate systems, it is generally very hard to check if they represent the same physical spacetime. For instance, in the search of new exact solutions for Einstein's vacuum equation two people can find two solutions that look completely different, due to the use of different coordinate systems, but they might represent the same physical spacetime. In the same fashion, while integrating Einstein's equation one might end up with several integration constants. However, in general, many of these constants can be eliminated by a coordinate transformation, with just a few of them being physically relevant. These are the problems that are going to be tackled in the present paper.
For instance, consider the following two line elements: 4a 3 x 4 ax 2 − c dx 2 + a 2 c 2 x 4 4 − c 2 y 2 dy 2 + a 2 c 2 x 4 y 2 4(y 2 + z 2 ) 2 z 2 dy 2 + y 2 dz 2 − 2zy dydz . (2) The first line element is the well-known Schwarzschild solution in spherical coordinates, which represents the gravitational field outside a static and spherically symmetric distribution of mass, with the total mass being M . In its turn, the second line element is not known and has three constant parameters, namely a, b, and c. Although they look completely different, it follows that both metrics represent the same gravitational field whenever c = 2M . In particular, this implies that the parameters a and b are meaningless and can be eliminated by a coordinate transformation. * carlosbatistas@df.ufpe.br In order to check whether the above line elements represent the same gravitational field, the most naive way to proceed is to look for a coordinate transformation that connect both metrics. However, in general this procedure is unbearable, due to the intricate and nonlinear equations involved. A more clever path would be to compare things that do not depend on the coordinate system. For instance, it is well-known that Schwarzschild solution has a vanishing Ricci tensor, since it is a vacuum solution. Therefore, one should check whether the same is true for the line element (2). If the second line element is not Ricci-flat then we can immediately conclude that they are not the same solution. However, it turns out that the line element (2) is also Ricci-flat, so that the test is inconclusive.
Another clever idea is to compare curvature invariants, which are scalars constructed exclusively from the Riemann tensor, its derivatives, and the metric. This is interesting because scalars are invariant under coordinate transformations. However, since in general the curvature invariants are not constant, they will depend explicitly on the adopted coordinates, which is somehow complicated to compare. For example, let us compare the curvature invariants of the line elements (1) and (2). The Ricci scalar is easy, since both spaces are Ricci-flat they both vanish. The next simple curvature invariant is the Kretschamnn scalar, given by R 2 ≡ R µναβ R µναβ , where R µναβ denotes the components of the Riemann tensor. For the metrics (1) and (2) we have respectively. Note that we cannot tell whether they are the same, since we do not know the possible relations between the coordinates r and x as well as the relations between the constants M , a, b, and c. A way to scape from the awkward position of comparing scalars in different coordinate systems is to try to write curvature invariants in terms of the curvature invariants themselves and then compare the functional relations between them. For instance, defining the cubic curvature invariant it follows that for the solutions (1) and (2) it is given respectively by R 3 = 96M 3 r 9 andR 3 = 12c 3 a 9 x 18 .
Thus, in both cases we have the same functional relation between the curvature invariants, namely However, this is not enough for asserting that the metrics are the same. Indeed, they are generally not the same, unless we have specifically c = 2M . Nevertheless, we can move on and compare the functional relations between other scalars, like ∇ σ R µναβ ∇ σ R µναβ and so on. If at least one of the functional relations between the curvature invariants does not coincide, then the solutions are not the same, whereas if all the functional relations are the same there is the possibility that the line elements describe the same geometry. Notwithstanding, even in the latter case one cannot guarantee that the solutions are the same. An example of this statement is given by the so-called VSI spacetimes, standing for vanishing scalar invariants spacetimes, which are defined as the Lorentzian metrics for which all curvature invariants vanish identically [1,2]. An example of a VSI spacetime is provided by the line element in which H(u, x, y) is an arbitrary function of the coordinates x, y, and u. All curvature invariants of the latter metric are zero. For instance,R =R 2 =R 3 = 0 for this metric. Another spacetime with all curvature invariants vanishing is the Minkowski spacetime, which is flat. However, the line element (3) and the Minkowski metric do not represent the same geometry. Indeed, while Minkowski spacetime has vanishing curvature, the line element (3) yields a nonzero Riemann tensor. This example proves that it is possible for two metrics to have all the functional relations between their curvature invariants coinciding and still they represent different gravitational fields. In spite of this dramatic example, in several families of spacetimes one can distinguish its members by looking at the curvature invariants, examples of which are given in Refs. [3,4]. In addition, it is interesting that more recently it has been proposed that the event horizons of black holes could be identified by the vanishing of certain curvature invariants [5]. Thus, in conclusion, the functional relations between the curvature invariants cannot be used to state that two line elements describe the same spacetime geometry but, on the other hand, can be used to rule out the possibility of two metrics representing the same physical solution. There are several other ways to prove the inequivalence of two line elements. For instance, if two metrics admit a different number of independent Killing vector fields or if the algebra of the Killing vector fields is different (thus leading to different isometry groups) they must be different spaces. Likewise, if the two metrics have different algebraic types (according to the Petrov classification, for example) they must be different. However, if we have two metrics to compare and we have computed the functional relations between the curvature, the isometry group and the algebraic types of the curvature tensor, and all of them coincide, even in this case we cannot state that they represent the same gravitational field.
The question that remains to be answered is: is there an algorithmic way to check whether two line elements written in different coordinate systems are the same? The answer is yes and the procedure for comparing the metrics is called Cartan-Karlhede algorithm [4, 6-8, 10, 11]. The goal of this paper is to show by simple examples how this method is used in practice. In particular, many of the calculations are done in three-dimensional spacetimes, in order to make the exposition more clear. This work does not aim in proving the validity of the method but, rather, in being explicit on the meaning of the steps of the algorithm.
The outline of the article is the following. In Sec. II, we explain the steps of the Cartan-Karlhede algorithm in an abstract way, pointing out some of the subtleties that we should pay attention to while implementing the procedure. Then, in Sec. III, we present several examples illustrating the main features of the method. We restrain ourselves to three-dimensional examples, so that the algorithm can be applied much more neatly and explicitly. Sec. IV is then a more advanced section in which we tackle the four-dimensional problem presented in this introduction, namely the comparison of the four-dimensional line elements (1) and (2). In order to do so, we briefly introduce some useful tools for applying the algorithm. This section can be skipped by the less experienced reader. Finally, in sec. V presents the discussion of how to circumvent two of the main difficulties that might appear while applying the method.

II. CARTAN-KARLHEDE ALGORITHM
Suppose that we are interested in comparing two metrics g µν (x) andg ab (x) of Lorentzian signature living in an open set of an n-dimensional manifold described by the coordinate systems {x µ } and {x µ }. We would like to check whether these two metrics are equivalent or not, in the sense that there exists a coordinate transformation x µ = x µ (x) such that The above equation is a nonlinear set of coupled partial differential equations whose solution by direct integration is generally unfeasible. The intent of the present section is to present an algorithm which after a finite number of steps will tell us whether the coordinate transformation x µ →x µ exists or not. If the answer is positive, we say that the metrics g µν andg µν describe the same geometry; while if the answer is negative we say that these metrics are not equivalent. In what follows we will assume Lorentzian signature for definiteness, although the procedure applies for any signature.
In order to implement this formalism, the first thing we need to do is to choose a constant symmetric matrix η ab that is non-degenerate and has Lorentzian signature as a quadratic form, the labels a and b range from 0 to n − 1. For instance, we can choose η ab to be the usual Minkowski metric, η ab = diag(−1, 1, 1, · · · , 1) , although any constant symmetric matrix with the correct signature will do the job. Then, introduce a frame of vector fields {e a = e µ a ∂ µ } such that the inner products between them yield exactly the constant matrix η ab , namely Note that once chosen η ab , the choice of frame is not unique, rather we have a freedom of applying Lorentz transformations Λ ∈ O(n − 1, 1). By a Lorentz transformation it is meant that the frame is transformed as with the matrix Λ obeying This set of matrices form a Lie group of dimension 1 2 n(n−1), the Lorentz group. Here, the Lorentz transformations can be local, i.e., the matrices Λ can vary from point to point, Λ = Λ(x). Then, we need to compute the curvature tensor and project its components on the frame. For instance, the component R abcd means With this at hand, we should take a look at the components R abcd that are nonconstant and compute the number of functionally independent components, which we will denote by t 0 . For instance, should the components depend just on x 1 and x 2 , but not on x 3 , x 4 , · · · , x n , we would have either t 0 = 1 or t 0 = 2, with the former case happening whenever all components of R abcd depend on the same combination of x 1 and x 2 . In general, we always have 0 ≤ t 0 ≤ n. The next step is to compute the so-called isotropy group, which is comprised by the subset of matrices Λ that preserves the form of the components R abcd , namely where R ′ abcd denotes the components of the curvature in the transformed frame {e ′ a }. We call this subgroup H 0 .
As the next step, we need to calculate the derivative of the Riemann tensor and project in our frame, namely we need to compute ∇ e R abcd . Then, we define t 1 as the number of nonconstant functionally independent components of the set {R abcd , ∇ e R abcd }. For instance, if t 0 = 2 with R abcd depending just on x 1 and x 2 , while ∇ e R abcd depends on x 2 and x 3 , then we should set t 1 = 3. After this, we must compute the subgroup of H 0 that preserves ∇ e R abcd , we denote this subgroup by H 1 . In other words, H 1 is the subgroup of the Lorentz group such that after the frame transformation (5) we have Note that H 1 ⊂ H 0 . After this, we do the same procedure for the second derivative of the curvature, ∇ e ∇ f R abcd . Namely, we compute the number of nonconstant functionally independent components that exists in the set {R abcd , ∇ e R abcd , ∇ e ∇ f R abcd } and call it t 2 . Then we compute the subgroup of H 1 that preserves the form of ∇ e ∇ f R abcd when frame transformation (5) is performed. This subgroup is denoted by H 2 .
One important question is when we should stop the latter procedure, namely at which order of derivative of the curvature tensor. The answer to this question is in the isotropy groups H i and in the parameters t i . Actually, as defined above, it follows that the numbers t i are not invariant features of the metric, as they depend on the used frame. Indeed, since we can make arbitrary local Lorentz transformations on the frame these numbers depend on the particular choice of frame. For instance, the component R 1212 of the curvature tensor might be constant in one frame but through a Lorentz transformation Λ(x) its transformed version R ′ 1212 could depend on all the coordinates. Therefore, a much more meaningful number is τ i , which is defined as the minimum value of t i . More precisely, once computed the curvature and its derivatives we shall look for frames that minimize t i , which is then denoted by τ i . Metrics that have different values of τ i cannot be equivalent, whereas the same cannot be said about t i . Returning to the question raised at the beginning of this paragraph, we must continue the procedure until we reach an order q such that τ q = τ q−1 and H q = H q−1 . When we reach this point we have a full characterization of the metric g µν (x) and we can move on to compare withg µν (x). It is worth pointing out that the maximum order q is always finite and cannot exceed 1 2 n(n + 1), as proved by Cartan [6], although generally q is lower and in some cases we can even anticipate that it must be lower [7]. In Ref. [8] it has been explicitly shown that there are 3-dimensional spacetimes such that the algorithm must go up to the maximum theoretical value for q. Likewise, in Ref. [9] it is proved that the theoretical bound on the value of q is sharp for Petrov type N four-dimensional spacetimes.
One hint of how to check if the minimum value of t i has been attained is through the use of curvature invariants. For instance, if the Ricci scalar depends just on the coordinate x 1 then one can state that t 0 is not lower than 1. Hence, if you manage to find a frame such that R abcd depends just on x 1 then you can be sure that τ 1 = 1.
Once finished the above steps with the metric g µν (x), let us deal withg µν (x). First, define a frame of vector fields {ẽ a =ẽ µ a∂µ } such that g µνẽ µ aẽ ν b = η ab , where η ab is the same matrix used in Eq. (4) when defining the frame {e a }. Then, compute the components of the curvature in this frame, Then we should check whether R abcd ∼R abcd or R abcd ≁R abcd . However, we must be careful with the meaning of the previous equations, since R abcd depend on the coordinates x a , whileR abcd depend oñ x a , so that the comparison is tricky. What is meant by the inequality ≁ is that the functional relations are different. For instance, suppose that hence we can write R 0101 = 2R 0202 . Thus, ifR 0101 = 2R 0202 we can definitely say thatR abcd ≁ R abcd . In order for the metrics to be equivalent it must be possible to find a frame {ẽ a } such thatR abcd ∼ R abcd , where the symbol ∼ denotes that all functional relations agree. If this is not the case for the first adopted frame, we should try to find a Lorentz transformation Λ ∈ O(n − 1, 1) such that the equivalence R abcd ∼R ′ abcd holds, whereR ′ abcd stands for the components ofR µναβ in the frame {ẽ ′ b } obtained from the initial frame {ẽ b } through a suitable Lorentz transformation as follows:ẽ If we cannot find a frame {ẽ ′ b } such that R abcd ∼ R ′ abcd , then we conclude that the metrics g µν andg µν are not equivalent. Otherwise, if we manage to find a frame {ẽ ′ b } such that R abcd ∼R ′ abcd , we need to compare the first derivative of the curvature tensor.
If∇ ′ eR ′ abcd ≁ ∇ e R abcd , we need to try to find The requirement that the Lorentz transformation belongs to H 0 is to guarantee thatR ′ abcd =R ′′ abcd , so that R abcd ∼R ′′ abcd whenever R abcd ∼R ′ abcd holds. Note that, due to the relation R abcd ∼R ′ abcd , we have H 0 =H 0 . If we cannot manage to find such a frame, the metrics are not equivalent. On the other hand, if we can find this frame we must continue and compare the second derivative of the curvature. If we manage to equate the curvature and its derivatives of both metrics up to order q, where q is the maximum order that we need to go in the procedure with g µν , we conclude that g µν andg µν describe the same geometry.
At this point, it is worth stressing that while computing the functional relations one needs to register which components are constant and the values of these constants. More precisely, if one has R 0101 = R 0202 andR 0101 =R 0202 , but R 0101 is a constant function whileR 0101 is not, it follows that R abcd ≁R abcd .
The lists {τ i ,H i } and {τ i , H i } can be compared as a quick check of wether is there a chance of the metrics being equivalent. Note, however, that this comparison is not necessary, since these lists are already determined by functional relations of the curvature components. In other words, if we manage to find a frame {ẽ a } in which the functional relations of the componentsR abcd and its derivatives coincide with those R abcd and its derivatives, it follows as a consequence that the lists {τ i ,H i } and {τ i , H i } also coincide. It seems that this fact have, so far, not been stressed in the literature [7,12].
Below we sum up the steps that must be followed in the Cartan-Karlhede algorithm in order to check whether the metrics g µν andg µν describe the same geometry.
1. Define a constant metric η ab and find a frame {e a } for the metric g µν whose inner products yield η ab .
2. Compute the curvature components and its derivatives in the previous frame. Also, for each order of derivative, compute τ i and H i the number of functionally independent components that appear up to order i and the isotropy group up to order i.
3. The maximum derivative order that we need to go is the q th order such that τ q = τ q−1 and H q = H q−1 .
4. Use the Lorentz group degrees of freedom to try to find a frame {ẽ a } for the metricg µν such that the functional relations between the components of the Riemann tensorR abcd , and its derivatives, coincide with the analogous ones associated to the metric g µν up to the q th derivative order. If this is not possible the metrics are not equivalent, whereas if one manages to find such a frame we conclude that there exists a coordinate transformation connecting g µν andg µν .
In particular, note that, by definition, we must have the following relations: where n is the dimension of the spacetime. It is worth stressing that although the algorithm tells us whether there exists a coordinate transformation connecting the line elements, it does not provide the actual coordinate transformation. Note that since the functional relations between the curvature components up to order q in the derivative fully characterize the geometry, one must be able to obtain all geometric information from those. For instance, the isometry group could be extracted. In particular, its dimension is given by Recall that if a metric does not depend on some coordinate z, namely if z is a cyclic coordinate, then the spacetime is invariant under the translation z → z + z 0 , where z 0 is some constant. We then say that there exists a symmetry on the spacetime, and this symmetry is generated by the vector field ∂ z , which is then called a Killing vector field. The isometry group is the set of transformations comprised of all symmetries of the spacetime. Technically, the isometry group is a Lie group whose Lie algebra is formed by all Killing vector fields. Since τ q is the number of "relevant" coordinates in the geometry, it follows that there are other (n − τ q ) coordinates that are cyclic. Thus, the dimension of the isometry group is at least (n − τ q ). However, this reasoning deals only with the transitive part of the isometry group. Indeed, the isometry group at a point o of the manifold can always be decomposed as the product of the transitive subgroup, whose flow changes the point o, and the isotropy subgroup, whose flow does not move the point o [13]. This explains why we need to add the term dim(H q ) in Eq. (7). As an example, consider the isometry group of the flat 2-dimensional Euclidean space, whose line element in cartesian coordinates is ds 2 = dx 2 + dy 2 . Since x and y are cyclic coordinates, ∂ x and ∂ y are obvious Killing vectors. The flow of these Killing vectors yield a translation in the coordinates x and y respectively. So, in particular, their flows do not leave the origin (x = 0, y = 0) static. However, besides these Killing vectors we also have x∂ y −y∂ x , which generates rotations around the origin and, therefore, leave it still. In other words, x∂ y − y∂ x generates the isotropy group at the origin. Up to now, the procedure has been described in a formal and abstract way. In order to make each of the steps more clear, in the next section we will present several simple examples that show explicitly how to apply the algorithm. However, before doing so, let us point out that, in some cases, instead of starting with a randomly chosen frame {e a } for g µν , it is better to start with a specific frame related to some geometrical structure of g µν . For instance, suppose that g µν allows a time-like Killing vector field K, then we can define the Lorentz frame to be such that e t ∝ K, this is a way to partially fix a canonical frame. In this case, if g µν does not have a time-like Killing vector field the metrics cannot be equivalent. On the other hand, if g µν has a time-like Killing vectorK, we should choosẽ e t ∝K. This is a coordinate-independent way of trying to fix a canonical frame. The advantage of doing so is that the isotropy freedom that is generally necessary in order to match the functional relations is decreased. These canonical frames can also be fixed by the so-called principal null directions of the Weyl tensor, which are associated to the Petrov classification. More on the latter way of proceeding will be left to Sec. IV. Note, however, that these partially fixed frames might not be the ones that minimize t i , in which case they would not be suitable frames for computing τ i .

III. APPLYING THE ALGORITHM IN SOME EXAMPLES
For the sake of illustrating the use of the algorithm, in this section we will apply it to several examples. However, instead of considering the dimension four, which is the most physically relevant, we shall tackle three-dimensional examples. This choice is to decrease the number of curvature components that could obfuscate the essentials of the algorithm. This is advantageous because in three dimensions (n = 3) the Weyl tensor is identically zero, so that the degrees of freedom of the Riemann tensor are totally contained in the Ricci tensor R µν . Thus, the curvature can be rep-resented by a symmetric 3 × 3 matrix. Also, in three dimensions the Lorentz group is 3-dimensional, while in four dimensions (n = 4) the Lorentz group has dimension six, so that things are much easier when n = 3.
First, let us compare the 3-dimensional line element with the following line elements: In these expressions α, β, and γ are nonzero constants.
In order to perform the comparison, we will choose the frame metric to be the 3-dimensional Minkowski metric The orthogonal group associated to this metric is the Lorentz group O(2, 1), generated by the composition of the following three types of transformations: where σ 1 , σ 2 , and θ are arbitrary real parameters, with θ ∈ [0, 2π). B 1 and B 2 are boosts in the space-like directions e 1 and e 2 respectively, while R is a rotation in the plane e 1 ∧ e 2 . These transformations generate the part of O(2, 1) that is connected to the identity, namely they can be continuously deformed to the identity. In particular, they all have unit determinant. This connected subgroup is denoted by SO(2, 1). Besides, we also have the discrete inversion transformations: The elements of O(2, 1) are given by the composition of these six matrices. More precisely, the most general element of O(2, 1) can be written in one of the following forms: where the dependence on σ 1 , σ 2 , and θ have been omitted. Note that we have not considered terms of the form P 1 P 2 , since these are already contained in R(θ) when θ = π. As a side note, notice that although TP 1 and TP 2 have unit determinant, they are not connected to the identity. Now, following the procedure described in the previous section, let us characterize the metric g µν given in Eq. (8). First, we need to define a Lorentz frame.
An obvious one is given by The components of the Ricci tensor in this frame are Note that these components depend just on the coordinate x, so that we have t 0 = 1. Note also that R = α 2 2(1+αx) 2 , so that it is impossible to find a frame such that t 0 = 0. Indeed, should we find a frame such that t 0 = 0 the components R ab would be constant so that the Ricci scalar would also be constant, which is not the case. Thus, τ 0 = 1. In particular, only two components are nonzero, namely R 00 and R 11 , and these obey the following functional relation: Now we should find the Lorentz transformations that preserve the components R ab , namely the ones such that Testing each one of the six branches of Eq. (13), for arbitrary parameters σ 1 , σ 2 , and θ, we find that these transformations are given by for an arbitrary parameter σ 1 . This is a one-dimensional subgroup with eight disconnected branches, this is the isotropy group H 0 . Formally, this group can be understood as where R is the group formed by the real numbers with the addition operation, and Z 2 is the cyclic group of order 2. Denoting the identity transformation by I, the three components of Z 2 are formed by {I, T}, {I, P 1 }, and {I, P 2 }, where it is worth recalling that P 1 P 2 = R(π).
Now, let us evaluate the components of the derivative of the curvature tensor in our frame, more precisely, ∇ a R bc . Computing them, one verifies that the only nonvanishing components are the following two: Moreover, since these components also depend just on the coordinate x, we have t 1 = 1 and τ 1 = 1. Regarding the indices bc in the object ∇ a R bc , the tensor has the same structure of R bc , which would lead to the same isotropy group. However, the existence of nonzero components with the index a = 1 implies that a change of sign in e 1 , namely the parity transformation P 1 and the rotation R(π), will change the components ∇ a R bc by a sign and, more importantly, B 1 (σ 1 ) will not preserve the form of ∇ a R bc for arbitrary σ 1 , but rather just for the value σ 1 = 0, which is the identity transformation. Summing up, the isotropy group up to this order is comprised of the following discrete set of elements: where I stands for the identity transformation. Thus, H 1 = Z 2 × Z 2 , with the cyclic groups given by {I, T} and {I, P 2 }. In particular, we have dim(H 1 ) = 0. Note that τ 1 = τ 0 , but since H 1 = H 0 , we have to go to the next order of derivative in the curvature.
Computing the components ∇ a ∇ b R cd , we can check that the only nonvanishing components are: Again, since all the components of {R ab , ∇ a R bc , ∇ a ∇ b R cd } depend just on the same coordinate x, we have t 2 = τ 2 = 1. Moreover, the isotropy group H 2 is the set of Lorentz transformations that preserve {R ab , ∇ a R bc , ∇ a ∇ b R cd } or, equivalently, is the subgroup of H 1 that preserves ∇ a ∇ b R cd .
Since all the transformations of H 1 also preserve ∇ a ∇ b R cd , it follows that H 2 = H 1 = Z 2 × Z 2 . Once τ 2 = τ 1 and H 2 = H 1 , we can terminate the algorithm at this order. Thus, the line element (8) is fully characterized by the following functional relations between the components of {R ab , ∇ a R bc , ∇ a ∇ b R cd }: with all the components not appearing in the above equation being zero and R 11 being non-constant. This is the canonical form of the curvature that we need to compare with when testing the equivalence of other line elements. As a first result, note that the parameter α has no geometrical relevance, since it does not appear at all in the above functional relations. Thus, line elements of Eq. (8) with different values of α (assuming α = 0) are all equivalent. Indeed, defining the coordinates it follows that the line element (8) becomes which is just the metric (8) for α = 1. Thus, we have proved that all line elements (8) with nonvanishing α are equivalent to the one with α = 1. Now, let us compare the line element (8) with (9), (10), (11), and (12). We shall start comparing g µν with the metricg µν defined in Eq. (9). First, note thatẽ is a frame with the desired inner products. Computing the components of the Ricci tensor in this frame we findR Thus, we see thatR 00 is functionally independent of R 22 , so that we havet 0 = 2. However, the frame invariant number isτ 0 , which can be different from t 0 . Computing the Ricci scalarR and the invariant R abR ab one can check that which indicate that these curvature invariants are functionally dependent. This could be compatible withτ 0 = 1. Nevertheless, one can check that R a bR b cR c a is functionally independent fromR, so thatτ 0 must be at least 2. Since we managed to find a frame such thatt 0 = 2 we conclude thatτ 0 = 2.Since τ 0 = 1, we can guarantee right off the bat that g µν and g µν describe different geometries. We do not need to bother about using Lorentz transformations in order to match the functional relations, since the parameters τ i are invariant under Lorentz transformations. Thus, we will never be able find a frame in whichR ab ∼ R ab .
Then, let us compare g µν withg µν , given in Eq. (10). Defining e 0 = e −βx ∂t ,ȇ 1 = ∂x ,ȇ 2 =y −γ ∂y , it follows that {ȇ a } is a Lorentz frame associated tȏ g µν . Computing the components of the Ricci tensor in such a frame, we find: In particular, the componentsȒ ab obey the relation (14) just as the components R ab . In spite of this, we can already conclude that g µν andg µν are not equivalent, because whereasȒ 11 = β 2 is constant, so that t 0 =τ 0 = 0, we have found that R 11 is nonconstant, so that we should writeȒ ab ≁ R ab . Moreover, note that the metricsg µν for different values of β describe different geometries, since no Lorentz transformation can be used to change the set of componentsȒ ab to a form that does not depend on β. For instance, it is impossible to find a Lorentz transformation Moving on to the metricĝ µν , defined in Eq. (11); a Lorentz frame is provided bŷ Computing the components of the Ricci tensor in such a frame, we find: The next step is to try to use the most general Lorentz transformation in order to makeR ab acquire the functional form of R ab , namely R ab = diag(−R 11 , R 11 , 0). In order to do so, we must test each of the six branches of the Lorentz group shown in Eq. (13). For instance, focusing in the first branch we havê , whereas the transformed components of the Ricci tensor areR The expression forR ′ ab is quite messy, so that here it is shown just the important ones for the argument. For instance, In order to achieveR ′ ab ∼ R ab , one must imposeR ′ 22 = 0, since R 22 = 0. The only solution for this imposition is Then, assuming (17) to hold, it follows that Since one also needs to imposeR ′ 02 = 0, one concludes that σ 1 = 0. Then, assuming the latter value for σ 1 , it follows thatR ′ 00 = 0, which is incompatible with the desired equivalenceR ′ ab ∼ R ab . Hence, the first branch of the Lorentz group shown in Eq. (13) does not allow a solution forR ′ ab ∼ R ab . Likewise, the other five branches yield no solution. Thus, we conclude that g µν andĝ µν describe different geometries.
Finally, let us compare the line elements (8) and (12). First, we need to introduce a Lorentz frame for g µν . One option is given bȳ where, for simplification, we have definedz ≡t+ex+1.
Computing the components of the Ricci tensor in this frame, we have that the only nonvanishing components areR This functional relation is in perfect accordance with the zero order functional relations in Eq. (16). Thus, in order to check whether the line elements describe the same geometry we need to go to higher order. In particular, since R ab ∼ R ab , it follows that the isotropy groupH 0 is equal to H 0 = R×Z 2 ×Z 2 ×Z 2 , i.e. H 0 is generated by the transformations (15). Now, let us compute∇ aRbc . Doing so, we obtain the following nonzero components: These functional relations differ from the ones of ∇ a R bc . In particular, here we have∇ 0R11 and∇ 0R00 both different from zero, whereas for the metric g µν these components vanish, see Eq. (16). However, recall that at order zero we have a nontrivial isotropy group of dimension one. Thus, the frame {ē a } is not yet fixed by the order zero canonical form for R ab . For instance, we can try to use a Lorentz boost B 1 in order to try to match∇ aRbc and ∇ a R bc . Thus, defininḡ can be made zero, in accordance with (16), as long as we choose σ 1 to be Assuming this value for σ 1 we find that the only nonvanishing components of∇ ′ aR ′ bc arē which is in accordance with the functional relations of Eq. (16). So far we have managed to equate the functional relations up to first order derivative of the Riemann tensor, let us finally check the second order.
Using the new frame {ē ′ a } we eventually find that the only nonvanishing components arē which agrees perfectly with the functional relations in Eq. (16). Since for the metric g µν we just need to go up to second order derivative in the curvature, we conclude that g µν andḡ µν represent the same geometry. Indeed, it can be checked that performing the coordinate transformation {t,x,ȳ} → {t, x, y} defined byt where the constants a, b, and c are given by the line element ds 2 , given in Eq. (12), gets transformed into the line element ds 2 , given in Eq. (8). Note that in this example it was necessary to perform a Lorentz transformation in order to compare the components of the curvature and its derivatives. This fact could be expected from the fact that ∂ t is a Killing vector field for the metric g µν and e 0 points in the direction of the flow of this symmetry, inasmuch as e 0 ∝ ∂ t . On the other hand, for the metricḡ µν we have started with a frame such thatē 0 ∝ ∂t, but now t is not a cyclic coordinate, so that ∂t is not a Killing vector. Thus, since symmetries are geometrical concepts that are independent of coordinate systems, one could already tell that the frame {ē a } was not the frame {e a } written in another coordinate system, so that a Lorentz transformation should be necessary. As you might have noticed in the previous examples, the tricky part of comparing the metrics stems from the freedom in the choice of the frame. Should we have no such freedom, we would just need to check whether the functional relations between the nonvanishing components of the curvature (and its derivatives) for both metrics are the same or not. Therefore, it would be very handy if we could eliminate the freedom in the choice of the frame. As exemplified before, one way to do so is to look for Killing vectors of the spacetime and use these symmetry directions to form the frame or part of the frame. However, in general, a spacetime has no Killing vector, let alone enough Killing vectors to form a basis, but we should use creativity to seek for geometrical structures that might help on the fixation of a canonical frame. In spite of the latter assertion, this creativity is not mandatory. Indeed, in the 80's and 90's some computer programs have been created to implement the steps of the Cartan-Karlhede algorithm using a computing system called SHEEP, that was created for symbolic tensor calculations. For more details on these programs the reader is refereed to [14][15][16]. As far as the authors could search for, there exists no modern freely available computing package implementing an algorithm for comparing metrics. Thus, the field is open to be explored by the reader. Building such a code would be a really valuable contribution for the community of general relativity. However, a huge price will be paid, in terms of computational time, if the frames are chosen randomly by the computer program. Therefore, in order to make such a program less time-consuming, it would be valuable if the user could fix part of the isotropy freedom by means of geometrical structures. Hence, it would be important for the program to allow the user to use his creativity in order to make the computer task easier. In the next section other important geometrical structures different from Killing vectors are briefly presented, such as the Petrov classification and its associated principal null directions.

IV. A FOUR-DIMENSIONAL EXAMPLE
In this section we shall consider the more advanced problem of comparing the four-dimensional line elements (1) and (2) presented in the introductory section. This example requires more advanced tools of general relativity. Thus, the student of general relativity that is not experienced yet might struggle to follow in detail. Therefore, such a student can skip this section, since the essentials of the method have already been presented in the previous sections. Indeed, the main idea of the present section is to expose the reader to the tools and tricks that are useful in the implementation of the method, so that when a necessity of comparing geometries shows up, the reader has a guide to follow. In this sense, even the beginner student can benefit from acquiring a brief idea about these practical tools. The details can be neglected in a first reading.
In order to compare the line elements (1) and (2) we first need to define a frame. An interesting way partially fixing a frame is by means of the so-called principal null directions, which are defined for any spacetime of dimension four whose Weyl tensor is nonvanishing. Given a four-dimensional spacetime one can compute its Weyl tensor C µναβ and try to find the null directions N µ , with N µ N µ = 0, such that the following constraint holds It turns out that solving this constraint amounts to finding the roots of a fourth order polynomial [17], so that this algebraic equation admits four solutions, dubbed the four principal null directions (PNDs). These directions can be degenerate or not. The Petrov classification is then an algebraic classification of the Weyl tensor based on the degeneracy of these PNDs [17,18]. If all four PNDs are distinct we say that the Weyl tensor is type I, if two of them coincide and the other two are different we say that it is type II, if three coincide we have type III, if the four PNDs are the same we have type N , while if one pair coincides and the other pair also coincides, but the pairs do not coincide with each other, we say that the Weyl tensor is type D. Whenever two metrics have different algebraic types according to the Petrov classification they cannot be equivalent, but if their Petrov type is the same we can use the PNDs to form a frame composed of null vectors.
As mentioned before, we can use any type of frame to start the Cartan-Karlhede algorithm. When using the PNDs to establish the frame, instead of using Lorentz frames, whose inner products give the Minkowski metric, it is useful to adopt a null frame {ℓ, n, m,m}, in which all vectors are null and the only nonvanishing inner products are ℓ µ n µ = −1 , and m µm µ = 1 .
In other words, the metric components on this frame are given by An important point is that in this type of frame it is assumed that ℓ and n are both real, while m is complex with its complex conjugate given bym. Since we are assuming Lorentzian signature, the use of complex vectors is necessary if we insist to work with a frame whose inner products are give by (19). Indeed, the reality conditions of a frame are intimately related to the signature of the metric [18,19]. In Lorentzian signature, the reality condition of the null frame is given by where the operation ⋆ stands for complex conjugation. Now, the idea is to fix the frame through the use of PNDs, by choosing the frame vectors ℓ and n as PNDs. Regarding the Schwarzschild metric, given in Eq. (1), it is well-known that its Petrov type is D, with the repeated PNDs being r . Taking advantage of these two distinguished null directions, let us choose our null frame to be such that ℓ ∝ N 1 and n ∝ N 2 . More precisely, let us adopt the following frame Since we have chosen to set ℓ ∝ N 1 and n ∝ N 2 this fixes partially the frame. In other words, we are using a geometrical structure, namely the PNDs, to define our frame. However, this choice does not fix uniquely the frame, i.e. there is some isotropy remaining. Indeed, if we multiply ℓ by a real number λ and multiply n by λ −1 this will preserve the hypothesis ℓ ∝ N 1 and n ∝ N 2 , and will also preserve the inner products of the frame. For instance, ℓ will remain a null vector field, orthogonal to m and obeying ℓ µ n µ = −1. Likewise, we can multiply m by e iσ while multiplyingm by e −iσ without changing the inner products, preserving the reality condition of the frame and keeping ℓ ∝ N 1 and n ∝ N 2 valid. Thus, the real parameters λ and σ in the above expressions for the frame represent the remaining isotropy group. Thus, using the PNDs to define the frame we have reduced the six-dimensional isotropy group associated to a general Lorentz frame to a two-dimensional isotropy group, providing a much easier starting point to apply the Cartan-Karlhede algorithm. In addition to this freedom, we also have the discrete freedoms of interchanging ℓ by n and m bym.
Since Schwarzschild spacetime has vanishing Ricci tensor, its curvature reduces to the Weyl tensor. In turn, the only independent nonvanishing component of the Weyl tensor is Although there are other nonvanishing components, like C ℓnℓn = −2M/r 3 , these other components must all be proportional to C ℓmmn due to the Bianchi identity C [abc]d = 0 and to the trace-less condition C a bad = 0, so that it is unnecessary to consider them in our analysis. Note that this component does not depend on λ and σ, so that we cannot use the isotropy group to fix a value for C ℓmmn . At this point, we conclude that t 0 = τ 0 = 1, due to the dependence on r in the Kretschmann scalar, and dim(H 0 ) = 2, due to the freedom in the choice of λ and σ. Apart from the related components that stem from the identities C [abc]d = 0, C a bad = 0, and ∇ [e C ab]cd = 0, the only nonzero components of the derivative of the curvature are In particular, note that we can use the freedom in the choice of λ in order to set ∇ ℓ C ℓmnm = −∇ n C ℓmnm , which amounts to choosing λ = 1. Thus, the dimension of the isotropy is lowered at this order, so that dim(H 1 ) = 1, while τ 1 = τ 0 = 1. With the choice λ = 1, we can solve Eq. (20) for r and substitute this expression for r into (21), leading to the following functional relation: At this point, we already see that line elements with different values of M are not equivalent, since the latter functional relation depends on the parameter M and this dependence cannot be eliminated by means of the isotropy freedom. Moving on to the next order, we see that an example of nonvanishing component is given by just as this component, the other nonzero second order components do not depend on σ, so that H 2 = H 1 . In addition, these components depend just on the coordinate r, so that t 2 = τ 2 = 1. Thus, since τ 2 = τ 1 and H 2 = H 1 , we should stop the Cartan-Karlhede characterization at this order. Here we will not list all the nonvanishing second order components, since there are several of them. Now, let us analyse the line element (2). First, we need to set a null frame {l,ñ,m,m} for this line element. In order to perform the comparison with the Schwarzschild geometry, we should choose the null vectorsl andñ as the principal null directions of the metric (2), since this was our choice in the characterization of (1). Solving Eq. (18) in this geometry, we find the following principal null directions for the Weyl tensor:Ñ It turns out that both PNDs are degenerate, so that the line element (2) is of Petrov type D, just as the Schwarzschild solution, so that there is the possibility of these two geometries being equivalent. Now, let us define a null frame such thatl ∝Ñ 1 , andñ ∝Ñ 2 . For instance, let us adopt withm being the complex conjugate ofm. Note that the remaining isotropy have already been made explicit through the arbitrary real parametersλ andσ appearing in the basis. Since this geometry is also Ricci-flat (R ab = 0), its curvature reduces to the Weyl tensor. A nonvanishing component of the Weyl tensor isClmñm The other nonvanishing components ofC abcd are all proportional to the latter one due to the Bianchi identity and the trace-less property of the Weyl tensor.
Concerning the first derivative of the of the curvature, the only "independent" nonvanishing components arẽ ∇lClmñm = −3bc Thus, making the choiceλ = bx √ 2a √ ax 2 −c we obtain the functional relation∇ñClmñm = −∇lClmñm, just as in the Schwarzschild spacetime for the frame {e a }. More precisely, for this choice ofλ we obtaiñ In terms ofClmñm, the above relation can be written as∇ñClmñm This functional relation coincides with the analogous one for the Schwarzschild spacetime as long as we accept the identification c = 2M . Thus, up to first order in the derivative, we conclude that the metrics can be equivalent, it remains to check the second order relation. The nonvanishing components of the second derivative of the Weyl tensor are the same as the analogous ones for the Schwarzschild spacetime with the frame {e a }. For instance, the component ∇l∇ñClmñm is nonvanishing and given by Thus, assuming that c = 2M , we eventually find that which agrees perfectly with the analogous functional relation that we have established for the Schwarzschild spacetime. It can be checked that all other second order functional relations also agree. Thus, we conclude that the line elements (1) and (2)

V. DISCUSSION AND CONCLUSIONS
In this article we have reviewed the Cartan-Karlhede algorithm, which is a procedure that allows one to check whether two line elements represent the same geometry, in spite of written in different coordinate systems, by following a finite sequence of steps. The review was performed through the use of simple examples in which the steps of the algorithm have been performed analytically and explicitly. We hope that this provides a useful guide for students and researchers to learn the essentials of the method.
A source of difficulty in the algorithm that, has been glossed over in the above examples is that sometimes it can be quite difficult to solve an equality like R 1212 = f (x) for the coordinate x in order to find the functional relations in terms of the curvature components themselves, without referring to coordinates, as done in Eq. (16). Moreover, it can happen that one should not solve the relation for a single coordinate but rather for a specific combination of coordinates, as happened in the example in which we have dealt with the three-dimensional line elementḡ µν , in which a particularly useful coordinate combination wasz ≡ 1 +t + ex. This part of the algorithm will generally demand from the user creativity and ingenuity to do smart choices of the components in terms of which the other curvature components will be written. For instance, if τ q is the number of functionally independent components of the curvature (and its derivatives), then one should choose τ q components of the curvature (and its derivatives) to serve as the "basis" in terms of which the other components will be written. Different choices of this "basis" can enormously simplify or greatly hamper the establishment of the functional relations. In spite of highlight on the use of creativity, these steps can be done systematically by a computer [14][15][16], but the computation time can become quite big if the computer turn out to choose an unsuitable path.
As we have stressed throughout the text, the most difficult part of the implementation of the method is working out the remaining isotropy freedom at each order of the method. In order to make things easier in Sec. IV, in which we have compared the line elements (1) and (2), we have started with frames that already incorporated the isotropy freedom through the parameters λ and σ. Then, since the components of the curvature did not depend on σ, we concluded that this part of the Lorentz group belongs to the isotropy group of the metric. On the other hand, since one of the components depended on λ, we concluded that the dimension of the Lorentz group associated to the parameter λ is not part of the isotropy group of the metric. Moreover, in the latter case, we have chosen λ in way to establish a convenient functional relation. For instance, if it is possible to make some curvature component vanish by a suitable choice of a free parameter, we can do so in order to fix the frame. The idea of starting the Cartan-Karlhede procedure algorithm with the Lorentz freedom explicit in the frame is generally handy for establishing the isotropy group at each order. However, in general, allowing the Lorentz group freedom to be explicit from the beginning is unfeasible, due to the complicated expressions for the frame that stem from the fact that a general Lorentz transformation has several parameters. We have been able to adopt this procedure in the four-dimensional example because we have already started with a partially fixed frame, since we have chosen two frame vectors to point along principal null directions. This choice reduced the freedom in the frame, remaining just two dimensions of freedom in the Lorentz group. Thus, one of the main strategies to apply the Cartan-Karlhede algorithm efficiently is to use geometric structures of the metric, namely special directions defined in a coordinate independent form, like symmetry directions and principal null directions, to fix completely or partially the frame with which we start the procedure. In this case it is said that the curvature tensor has been put in a canonical form. As an example, suppose that the Ricci tensor has an eigenvector with constant eigenvalue, then we can use this distinguished eigenvector as one of the frame vectors. One can also use conformal Killing vectors, Killing tensors and Killing-Yano tensors to define special directions or planes along which the frame is aligned. It is worth mentioning that notion of principal null directions of the Weyl tensor are also defined in dimensions greater than four [20,21], so that this concept can be used to put the curvature in a canonical form in higher dimensions [12]. Keep in mind, however, that in order to compute the parameters τ i , which are important to decide when the Cartan-Karlhede algorithm should stop, we might have to use a frame different from the one fixed by means of the symmetries and geometrical structures. ACKNOWLEDGMENTS C. B. would like to thank Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq) for the partial financial support through the research productivity fellowship. Likewise, C. B. thanks Universidade Federal de Pernambuco for the funding through Qualis A project. We both thank Lode Wylleman and Matthew Aadne for the useful comments on the first version of this paper concerning the relevance of the distinction between t i and τ i , which we have tried to make clear in the present version.