The major axis of an ellipse is its longest diameter, a line that runs through the centre and both foci, its ends being at the widest points of the shape. The semimajor axis is one half of the major axis, and thus runs from the centre, through a focus, and to the edge of the ellipse. For the special case of a circle, the semimajor axis is the radius.
The semimajor axis' length a is related to the semiminor axis b through the eccentricity e and the semilatus rectum ℓ, as follows:
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 and tend to infinity, a faster than b.
The semimajor axis is the mean value of the smallest and largest distances from one focus to the points on the ellipse. Now consider the equation in polar coordinates, with one focus at the origin and the other on the positive xaxis,
The mean value of and , is
Contents 
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:
In terms of the semilatus rectum and the eccentricity we have
The transverse axis of a hyperbola runs in the same direction as the semimajor axis.^{[1]}
In astrodynamics the orbital period T of a small body orbiting a central body in a circular or elliptical orbit is:
where:
Note that for all ellipses with a given semimajor axis, the orbital period is the same, regardless of eccentricity.
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),
where T is the period in years, and a is the semimajor axis in astronomical units. This form turns out to be a simplification of the general form for the twobody problem, as determined by Newton:
where G is the gravitational constant, and 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 used in astronomy is always the primarytosecondary distance; 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 EarthMoon system. The mass ratio in this case is 81.30059. The EarthMoon 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 the geocentric lunar average orbital speed, 1.022 km/s; the same value may be obtained by considering just the geocentric semimajor axis value.
It is often said that the semimajor axis is the "average" distance between the primary (the focus of the ellipse) and the orbiting body. This is not quite accurate, as it depends over what the average is taken.
The timeaverage of the inverse of the radius, r^{ −1}, is a^{ −1}.
In astrodynamics semimajor axis a can be calculated from orbital state vectors:
for an elliptical orbit and, depending on the convention, the same or
for a hyperbolic trajectory
and
and
(standard gravitational parameter), where:
Note that for a given central body and total specific energy, the semimajor axis is always the same, regardless of eccentricity. Conversely, for a given central body and semimajor axis, the total specific energy is always the same.

[[File:thumbright200pxThe semimajor axis of an ellipse.]] In geometry, the term semimajor axis (also spelled out semimajor axis) is used to describe the dimensions of ellipses and hyperbolae.
