Transverse Vector Decomposition Method for Analytical Inversion of Exoplanet Transit Spectra

We develop a new method for analytical inversion of binned exoplanet transit spectra and for retrieval of planet parameters. The method has a geometrical interpretation and treats each observed spectrum as a single vector $\vec r$ in the multidimensional spectral space of observed bin values. We decompose the observed $\vec{r}$ into a wavelength-independent component $\vec{r}_\parallel$ corresponding to the spectral mean across all observed bins, and a transverse component $\vec{r}_\perp$ which is wavelength-dependent and contains the relevant information about the atmospheric chemistry. The method allows us to extract, without any prior assumptions or additional information, the relative mass (or volume) mixing ratios of the absorbers in the atmosphere, the scale height to stellar radius ratio, $H/R_S$, and the atmospheric temperature. The method is illustrated and validated with several examples of increasing complexity.


INTRODUCTION
Two and a half decades after the discovery of the first extrasolar system planet, the number of known exoplanets is now into the thousands 1 . After the initial boom of discoveries based on the radial velocity method (Wright 2018;Perryman 2018), the current detections are mostly done using transit observations, where a planet is identified while passing in front of the host star, blocking a small fraction of the stellar flux (Henry et al. 2000;Charbonneau et al. 2000). Subsequently, some of the transiting planets are targeted for spectroscopic studies and the transit is recorded at different wavelengths (Schneider 1994;Seager & Sasselov 2000). A number of current and planned large-scale planetary surveys are based on observing planetary transits at different wavelengths, thus providing spectral information about the composition and the structure of the atmosphere of the planet (Madhusudhan 2019).
During a transit event, a planet blocks a certain fraction, M (λ), of the original stellar flux F O (λ), where F T (λ) is (the minimum of) the observed flux during transit at a given wavelength λ, R S is the stellar radius, and the transit radius R T (λ) is the radius of the equivalent solid disk blocking the same amount of light. The key feature of (1) is the dependence of the transit depth M (λ) on the observed wavelength λ, reflecting the differential absorption properties of the atmosphere due to its chemical composition. This allows for detection of atmospheric gasses with strong absorption lines in the probed wavelength range. In addition, the transit spectrum also contains information about the physical characteristics of the planet like its size, temperature, gravity, atmospheric pressure, etc. The primary goal of exoplanet transit spectroscopy is the inversion of the observed spectrum in order to retrieve the parameters of the planet and its atmosphere Cobb et al. 2019; Barstow & Heng 2020;Kitzmann et al. 2020;Harrington et al. 2021;Cubillos et al. 2021;Blecic et al. 2021;Welbanks & Madhusudhan 2021a,b). This inversion process inevitably relies on a forward model (FM), which, for a given set S of planet parameters, can predict the observed transit radius at each wavelength: S(planet parameters) The inverse problem corresponding to the forward model (2) can then be formulated as follows: given the measured spectrum R T (λ), derive the values of the planet-specific parameters. This is a difficult challenge due to intrinsic theoretical complications: first of all, the problem is highly nonlinear and does not easily lend itself to simple inversion methods from linear algebra; furthermore, there exist several directions of degenerate solutions in the parameter space which lead to equally plausible transit spectra. In this paper we shall focus on overcoming these theoretical challenges, leaving aside the additional observational complications due to instrumental noise, spectral resolution, etc.
The standard approach is to solve the inversion problem numerically. Classical inversion methods extensively used in analyzing infrared spectra from remote sensing of the Earth and Solar System planets are described in Hanel et al. (2003) and are based on linearizing the problem. More recent approaches incorporate various machine learning (ML) techniques (Márquez-Neila et al. 2018;Zingales & Waldmann 2018;Cobb et al. 2019;Oreshenko et al. 2020;Fisher et al. 2020;Himes et al. 2020b,c;Guzmán-Mesa et al. 2020;Nixon & Madhusudhan 2020;Himes et al. 2020a;Yip et al. 2021;Ardevol Martinez et al. 2022) (for a recent comparative review, see ). The main disadvantages of the numerical ML approach are: i) the ML model is in principle a black box which hides the relevant physics and is not easily interpretable (Nixon & Madhusudhan 2020;Yip et al. 2021); ii) the ML model does not learn directly the relevant physics, but only the (finite amount of) data generated by the forward model, which introduces additional uncertainties during the training process (Matchev et al. 2020).
On the other hand, less has been done in terms of analytical approaches to the inverse problem. The first step in this direction would be to replace the numerical forward model (2) with analytical expressions which capture the relevant physics (Brown 2001;Hubbard et al. 2001;Burrows et al. 2003;Fortney 2005;Benneke & Seager 2012;de Wit & Seager 2013;Griffith 2014;Vahidinia et al. 2014;Heng & Showman 2015;Bétrémieux & Swain 2017;Heng & Kitzmann 2017;Heng 2019) and can then be possibly inverted. The analytical formulas typically rely on simplifying assumptions and approximations,.e.g, spherical symmetry, isothermal atmosphere, isobaric approximation, constant specific gravity, etc. Nevertheless, these theoretical results agree well with the numerical forward models and allow for better understanding of the underlying physics and of the intrinsic parameter degeneracies present in the problem (Griffith 2014;Heng & Kitzmann 2017;Welbanks & Madhusudhan 2019;Matchev et al. 2021).
The main goal of this paper is to push the limits of the analytical approach by applying ideas from vector algebra and analytical geometry to disentangle the parameter dependencies within the forward model and provide a clean measurement of the relative chemical abundances of the absorbers present in the atmosphere. This allows for direct and meaningful comparisons of the atmospheric chemical compositions of different exoplanets, independent of the individual physical planet parameters.
The paper is organized as follows. In section 2 we describe a typical forward model and introduce the relevant parameters. In section 3 we review some of the existing analytical approximations in the literature, highlighting their generic features which will be relevant for our discussion. In section 4 we describe our analytical inversion procedure which results in the measurement of the relative chemical abundances and two combinations of planet-specific physical parameters. In sections 5, 6, 7 and 8 we illustrate our method with several toy examples of increasing complexity. In section 9 we present our summary and conclusions.

