When Newton realized that planets orbit due to gravitational forces, our picture of the Solar System changed from one of planets orbiting the Sun, to planets and the Sun all orbiting their mutual center of mass. As the planets travel round and round the Sun, their masses pull the Sun toward them. If the planets are positioned such that their mass is more or less evenly distributed about the Sun, the Sun will sit squarely on the Solar System's center of mass. This came close to happening in both 1951 and 1990. If, conversely, all the planets were to arrange themselves on the same side of Sun in a straight line, then the Sun would be pulled 500,000 km away from the center of mass, more than half its diameter. Throughout most of the 1980s and from the mid 1950s to the mid 1960s, the center of mass of the Solar System was outside the surface of the Sun. Due to the motions of the planets, the Sun is constantly moving in a gentle spiral about the center of mass of the Solar System. This type of motion is called reflex motion.
In our Solar System, Jupiter is 0.1% of the mass of the Sun — no other planet exerts nearly as much influence on the Sun. Consider for a moment what would happen if Jupiter were the only planet in our Solar System. With a mass ratio of 1000:1, the center of gravity is 1/1000 of the distance from the Sun to Jupiter, or (5.2 / 1000) AU = 7.8 × 105 kilometers. This is slightly larger than the Sun's radius, so Jupiter causes the Sun to pivot around a point just outside its surface. In this way, a star's wobble betrays the presence of an unseen planet. The size of the wobble indicates the mass of the planet. The time for one complete wobble is the same as the orbital period of the planet.
The size of this wobble would be greater if Jupiter were larger or if Jupiter were closer to the Sun, and thus exerted a greater gravitational pull. Were we able to zip above the Solar System, and perch near a nearby star to look down on the Sun and planets, it might be possible to perceive the Sun's slight motion. It’s possible in principle, but in practice it’s an extremely challenging observation. The angular size of the wobble is set by the physical diameter of the wobble and the distance to the star. The total amount of wobble is twice the distance from the center of the Sun to the center of gravity, or 1.6 × 106reflex motion is even tinier for an Earth-like planet. Even though the Earth is closer to the Sun, it's 300 times less massive than Jupiter, so it has a much smaller gravitational force on the Sun.
Trying to directly observe the Sun's spiraling motion against a plain of background stars, however, isn't the only way that we can detect this motion. If we were to instead fly out across the ecliptic and look back at the Sun along the plane of the planets, we would instead see the Sun moving toward and away from us as it circles the center of mass. This motion is impossible to discern in images, but is fairly easy to detect using modern high resolution spectrographs. The Doppler shift causes the star's light to shift toward the blue as it moves toward the observer and to shift toward the red as the star (in this thought experiment, our Sun) moves away. Motions as slow as 1 meter per second, the speed of a adult walking, can be seen in bright stars.
Since the 1990s, astronomers have been monitoring nearby stars looking for evidence of Doppler shifts caused by orbiting planets. Much to the astronomy communities amazement, the first planet discovered via this technique was roughly half the size of Jupiter, but on an orbit significantly smaller than Mercury's! The star was 51 Peg, the 51st brightest star in the constellation of Pegasus, and its planet was whipping around the star every 4.3 days. This planet — termed a hot Jupiter for its mass and proximity to its host star — defied all solar systemformation models of the time. What's more, for nearly a decade, many planets found around normal stars were also hot Jupiters. This has forced astronomers to rework their models to allow gas planets to migrate close to their host stars. This technique for detecting extrasolar planets is called the radial velocity method or the Doppler method, and it continues to be used today. From the motions that it detects, astronomers can place lower limits on planetary masses and measure the size and period of the planet orbits.
Geometry is an issue. Only the component of the motion that is directly toward or away from the observer (the radial velocity) is detectable with the Doppler effect. Real motions in space will not always be lined up so conveniently. For example, if we were looking directly down on our own Solar System, all the orbits would be perpendicular to the line of sight. We would see no Doppler effect at all. Looking at the Solar System edge-on, we would see the full Doppler effect of the reflex motion. The orbits of extra solar planets are randomly oriented in space, so we will generally see some fraction of the full Doppler effect, not the full effect. As a result, this method only gives a lower limit to the mass of a planet. If extra solar planet systems are randomly oriented in space, on average we will underestimate their mass by a factor of two. By combining Doppler shifts with other techniques, typically transit observations, it is possible to further constrain both mass and inclination. This is because only planets with very precise alignments can be measured via the transit technique.