Semimajor axis
In geometry, the major axis of an ellipse is its longest diameter: line segment that runs through the center and both foci, with ends at the widest points of the perimeter. The semimajor axis is one half of the major axis, and thus runs from the centre, through a focus, and to the perimeter. Essentially, it is the radius of an orbit at the orbit's two most distant points. For the special case of a circle, the semimajor axis is the radius. One can think of the semimajor axis as an ellipse's long radius.
The length of the semimajor axis a of an ellipse is related to the semiminor axis's length b through the eccentricity e and the semilatus rectum ℓ, as follows:
 b = a \sqrt{1e^2},\,
 \ell=a(1e^2),\,
 a\ell=b^2.\,
The semimajor axis of a hyperbola is, depending on the convention, plus or minus one half of the distance between the two branches. Thus it is the distance from the center to either vertex (turning point) of the hyperbola.
A parabola can be obtained as the limit of a sequence of ellipses where one focus is kept fixed as the other is allowed to move arbitrarily far away in one direction, keeping ℓ fixed. Thus a\,\! and b\,\! tend to infinity, a faster than b.
Contents
Ellipse
The semimajor axis is the mean value of the smallest and largest distances from one focus to the ellipse. Now consider the equation in polar coordinates, with one focus at the origin and the other on the negative xaxis,
 r(1+e\cos\theta)=\ell.\,
The mean value of r={\ell\over{1e}}\,\! and r={\ell\over{1+e}}\,\!, (for \theta = \pi \, \text{and} \, \theta = 0) is
 a={\ell\over 1e^2}.\,
In an ellipse, the semimajor axis is the geometric mean of the distance from the center to either focus and the distance from the center to either directrix.
Hyperbola
The semimajor axis of a hyperbola is, depending on the convention, plus or minus one half of the distance between the two branches; if this is a in the xdirection the equation is:
 \frac{\left( xh \right)^2}{a^2}  \frac{\left( yk \right)^2}{b^2} = 1.
In terms of the semilatus rectum and the eccentricity we have
 a={\ell \over 1e^2 }.
The transverse axis of a hyperbola coincides with the semimajor axis.^{[1]}
Astronomy
Orbital period
In astrodynamics the orbital period T of a small body orbiting a central body in a circular or elliptical orbit is:
 T = 2\pi\sqrt{a^3 \over \mu}
where:
 a is the length of the orbit's semimajor axis
 \mu is the standard gravitational parameter of the central body
Note that for all ellipses with a given semimajor axis, the orbital period is the same, regardless of eccentricity.
The specific angular momentum H of a small body orbiting a central body in a circular or elliptical orbit is:
 H = \sqrt{a \cdot \mu \cdot (1e^2)}
where:
 a and \mu are as defined above
 e is the eccentricity of the orbit
In astronomy, the semimajor axis is one of the most important orbital elements of an orbit, along with its orbital period. For Solar System objects, the semimajor axis is related to the period of the orbit by Kepler's third law (originally empirically derived),
 T^2 \propto a^3 \,
where T is the period and a is the semimajor axis. This form turns out to be a simplification of the general form for the twobody problem, as determined by Newton:
 T^2= \frac{4\pi^2}{G(M+m)}a^3\,
where G is the gravitational constant, M is the mass of the central body, and m is the mass of the orbiting body. Typically, the central body's mass is so much greater than the orbiting body's, that m may be ignored. Making that assumption and using typical astronomy units results in the simpler form Kepler discovered.
The orbiting body's path around the barycentre and its path relative to its primary are both ellipses. The semimajor axis is sometimes used in astronomy as the primarytosecondary distance when the mass ratio of the primary to the secondary is significantly large (M»m); thus, the orbital parameters of the planets are given in heliocentric terms. The difference between the primocentric and "absolute" orbits may best be illustrated by looking at the Earth–Moon system. The mass ratio in this case is 81.30059. The Earth–Moon characteristic distance, the semimajor axis of the geocentric lunar orbit, is 384,400 km. The barycentric lunar orbit, on the other hand, has a semimajor axis of 379,700 km, the Earth's counterorbit taking up the difference, 4,700 km. The Moon's average barycentric orbital speed is 1.010 km/s, whilst the Earth's is 0.012 km/s. The total of these speeds gives a geocentric lunar average orbital speed of 1.022 km/s; the same value may be obtained by considering just the geocentric semimajor axis value.
Average distance
It is often said that the semimajor axis is the "average" distance between the primary focus of the ellipse and the orbiting body. This is not quite accurate, as it depends on what the average is taken over.
 averaging the distance over the eccentric anomaly (q.v.) indeed results in the semimajor axis.
 averaging over the true anomaly (the true orbital angle, measured at the focus) results, oddly enough, in the semiminor axis b = a \sqrt{1e^2}\,\!.
 averaging over the mean anomaly (the fraction of the orbital period that has elapsed since pericentre, expressed as an angle), finally, gives the timeaverage

 a \left(1 + \frac{e^2}{2}\right).\,
The timeaveraged value of the reciprocal of the radius, r^{ −1}, is a^{ −1}.
Energy; calculation of semimajor axis from state vectors
In astrodynamics, the semimajor axis a can be calculated from orbital state vectors:
 a = {\mu \over {2\varepsilon}}\,
for an elliptical orbit and, depending on the convention, the same or
 a = {\mu \over {2\varepsilon}}\,
for a hyperbolic trajectory
and
 \varepsilon = { v^2 \over {2} }  {\mu \over \left  \mathbf{r} \right }
and
 \mu = G(M+m ) \,
(standard gravitational parameter), where:
 v is orbital velocity from velocity vector of an orbiting object,
 \mathbf{r }\, is a cartesian position vector of an orbiting object in coordinates of a reference frame with respect to which the elements of the orbit are to be calculated (e.g. geocentric equatorial for an orbit around Earth, or heliocentric ecliptic for an orbit around the Sun),
 G is the gravitational constant,
 M and m are the masses of the bodies, and
 \varepsilon , is the energy of the orbiting body.
Note that for a given amount of total mass, the specific energy and the semimajor axis are always the same, regardless of eccentricity or the ratio of the masses. Conversely, for a given total mass and semimajor axis, the total specific energy is always the same. This statement will always be true under any given conditions.
References
 ^ 7.1 Alternative Characterization
External links
 Semimajor and semiminor axes of an ellipse With interactive animation