FORWARD MODEL
The planet-specific input parameters to the forward model can be categorized into the following three groups: • Physical parameters. These are parameters which refer to the physical characteristics of the planet or the observational geometry: radius R S of the host star, atmospheric temperature T , specific gravity g and reference pressure level P 0 at a given planet radius R 0 corresponding to an optically thick atmosphere along the line of sight (Heng & Kitzmann 2017).
• Chemical composition parameters. These are parameters which refer to the chemical composition of the planet atmosphere. The mean molecular massm is determined by the major gas components (e.g., hydrogen and helium for hot Jupiters). The attenuation of the stellar light depends on the volume mixing ratio X a = n a /n (or equivalently, the number density n a ) and the molecular mass m a of each individual absorber, where a = 1, 2, . . . , N abs and n is the total atmospheric number density.
• Wavelength-dependent parameters. These include the cloud opacity κ cl (λ) and the absorption coefficients χ a (λ) for the individual absorbers. In principle, these parameters can be viewed as a subset of the chemical composition parameters, but here we would like to emphasize their wavelength dependence. Note that the absorption coefficients χ a in principle depend not only on the wavelength, but also on temperature and (to a lesser extent) on pressure.
Note that not all of the listed inputs are a priori unknown. For example, for a given constituent a, its molecular mass m a and absorption coefficients χ a (λ) are known physical constants. In addition, alternative astronomical observations may provide independent constraints on some of the other input parameters. However, to be completely general, in this paper we shall not rely on such additional observations and will instead treat all planet-specific input parameters (i.e., everything except for the known physical constants m a and χ a (λ)) as a priori unknown. The general expression (3) for the FM can be further simplified by noting that the absorption of the individual gases enters the model only through the total atmospheric opacity where N abs is the number of absorbers considered in the model. Without any loss of generality, the forward model (3) can then be rewritten as in terms of the seven input parameters R S , R 0 , T , P 0 , g,m and κ(λ) (Matchev et al. 2021).

