system
Given the following post, respond as if you're commenting on Reddit:
human
In astronomy, how do you know a star or galaxy is redshifted and not just red?
gpt
Red shifted doesn't refer to the color of the object.

It's like the Doppler shift. The spectrum of light is determined by passing it through a spectroscope. This breaks the light up similar to a prism.

Each object has a unique spectrum based on absorption bands and emission bands.

So if an object is a second or third generation star it will have spectra of elements in addition to hydrogen and helium.

You then compare these bands to a known reference, a spectroscopic image of elements taken on earth.

The bands will be the same, however, if the image from the object is shifted towards the red, meaning it's been spread wider, the object is moving away from us.

If the bands are shifted towards the blue, the waves are compressed and the object is moving towards us.

Hope this helps!