Determining how a galaxy moves is not as easy as observing the movement of objects here on Earth. This is because galaxies are billions of kilometers away from us and move at much greater speeds than we are used to witness.
Astronomers must then resort to phenomena such as the Doppler effect because, as you can see in figure 3, when an object that is emitting light (such as a star or a galaxy) approaches us we see its light waves shifted towards the blue. On the other hand, if it moves away from us we see that its light shifts to the red. Both phenomena occur due to the Doppler effect. Since this effect becomes stronger as the object moves faster with respect to us, it means we can use the Doppler effect to calculate the speed of stars and galaxies with respect to us.

Figure 3. Due to the Doppler effect, when stars move away from us their light turns slightly red and when they get closer it turns slightly blue.
And what is the Doppler effect?
You may have noticed that when an ambulance is moving at high speed, the sound of its siren becomes higher-pitched as it approaches you, on the contrary it gets lower-pitched as it moves away. (You could hear it in this audio).
This is because as the ambulance is approaching, the sound of the waves it emits seem to come together and their frequency increases. On the contrary, when you move away the waves seem to grow apart and their frequency seems to decrease. This change in the frequency of the waves when the source is emitting them moves with respect to the person who receives them is called Doppler effect and of course it influences also the light waves. This is why this effect is very important in astrophysics.
We only need to observe the way the frequency of the waves varies over the greatest possible extent of the galaxy, in order to determine the speed and direction at which the stars and gas within it are moving. In this way, astronomers can obtain diagrams that show the velocity vectors of these components in different parts of a galaxy. These vectors contain the information of the magnitude (the numerical value) and the direction of the speed. The last one is expressed in these diagrams with a positive sign if it is approaching us or with a negative sign if it is moving away. Let’s see some examples now.
In figure 4 we see the spiral galaxy 10518-127905. In figure 5 we have its velocity field of the stars and in figure 6 we see its velocity field of the gas. (You can find similar images for all the galaxies you will find in this activity on Marvin’s site along with more detailed information. You just need to write their ID number in the search box.)



As you can see, the velocity vectors are represented by small colored squares (called spaxel) whose value you can check on the scale bar on the right side of the diagram; the little squares start with a white color when the magnitude of the velocity is zero and then turn bright red or blue as the magnitude changes. Notice that positive values are marked in blue which indicates that the stars or gas in that part of the galaxy are moving towards us; while red represents the negative values which tells us that part is moving away from us. If we represent the vectors with arrows, the diagram would look something like this:

Similarly for the velocity field of the gas. If we look carefully at the diagram we can realize that the top of the galaxy moves in one direction and the bottom moves in another one. The same happens with the side parts, the left side has a red color while the right is very faint blue. Can you then tell how the whole galaxy moves?
The answer is rotating. It has been detected that in spiral galaxies most of the stars and gas rotate around the nucleus (the brightest central part) just as the planets revolve around the Sun. However in some galaxies the nucleus moves in a similar way to an elliptical galaxy (we’ll see that in a moment). In addition, as we can see in the diagrams, the rotation velocity is not the same throughout the galaxy, rather it changes and generally increases as we move away from the nucleus. At great distances for some galaxies this velocity becomes constant, in others it decreases and in others it even continues to increase, at least in the fields of view observed by MaNGA. In Sa-type spiral galaxies the rotation speed reaches 300 km/s, while in Sc-types it is around 200 km/s.
To give you an idea of how big these velocities are, take into account that supersonic planes (the fastest in the world) reach speeds of up to 0.670 km/s 1.


American Museum of Natural History
In particular, the rotation speed of our galaxy, the Milky Way, is 220 km/s 2.

American Museum of Natural History
Let us take a look at the elliptical galaxy 10216-9101 in figure 11, its stellar velocity field in figure 12 and its gas velocity field in figure 13.



The velocity fields look very different from the previous spiral galaxy, do you think the same? As you can see, most of the stars in the galaxy move with positive speeds and there are smaller areas with speeds very close to zero. Furthermore, we observe some apart red zones as if they were located almost at random places, something similar happens to the gas. So, we can say that in elliptical galaxies the stars and gas generally do not follow an ordered movement pattern as in spirals, rather they move randomly without following a specific direction. Using an approximate representation with arrows we can see all of this more clearly:

So, in elliptical galaxies we observe that the motions are of both types rotation and dispersion. That is, the gas and some of the stars within the galaxy rotate around the nucleus in definite orbits, but most move in orbits that have no definite shape and change directions almost randomly. The rotation velocities observed in this type of galaxies are less than 100 km/s, while the velocity dispersion (which indicates the intensity of the dispersion motions) are usually around 200 km/s. Therefore, the dispersion motions are the ones that dominate in this type of galaxies.
On the other hand, look again at the velocity fields of the elliptical galaxy, do you notice that at the edges there are parts that look like patches of a single color? This is because the number of stars and gas decreases as we move away from the galaxy’s nucleus and therefore it becomes more difficult to obtain reliable information about its movement since the signal we receive from them is weaker (the same happens with the WiFi signal when you move away from the modem), then astronomers must resort to a technique called “Binning” which consists of grouping the data from several Spaxels and adding their signal until it reaches a minimum value that ensures that the quality of the data is good enough so that the speed can be measured reliably. So it is not that all the Spaxels in those areas have the same speed value, but that in that area that is the most representative value.
1 NASA, Typical speeds for supersonic aircraft. https://www.grc.nasa.gov/www/k-12/airplane/lowsup.html#:~:text=Typical%20speeds%20for%20supersonic%20aircraft,%2C%20expansions%2C%20and%20flow%20choking.
2 Camarillo, T., Dredger, P. & Ratra, B. Median statistics estimate of the galactic rotational velocity. Astrophys Space Sci 363, 268 (2018). https://doi.org/10.1007/s10509-018-3486-8