ANALYTICAL MODELS
Equations (4) and (5) define the general setup for the inverse problem under consideration in this paper. In this section we narrow down the possible analytical forms of the forward model (5).
The first simplification arises due to standard dimensional analysis (Langhaar 1951;Barenblatt 1996). Matchev et al. (2021) showed that, again without any loss of generality, the analytical expression behind the forward model (5) must be of the form where H is the pressure scale height k B is the Boltzmann constant and f is an unspecified function of dimensionless quantities only, i.e., of the four dimensionless Pi groups listed as its arguments, plus possibly some numerical dimensionless mathematical constants like π, e, etc. In order to provide the necessary length dimensions for R T , in eq. (6) we singled out R S as a prefactor; the same role could in principle be played by H or R 0 (the latter choice was the one made in Matchev et al. (2021)). Here we find it convenient to work with R S because the transit depth M is quoted in terms of the ratio R T /R S , see eq. (1). Matchev et al. (2021) also showed that π 4 is not a relevant parameter in the problem and can be safely dropped. The end result from the dimensional analysis can therefore be written as To proceed further, one has to perform explicit theoretical calculations which would reveal the specific form of the function f . In order to obtain relatively simple analytical results, one typically has to make some simplifying assumptions. In the case of an isothermal, radially symmetric atmosphere Heng & Kitzmann (2017) obtained a simple analytical expression which can be written in analogy to (9) as where γ E = 0.577215665 is the Euler-Mascheroni constant, is the optical thickness of the atmosphere along the line of sight at the reference radius R 0 and is the exponential integral of the first order with argument τ 0 . For an optically thick atmosphere (large τ 0 ), the E 1 term is negligible and (10) simplifies to which is consistent with the general result (9). In the rest of the paper, we shall use the parametrization (13) for illustration of our inversion procedure.

