In the main text we talked about the volume and surface area of 3 dimensional objects (such as spheres and discs and cubes). So, why do we need to bother with this in astronomy? What's so important about memorizing a bunch of equations about the volume area of all these objects?

Well, the simple answer to these questions is that any object you encounter
in astronomy (be it a planet, a star, or a galaxy) will be a 3-dimensional object
with some "size" associated with it. This so called "size"
can be intuitively thought of as how much space it takes up (i.e., its volume)
or in terms of how "large" is it (i.e., its radius or diameter). You
mith also wonder what the shape of the object is, how much mass it has, and
*how* is its mass distributed over the space that it occupies? So, whether
you like it or not, you will encounter situations where such questions will
become important. Two very important concepts to be familiar with are that of
*unit volume* and *density*.

Sometimes we are looking at objects and we need to ask very fundamental questions.
We might not be necessarily interested in how much total space the thing occupies.
We might be looking at a part of it, or we might be asking questions such as
"how many atoms are there in 1 cm^{3} of the atmosphere of planet
Z"? In such cases we are not asking something about the whole object but
only part of the object, or something that we believe - in some approximation
- to be a fundamental question to ask about the object.

For this reason we define the notion of **unit volume**. The notion of unit
volume is very geometrical and "abstract", but at the same time it
is an exteremely simple idea. When we look at a unit volume inside an object
we imagine some arbitrary sized cube that is *much smaller* than the size
of the object, but large enough to contain a sufficient "sample" of
the object.

The notion of unit volume can be used to talk about the **density** of an
object. The definition of density is as follows:

density = mass/unit volume

It has units of "mass" divided by units of "length^{3}",
so it is usually given as kg/m^{3} or g/cm^{3}. Notice how the
idea of unit volume enter here. Ideally, to measure density of an object or
of some material, you can imagine going inside the material, taking a small
1cm x 1cm x 1cm sample, and measuring its mass on a scale. The density of the
object would then be the measured mass divided by 1 cm^{3}.

Sometimes - as you can imagine, in the case of a star for instance - it is impossible to put yourself in the object to make such a measurement. Further complications arise from the fact that real objects - either in our experiences around us or in astronomy - tend to have mass distributed in different amounts in different parts. For instance, imagine your own body. Clearly, the distribution of mass in your body is not uniform! Your bones have a higher density (more mass per unit volume) than your lungs, and so on .... Thus, in reality situations can be quite complicated.

But, we are often saved by the fact that - at least at a basic level - we don't
care about these complications. We are only interested in *average densities.
*For instance, suppose someone asks you what the density of the sun is. Well,
this is a complex question. For one thing, you have to first worry about the
fact that you can't just put yourself in the sun, pick a sample of its mass,
weight it, and then calculate the density. You also have to worry about the
fact that it might really depend on where you actually took the sample from
(from the outer surface of the sun or from the center of the sun)! But ... you
can calculate an average density. You can first assume that the sun is roughtly
spherical, and so it has a radius R=695,000 km. Then, knowing the formula for
the volume of a sphere you can calculate the volume of the sun:

V = (4/3) p R^{3}

V = (4/3) (3.1415) (695,000)^{3} = 1.406 x 10^{18} km^{3}

Now, from various measurements - which you will learn about in your course
- you estimate the mass of the sun to be 1.99 x 10^{30} kg (or simply,
look it up in an astronomy table, like the one at the end of your textbook!).
Then, the *average density* of the sun is: average density of the sun =
total mass of sun/total volume of sun=1.41x10^{12} kg/(km)^{3}.

Using unit converstions you can get this to grams
per cubic centimeters. There are 1000 g in a kg and there are 10^{5}
cm in one km. Thus, the average density of the sun is 1.41 g/cm^{3}!