INVERSION PROCEDURE
In general, a transit spectrum is taken at different wavelengths, binned in accordance with the spectral resolution of the instrument. Let N bin be the number of spectral bins whose central values form the wavelength vector array λ ≡ (λ 1 , λ 2 , λ 3 , . . . , λ N bin ) .
As pictured in this equation, in the remainder of this paper we shall be using vector notation to represent quantities with N bin components, i.e., variables whose values depend on the wavelength λ. For example, the vector array containing the N bin measured transit radii will be denoted as Since a transit event measures not R T itself, but the ratio R T /R S (see eq. (1)), we shall simplify the notation by defining The dimensionless vector r contains the full information about a given transit observation. In our approach, any given transit spectrum is represented by a single point in the N bin -dimensional spectral space and r is nothing but the position vector of this point, measured from the origin.
An important direction in the N bin -dimensional spectral space is given by the universal vector which points in the direction of perfectly flat transit spectra which show no variation with wavelength. This case could correspond to a planet without any atmosphere, or to an atmosphere dominated by gray clouds, whose opacity is independent of wavelength and can therefore be written as The absorption coefficients χ a (λ) of the individual absorbers are wavelength dependent and should therefore also be organized into a vector array. However, since absorption coefficients have physical dimensions, we would like to factor out a dimensionful constant χ which renders the remaining coefficients ξ a (λ) dimensionless: The actual numerical value of χ is not important and can be chosen for convenience, the simplest choice is simply χ = 1 m 2 kg in SI units. With those conventions, the total opacity (4) becomes With the new vector array notation, the main result (13) for the transit spectrum can be rewritten as where in the last term the logarithm function acts component-wise on the vector array κ as follows producing a new vector array, as suggested by the long right arrow above the function name. This operation is identical to the way universal functions act on numpy arrays, but unfortunately, there is no established formal mathematical notation for it, and we shall use the long arrow notation depicted in eq. (22).
Let us now work out in detail the last term in eq. (21). First, let us simplify the notation by incorporating the cloud opacity term into the sum in eq. (20). Defining we can treat the clouds as the a = 0 absorber and rewrite (20) in a more compact form Now substituting this into (21), we have where to arrive at the second line we have multiplied and divided the argument of the logarithm in the last term with the quantity which is the total mass mixing ratio of all absorbers. To further simplify the notation, let us introduce the relative mass mixing ratios ω a for the different absorbers (which for brevity we shall simply refer to as "weights"), which can be written in several equivalent ways: where the mass mixing ratio µ a , the volume mixing ratio X a , the mass density ρ a and the number density n a of each absorber are related by and n is the atmospheric number density, so that nm is the (mass) density of the atmosphere. By definition, the weights ω a are normalized to one: This allows us to rewrite (25b) in the form Before proceeding with the last step of the analysis, let us take stock of what we have been able to accomplish with the last equation. The N bin -dimensional vector r representing the measured transit spectrum has been decomposed into two components with the help of the dimensionless vectors u and ξ a . The first component in (30) is along the universal vector u and depends on all of the input parameters. The second component in (30) is constructed out of the known dimensionless vectors ξ a and its direction is entirely determined by the dimensionless chemical composition weights ω a , while its magnitude in addition depends on the ratio H/R S . Our main goal will be to measure these components from the data and thus determine the relative chemical composition ω a , the H/R S ratio and the combination of parameters specifying the component of r along u.
Note that the two components in (30) are not orthogonal, since the vectors ξ a are not necessarily orthogonal to u (in fact, ξ 0 is u itself). Therefore, the next step is to decompose the (dimensionless) vector appearing in the last term of (30) into a longitudinal component L along u and a transverse component L ⊥ orthogonal to u: whereû ≡ u/ √ N bin is a unit vector along u. Substituting (31) and (32) into (30), we get This is our main result. We are now ready to perform the desired measurements with the following simple algorithm, whose starting point is the observed spectrum r: 1. Compute the component of r = R T /R S . The first step is to project the measured transit spectrum vector r onto the universal direction u. This results in The left-hand side is an experimentally observed quantity, which is equal to √ N bin times the average of the spectrum across all wavelengths (this average is an informative quantity -for example, in Matchev et al. (2022) it was shown to be the first principal component of synthetic datasets of transit spectra). The right-hand side of this equation is a theoretical quantity (i.e., function of input planet-specific parameters) which is the theoretical interpretation of this measurement.
2. Compute the ⊥ component of r = R T /R S . Next we obtain the component of r orthogonal to u by simply subtracting the mean: Once again, the left-hand side is an experimentally observable quantity, in this case an (N bin −1)dimensional vector lying within the (N bin − 1)-dimensional hyperplane orthogonal to u. Note that the right-hand side depends on relatively few input parameters, namely, the relative mass mixing ratios ω a of the absorbers and on the ratio H/R S . We shall now proceed to determine those parameters independently.
3. Determine the relative mass mixing ratios ω a . The key observation at this point is that the direction of the transverse vector L ⊥ (ω a ) is completely determined by the dimensionless weights ω a . At the same time, this direction is already known from the measurement (35) of r ⊥ . Therefore, all parameters ω a can be simultaneously determined by requiring that the measured vector r ⊥ is in the same direction as L ⊥ (ω a ). This can be accomplished, for example, by scanning over all possible trial valuesω a until the two vectors point in the same direction, i.e., until the relevant dot product is maximized: As indicated in eq. (36), in the rest of the paper we shall use a tilde to denote trial values for different parameters. On the other hand, retrieved parameter values will carry no tilde.
4. Determine the ratio H/R S . Once the relative weights are found from (36), the vector L ⊥ (ω a ) is fully determined. Then the ratio H/R S can be obtained by simply dividing the magnitudes (or the corresponding individual components) of r ⊥ and L ⊥ (ω a ): To review the bidding so far, the above algorithm has allowed us to measure a total of N abs + 1 degrees of freedom, namely: i) the parameter combination in the right-hand side of eq. (34), ii) the ratio H/R S and iii) the N abs −1 independent degrees of freedom contained in the relative mass mixing ratios ω a (recall that one degree of freedom there is removed by the normalization condition (29)). Therefore, a necessary condition for being able to fully determine all these degrees of freedom is that the number of bins in the transit spectrum is at least that many: In the next few sections we shall illustrate the algorithm described above with some simple yet nontrivial examples: N bin = 3 and N abs = 2 in section 5, N bin = 4 and N abs = 3 in section 6 and N bin = 3 and N abs = 3 in section 7. In those cases, our inversion procedure can be easily visualized due to the relatively low number of bins. Then in section 8 we shall consider a more realistic example with N bin = 13 and N abs = 3. In all of these examples, we shall use common fixed values for the following planet-specific parameters: R 0 = 1.79R J , R S = 1.57R , g = 9.77 m/s 2 , P 0 = 10 bar, m = 2.4 m amu , where m amu = 1.660539040 × 10 −27 kg is the atomic mass unit, which are consistent with those inferred for WASP-12b (Márquez-Neila et al. 2018). Then for each model, we shall be choosing a study point defined by the masses m a , the volume mixing ratios X a and the dimensionless absorption coefficients ξ a (at a given temperature T ) for the respective number of absorbers N abs and number of wavelength bins N bin . Then we shall apply our algorithm to recover the values of the input parameters for the respective study point.

EXAMPLE WITH THREE SPECTRAL BINS AND TWO ABSORBERS
We start with a simple toy example with N bin = 3 bins in the transit spectrum and N abs = 2 absorbers in the atmosphere. The two absorbers will be denoted as A and B and will be taken to have the following parameters at T = 2000 K: The resulting spectrum from eq. (13) is which corresponds to a vector r in the 3-bin spectral space r = (0.120664, 0.121364, 0.123640).
Using the numerical values for the planet parameters listed at the end of section 4, one can easily verify that the obtained numerical value for r is precisely as predicted by the right-hand side of eq. (34). This completes Steps 1 and 2 of the algorithm. The measurement of the mixing ratios ω A and ω B via Step 3 is illustrated in the two panels of Figure 1. The direction of r ⊥ in the transverse plane can be found from the measured components (44) and is given by the polar angle This direction is indicated by a diagonal dotted line in the left panel of Figure 1 and by a horizontal dashed line in the right panel of Figure 1. In order to find the weights ω A and ω B , we need to build the set of vectors (31) in terms of the trial valuesω A andω B , i.e.

L(ω
and find which one of them has a transverse component L ⊥ (ω A ,ω B ) matching the direction of r ⊥ . This simple exercise is also illustrated in Figure 1. The colored points in the left panel of the figure represent the family of vectors L ⊥ (ω A ,ω B ), color coded by the trial value ofω A (recall that in this toy exampleω B will be simply given by 1 −ω A ). The gray arrows depict five L ⊥ vectors corresponding to five representative trial values ofω A = {1.0, 0.90, 0.50, 0.10, 0.0} (from left to right), and the color coding gives all intermediate trial values ofω A . The direction of r ⊥ intersects the L ⊥ family at the point marked with the star symbol, which reveals the true value of ω A as ω A = 0.833, in precise agreement with the input value in (39a). The right panel in Figure 1 shows an alternative representation of the same measurement. Since the family of L ⊥ (ω A ,ω B ) vectors does not involve any other planet-specific parameters, the relationship between the trial mass mixing ratioω A and the corresponding L ⊥ (ω A ,ω B ) direction can be built up in advance, as shown in the right panel of Figure 1, where we kept the color-coding for convenience only (it simply tracks the horizontal axis). Then, once the direction of r ⊥ is known from (45), we can directly read off the true value of the mixing ratio ω A from the horizontal axis, as illustrated with the dashed lines.
Once the value of ω A is known, in Step 4 of the algorithm we construct the vector which allows us to compute the ratio H/R S in several equivalent ways: which was precisely the input value in this example. This concludes the demonstration of the algorithm in this very first toy example. The algorithm reproduced exactly (within machine precision) the input values for the fractional chemical abundance of the two components (ω A and ω B ), the ratio H/R S and the spectral average r . The algorithm would work for any number of bins N bin and any number of chemical absorbers N abs , yet the simplicity of this toy example allowed for easy visualization and comprehensive step-by-step demonstration of the main steps of the algorithm. In the following two sections we shall consider more complicated and more realistic examples, skipping some of the details already seen here and instead focusing on the new elements in those examples.

EXAMPLE WITH FOUR SPECTRAL BINS AND THREE ABSORBERS
In this section we shall consider a slightly more complex example with N bin = 4 bins in the transit spectrum and N abs = 3 absorbers in the atmosphere. The wavelength-dependent vector arrays now have 4 components. The three absorbers will be denoted as A, B and C and will be taken to have the following parameters (at T = 2000 K) which we decompose as r = r + r ⊥ ≡ r û + r ⊥1ê1 + r ⊥2ê2 + r ⊥3ê3 (52) onto the four orthonormal vectorŝ u = 1 2 (1, 1, 1, 1),ê 1 = 1 √ 2 (0, 1, −1, 0),ê 2 = 1 √ 6 (−2, 1, 1, 0),ê 3 = 1 √ 12 (1, 1, 1, −3), resulting in the four components r = 2.4745 × 10 −1 , r ⊥1 = −7.1927 × 10 −4 , r ⊥2 = −1.0374 × 10 −3 , r ⊥3 = −5.3620 × 10 −4 . (54) It is easy to check that the measured component r along the universal vector u once again exactly matches the prediction from the theoretical formula (34). This time the transverse vector r ⊥ is three-dimensional. In order to extract the chemical composition from its direction, we form the vector family The family of transverse vectors L ⊥ (ω a ) is visualized in Figure 2 in complete analogy with Figure 1. We scanω A andω B on a regular grid with 200 points in each direction and show the resulting grid of transverse vectors L ⊥ (ω a ). The tips of the vectors L ⊥ (ω a ) outline a two-dimensional triangularlyshaped surface in the three-dimensional transverse space, whose corners A, B and C correspond tõ ω A = 100%,ω B = 100% andω C = 100%, respectively. The surface is color-coded by the value ofω B in the left panel andω C in the right panel. The origin O of the coordinate system is marked with the × symbol and the dotted line originating from O shows the measured direction of r ⊥ according to (54). This line intersects the plotted surface at the point marked with the symbol, which reveals the location of the vector L ⊥ (ω a ) built from the true values of the mass mixing ratios ω a . The length of this vector in turn reveals the ratio H/R S according to (37). Once again, the described procedure resulted in exact retrieval of the parameters ω a , H/R S and r (the precision is only limited by the resolution of theω a scan which can be taken to be arbitrarily precise).
Since in this example we have three absorbers with relative weights ω a subject to ω A + ω B + ω C = 1, the appropriate generalization of the right panel in Figure 1 is a ternary plot, as illustrated in Figure 3. Each point on the plot represents a unique combination of the trial valuesω A ,ω B andω C , with the white cross denoting the true input values from (49). These combinations are then color-coded by the value of the relative angle between the fixed measured vector r ⊥ and the trial vector L ⊥ (ω A ,ω B ,ω C ). The magnitude of ∆Θ is indicative of the goodness of fit -the smaller the value of ∆Θ, the more aligned the two vectors are. Figure 3 reveals that even a coarse scan of the relative mixing ratios with the current step of ∆ω = 0.005 successfully finds the right answer. The best match is observed forω A = 0.16,ω B = 0.32 andω C = 0.52, which is consistent with the inputs in (49) within the scan resolution. Since our method is exact, in theory the precision of the retrieval can be arbitrarily improved by increasing the scan resolution. In practice, however, this will be limited by the observational noise level. Figure 3. A ternary plot illustrating the retrieval of the relative mass mixing ratios ω A , ω B and ω C for the example discussed in Section 6. Each point on the plot represents a unique combination of the trial valuesω A ,ω B andω C , subject toω A +ω B +ω C = 1, with a scan resolution of ∆ω = 0.005. The points are color-coded by the value of the relative angle ∆Θ (in radians) between the fixed measured vector r ⊥ and the trial vector L ⊥ (ω A ,ω B ,ω C ). The white cross marks the true values of ω A , ω B and ω C .

UNDERCONSTRAINED EXAMPLE: THREE SPECTRAL BINS AND THREE ABSORBERS
The retrievals in the examples from the previous two sections were successful because we had enough spectral information and the condition (38) was satisfied. Let us now briefly investigate how our method performs when this condition is violated and the system is underconstrained. For this purpose, let us reconsider the example from the previous section (N bin = 4 and N abs = 3), only this time let us omit the last spectral bin from the discussion, leaving us with only three bins (N bin = 3). The analysis proceeds the same way as before, only now the transverse space is two dimensional, as illustrated in the left panel of Figure 4, which is the analogue of the plots in the left panel of Figure 1 and in the right panel of Figure 2. Unlike those cases, however, this time the measured direction of the transverse vector r ⊥ does not pick out a single solution for L ⊥ (ω A ,ω B ,ω C ). Instead, there is a whole family of vectors L ⊥ (ω A ,ω B ,ω C ) which are perfectly aligned with r ⊥ . This is also visible in the ternary plot in the right panel of Figure 4 (the analogue of Figure 3), which exhibits a whole region of possible solutions -see the dark blue shaded valley with ∆Θ = 0. Of course, the true solution, marked with the white cross, is also included in that region, but is not uniquely determined. Despite the degeneracy of the found solutions, the method is still capable of ruling out large areas of the ternary plot, in particular eliminating values of ω A above 20% or below 5% and setting an upper (lower) limit on the values of ω B (ω C ). These observations are quantified in Figure 5, in which we  Figure 1 and the right panel of Figure 2. Here the transverse space is two-dimensional (as in Figure 1) and the locus of points representing L ⊥ (ω a ) is two-dimensional as well (as in Figure 2). The measured direction of r ⊥ indicated by the black dotted line is in the plane of the figure, and the symbol marks the true value of L ⊥ . The right panel shows the corresponding ternary plot illustrating the results from the retrieval for this case, in analogy to Figure 3. plot in the (ω B ,ω C ) plane all points in our scan with ∆Θ < 0.001. In the left panel of the figure the points are color-coded by the value ofω A . The plot thus outlines the bottom of the dark blue valley in the ternary plot in Figure 4, quantifying the relation among the three concentrations along the degeneracy. In the right panel of Figure 5 the points are instead color-coded by the ratio of the retrieved and true values for the quantity R S /H. We see that the degeneracy in the solutions for the chemical abundances results in a range of possible values for the ratio (58). The upper bound can be understood from the left panel in Figure 4, where there is a L ⊥ vector of maximal length along the measured direction of r ⊥ . Note that the allowed family of vectors L ⊥ (ω a ) includes the origin of the coordinate system, where | L ⊥ | = 0 (this is why, to avoid division by zero, in this section we chose to calculate R S /H instead of H/R S ). The inclusion of the origin leads to the singularity point which is visible in the ternary plot as the point of convergence of all ∆Θ contours, since ∆Θ is undefined at the origin. This concludes our set of toy examples. Before moving on to a more realistic example in the next section, let us use the left panel in Figure 4 to comment on one more interesting scenario. Recall that the number of absorbers N abs is a priori unknown, and we may easily find ourselves in a situation where we have overlooked a possible contributor. For example, consider the same three bin case of this section, but suppose that we did not include component C in our analysis. The r ⊥ calculated from the observed spectrum would still point in the same direction as shown in the left panel of Figure 4, Figure 5. Representation of the degenerate solutions found in the retrieval analysis of Section 7. All points from the L ⊥ (ω a ) grid with ∆Θ < 0.001 are plotted in the (ω B ,ω C ) plane and color-coded by the value of ω A (left panel) or the ratio of ratios (58) (right panel). and will be inconsistent with any combination of A and B alone. This would unambiguously point to the presence of an additional unknown absorber.

EXAMPLE WITH WFC3 BINNING AND THREE ABSORBERS
In the previous three sections we were considering toy examples with relatively few bins and absorbers, but this was done only for easy visualization and to illustrate the geometrical connection. In fact, our method is applicable for an arbitrarily large number of bins N bin and an arbitrarily large number of absorbers N abs ≤ N bin − 1; the method would still produce the correct answers, as derived in Section 4. In other words, our previous low-dimensional examples provide convenient visualizations, but this is not required for the method to be successful.
To demonstrate this, here we shall consider a more complex example motivated by the available data from the Hubble Space Telescope Wide Field Camera 3 (WFC3). Following previous studies in the literature, we shall consider N bin = 13 bins in the wavelength range 0.838 − 1.666 µm (Kreidberg et al. 2015;Márquez-Neila et al. 2018). For our study here we shall choose N bin = 3 absorbers that are typically included in the analysis of transit spectra of hot Jupiters, namely water (H 2 O), hydrogen cyanide (HCN ) and gray clouds. The choice of chemical absorbers uniquely fixes the vector arrays ξ a which are central to any inversion analysis. In our previous examples, we have been assuming constant ξ's, but in reality they depend on the temperature and (to a lesser extent) on the pressure. Therefore, to obtain reliable results from our inversion procedure, we need to account at least for the temperature dependence ξ a (T ). Figure 6 shows the wavelength dependence of the dimensionless absorption coefficients ξ a defined in (19), using the WFC3 binning for water (left panel) and HCN (right panel) in a temperature range starting from T = 500 K and increasing by ∆T = 250 K. At the same time, for the gray clouds we shall continue to use a constant opacity vector ξ 0 = u as prescribed in (23).  (59c) Figure 7 shows the generated transit spectrum for our study point (59). This is the starting point for our retrieval algorithm. Next we calculate r from eq. (1) and decompose it into r and r ⊥ components, where for the latter, we use a system of N bin − 1 = 12 orthonormal basis vectors orthogonal to u. The next step is to construct the grid of vectors  Figure 3, which illustrate the extraction of the weights ω A , ω B and ω C . Each panel corresponds to a different a priori trial guessT for the atmospheric temperature, as indicated in the titles. The input temperature for this example was T = 2000 K. The points are color-coded by the value of the relative angle ∆Θ (in radians) between the fixed measured vector r ⊥ and the corresponding trial vector L ⊥ (ω A ,ω B ,ω C ,T ) from (61). As before, the white cross marks the true values of ω A = 0.342, ω B = 0.513 and ω C = 0.144.
where for clarity we have explicitly indicated the dependence not only on the trial valuesω a for the weights, but also on the trial valueT for the temperature. Next we project (60) on the transverse space to obtain the family of transverse vectors The final step is to find which of these L ⊥ vectors matches the direction of the measured transverse vector r ⊥ . This is a trivial computational task and the result is illustrated in the ternary plots of   Figure 3, we show the relative angle between the two vectors, ∆Θ, which was introduced in eq. (57). Since the absorption coefficients ξ a are temperature dependent, the retrieval analysis requires a choice for the trial temperatureT . Figure 8 shows results for four such choices ofT :T = 1500 K (upper left panel),T = 2000 K (upper right panel),T = 2500 K (lower left panel), andT = 2900 K (lower right panel). In interpreting these plots, one should pay attention to two things: i) the location of the found minimum of ∆Θ relative to the true answer marked with the white cross, and ii) the value, ∆Θ min , of the angle ∆Θ at the minimum. We see that with the correct guess of the trial temperature (T = 2000 K), the minimum is found at precisely the white cross and furthermore, the fit is very good, since ∆Θ min = 0.0004 (for a scan resolution of ∆ω = 0.002). On the other hand, if we make the wrong guess for the trial temperature, the found minimum shifts, but more importantly, the fit gets worse, since ∆Θ min increases.
The impact of the initial guessT on the goodness of fit is further investigated in the left panel of Figure 9, in which we plot the minimum angle ∆Θ min found in the fit as a function ofT . As already discussed, the ideal fit, i.e., ∆Θ min = 0, is achieved for the true value of the temperature, T = 2000 K. As the guess forT moves away from the true temperature, the fit gets worse, and eventually gives inadequate results at very low temperatures. This behavior of ∆Θ min (T ) can in fact be used to measure the correct temperature T of the atmosphere from This idea is similar to the way particle physicists extract the mass m of an invisible particle from the behavior of a transverse kinematic function f (m) of a trial massm for the invisible particlecompare the left panel in Figure 9 to Figure 4 in Konar et al. (2010). The right panel of Figure 9 shows the corresponding retrieved value of R S /H from eq. (37) as a function of the trial temperatureT . We see that at low temperatures, where the fit for ∆Θ is not very good anyway, the extracted value of R S /H is unreliable. However, in the region around the true temperature T = 2000 K, the retrieved R S /H is relatively close to its nominal value marked with the horizontal red dashed line. It is worth noting that at highT the ratio R S /H still remains well constrained.

SUMMARY AND CONCLUSIONS
This section summarizes the main results of the paper and discusses their implications. In this paper we proposed a novel method to perform an analytical inversion of transit spectroscopic observations. The method has a clear geometrical interpretation -it treats each observed spectrum as a single vector r in the N bin -dimensional spectral space. The main idea of the method is to decompose the observed r into i) a wavelength-independent component r corresponding to the spectral mean across all observed bins, and ii) a transverse component r ⊥ which is wavelength-dependent and contains the relevant information about the atmospheric chemistry. The method allows us to extract, without any prior assumptions or additional information, the following parameters: • The magnitude of r , which is equal to the following combination of planet-specific parameters • The relative mass mixing ratios ω a of the absorbers present in the atmosphere. These quantities represent the relative contributions of the different absorbers to the total opacity of the atmosphere and in our method are completely determined by the direction of the observed r ⊥ via eq. (36). If desired, these relative mass mixing weights can be easily converted to relative volume mixing ratios for the absorbers, using the known values m a for the molecular masses and the measured ω a as follows Note that while the absolute mass or volume mixing ratios are desirable, they suffer from the theoretical degeneracies discussed, e.g., in Griffith (2014) (2019); Matchev et al. (2021). In contrast, the relative abundances are uniquely determined with our method and that is why we introduced them in our main result (33).
• The dimensionless ratio H/R S , which is extracted from the observed magnitude of r ⊥ via eq. (37). If the stellar radius is known from other independent observations, this yields a robust determination of the scale height H by itself.
• The atmospheric temperature T , which can be determined via eq. (62). This measurement relies on the sensitivity of the absorption coefficients χ a to the temperature of the atmosphere.
The main goal of this paper was to establish the theoretical fundamentals of our method, which was then successfully demonstrated in several examples of increasing complexity. In the cases where we had sufficient information, i.e., when N bin ≥ N abs + 1, we were able to correctly reproduce the input values for the above quantities, which validates the method. The further application of the method to real exoplanet transit observations is currently in progress.
The method has an important built-in cross-check which allows to judge the reliability of the fitted results. For example, using the wrong set of chemical absorbers in the analysis will result in a poor match of the r ⊥ direction as measured by the value of ∆Θ min .
By taking into account the wavelength dependence of the observed transit spectrum, the theoretical analysis presented here completes the theoretical discussion of degeneracies given in Matchev et al. (2021). In particular, all of the different classes of degeneracies discussed in that paper are also manifestly present in eq. (63). The new element here is that we are able to determine the relative chemical composition of the atmosphere and its temperature (due to the wavelength and temperature dependence of the absorption coefficients).
This work was supported in part by the United States Department of Energy under Grant No. DESC0022148.