1 · Dimensions and Coordinates
Chapter 1

Dimensions and Coordinates

How many numbers does it take to describe something?

Think about making an appointment with a friend. To meet, you need to agree on both where and when. If I wanted to direct you to my apartment, I would need to give you not only the two street intersections (two numbers, specifying a point on the Earth's surface) but also the floor I live on (the height above the surface).

(1st Street,3rd Avenue,4th Floor)

The space around us is three-dimensional because three numbers are needed to describe a location in it. But the space-time we live in is four-dimensional because if we wanted to meet for lunch, I would need to give you four numbers: my position in space and when to meet. Otherwise, we might miss each other, with you thinking lunch is at 11 and me thinking noon.

(1st Street,3rd Avenue,4th Floor,12pm)

Definition 1.1 (Dimension). The dimension of a space is the minimum number of numbers needed to fully specify a point in it.

Thus, there are direct physical reasons to consider calculus in two, three, and four dimensions. Our best physical theories of the world at human scales, such as classical mechanics, are written in this language. Understanding weather, planetary motion, fluid flow, and black holes requires a solid grounding in multivariable calculus. But since the real world is only four-dimensional, does that mean there is no need for calculus in 7-, 13-, or 132,234,453-dimensional space?

1.1Describing Objects with Numbers

All the spaces we have discussed so far represent physical space, but mathematics allows us to be much more general than this. Imagine you are designing a tin can, and you want to start by thinking of the space of possibilities: what are all the possible shapes of a cylindrical can? Since such a can is fully determined by its radius and height, we can think of these as two coordinates and express a particular can by an ordered pair (𝑟,). Thus, the space of possible cans is two-dimensional!

Figure 1.1 Every point of the shaded rectangle is a different can. Drag the point, or move the sliders, and watch a single pair of numbers (𝑟,) pick out one shape from the whole family.

What about the space of 𝐿-shaped desks? What is the dimension of this space? Try to count how many measurements are needed to specify one desk before changing the sliders below.

Figure 1.2 An 𝐿-shaped desk is determined by the length and width of each of its two sides, together with its height. Each desk is one point (1,2,𝑤1,𝑤2,) in a five-dimensional space of possibilities.

But where really mind-blowing numbers of dimensions begin to arise is in the study of data. Imagine you are modeling the conditions in the San Francisco Bay, and you take a measurement of the sea height for every square kilometer. The bay has an area of about 4,000 square kilometers, so this means your data point has 4,000 numbers in it! Your approximation to the bay's surface is a point in four-thousand-dimensional space!

Or, consider an image taken by a digital camera: for simplicity assume the image is in black and white and has 10 megapixels. This means each pixel is determined by a single number (how light or dark the pixel is), and the image has 10 million pixels, so it is encoded by 10 million numbers! That means even simple images are worked with mathematically as points in spaces with millions of dimensions.

The small image below works the same way. Paint on it and then unroll it to see the list of numbers hidden inside.

Figure 1.3 Each pixel contributes one number between 0 and 1. Raising the resolution makes the list longer without changing the basic idea: one complete image is one point in a high-dimensional space.

1.2Dimension, Tuples, and Coordinates

Every example above follows the same pattern. Once we decide which independent numbers completely describe an object, the number of them tells us the dimension of its space. To write these numbers down, we use an 𝑛-tuple.

Definition 1.2 ($n$-Tuple). An 𝑛-tuple of real numbers is an ordered list of 𝑛 real numbers. For example, a 2-tuple like (3,7) is often called an ordered pair.

Tuples are sometimes written horizontally and sometimes vertically, depending on convenience. Various styles of brackets are used depending on the author and the purpose. In these notes, points will usually be written horizontally with round brackets.

Just as numbers represent locations on the line, tuples can be used to represent locations in a space. When we use them as such, we call the entire 𝑛-tuple a point, and we call each of its entries a coordinate.

Definition 1.3 (Point). A point is an 𝑛-tuple when it is being used to represent a location in a space. Each entry of the tuple is called a coordinate of the point.

Here, a location need not be a physical location. The point (𝑟,) locates one can in the space of possible cans, and a list of pixel values locates one image in the space of possible images.

You are already familiar with this from single-variable calculus, where we use ordered pairs (𝑥,𝑦) to represent points of the two-dimensional plane 2. By extension, we can use 3-tuples (𝑥,𝑦,𝑧) to represent points in the physical space around us. But what about even larger tuples, such as the 7-tuple (1,2,3,4,5,6,7)? What kind of space does this represent a point in? This is a point in a seven-dimensional space!

Counting the dimension of a space can be subtler than counting the number of coordinates in the space around it. A plane is two-dimensional, but so is the surface of a sphere: if your friend called you and gave you two numbers---their latitude and longitude---you could precisely locate them on the Earth's surface.

(37.7749N,122.4194W)
Figure 1.4 Two numbers locate a point on the globe. Three Cartesian coordinates are needed only to say where that point lies in the space surrounding the globe. Drag the point on either the flat chart or the sphere and watch both descriptions change together.

Thus, the surface of the sphere is two-dimensional even though it sits inside three-dimensional space. We call two the intrinsic dimension of the surface and three the dimension of its ambient space. The dimension of an object and the dimension of the space it sits inside are two different questions!

1.3Cartesian Coordinates

What do the actual numbers in an 𝑛-tuple mean? In the examples above, we have been using interpretations such as left-right, back-forth, and up-down, or length-width-height. For physical space, these are examples of Cartesian coordinates, named after the mathematician and philosopher René Descartes. While this sort of thinking comes from physical space, it is useful for giving a concrete picture even of nonphysical spaces, such as the space of soup cans or the space of images.

Definition 1.4 (Cartesian Coordinates). Cartesian coordinates start by choosing 𝑛 mutually perpendicular lines in 𝑛-dimensional space: for example, the 𝑥- and 𝑦-axes in the plane, or the 𝑥-, 𝑦-, and 𝑧-axes in 3. A point in space is given coordinates (𝑎,𝑏,𝑐) if it lies a signed distance 𝑎 along the first axis, 𝑏 along the second, and 𝑐 along the third.

Here is an animation showing a point in three-dimensional space and how its three coordinates locate it. Try making one of the coordinates negative: the corresponding part of the walk simply reverses direction.

Figure 1.5 To reach (𝑎,𝑏,𝑐), travel 𝑎 units along the 𝑥-axis, then 𝑏 units parallel to the 𝑦-axis, and finally 𝑐 units parallel to the 𝑧-axis.

We can also use Cartesian coordinates to describe simple pieces of space, such as coordinate axes and planes. In 2, the 𝑥-axis is the set of points (𝑥,0): that is, every point on the 𝑥-axis has 𝑦-coordinate equal to zero.

Definition 1.5 (Coordinate Axes and Planes). The 𝑥-axis in the plane is given by the equation 𝑦 =0, and the 𝑦-axis by the equation 𝑥 =0. Similarly, in 3, the 𝑥𝑦-plane is given by 𝑧 =0, the 𝑦𝑧-plane by 𝑥 =0, and the 𝑥𝑧-plane by 𝑦 =0.

A point can be projected onto a coordinate plane by setting the coordinate perpendicular to that plane equal to zero. It can be projected onto a coordinate axis by setting all the other coordinates equal to zero. The resulting point is the closest point on that plane or line to the original point.

For example, projecting (2, 1,3) onto the 𝑥𝑦-plane gives (2, 1,0). What are its projections onto the other two coordinate planes? Use the toggles in the figure to check your answers.

Figure 1.6 Setting one coordinate equal to zero drops the point perpendicularly onto the corresponding coordinate plane. The length of the dashed segment is the distance from the point to that plane.

Cartesian coordinates are not the only possible interpretation of an 𝑛-tuple. Coordinates built from distances and angles often make circular or spherical shapes easier to describe. We will introduce these other coordinate systems later, when we have a problem for which they are useful.

1.4Distance in Higher Dimensions

Perhaps the most famous theorem of geometry is the Pythagorean theorem, which tells us how to compute distance in Cartesian coordinates on the plane.

Theorem 1.6 (The Pythagorean Theorem). The distance of the point (𝑎,𝑏) from the point (0,0) in the plane is

dist=𝑎2+𝑏2.

Once we know this theorem is true in 2 (thanks, Pythagoras!), we can use the same idea to extend it to higher dimensions. In three dimensions, first apply the theorem to the triangle on the floor. This gives a horizontal distance 𝑥2+𝑦2. Then use that distance and the vertical height 𝑧 as the legs of a second right triangle.

Figure 1.7 The three-dimensional distance formula is the Pythagorean theorem applied twice. Show the floor and standing triangles separately to see the two steps of the argument.

The second application gives

dist=(𝑥2+𝑦2)2+𝑧2=𝑥2+𝑦2+𝑧2.

Nothing about this argument depends on stopping after three coordinates.

Theorem 1.7 (Distance in $\RR^n$). In 3, the distance of (𝑥,𝑦,𝑧) from the origin is

dist=𝑥2+𝑦2+𝑧2.

In general, if (𝑥1,,𝑥𝑛) is a point in 𝑛, its distance from the origin is

dist=𝑛𝑖=1𝑥2𝑖.

For example, the point (2, 3,6) lies

22+(3)2+62=49=7

units from the origin. Notice that negative coordinates cause no trouble: they record direction along an axis, while distance records how far we traveled.

1.5Spheres, Balls, and Hyperspheres

Given this description of distance, we can give a precise description of circles and spheres: a circle is the set of points which are all a fixed distance (the radius) from a fixed point (the center). The unit circle is the set of points distance 1 from the origin. Similarly, the unit sphere is the set of points distance 1 from the origin in three-dimensional space.

In more generality, we can define a hypersphere in any higher dimension the same way: by taking the set of points which are a fixed distance from the origin in that space!

Definition 1.8 (Spheres and Hyperspheres). The unit circle (also called the unit 1-sphere) is the set of points in 2 given by

𝑥2+𝑦2=1.

The unit sphere (also called the unit 2-sphere) is the set of points in 3 satisfying

𝑥2+𝑦2+𝑧2=1.

The unit 3-sphere is the set of points in four-dimensional space satisfying

𝑥2+𝑦2+𝑧2+𝑤2=1,

and the pattern continues in every dimension.

Exercise 1.9. Why is the circle called a 1-sphere, and the sphere in three-dimensional space called a 2-sphere?

A sphere consists only of the points exactly a fixed distance from its center. The ball it bounds also includes all the points inside it. Thus the unit ball in 𝑛 is described by

𝑥21+𝑥22++𝑥2𝑛1,

whereas its boundary, the unit hypersphere, is described by equality.

We cannot draw a four-dimensional ball, but we can learn about it by slicing. If we fix its last coordinate to be 𝑡, the remaining coordinates satisfy

𝑥21++𝑥2𝑛11𝑡2.

This is a ball one dimension lower, with radius 1𝑡2. The same calculation describes every case in the animation below.

Figure 1.8 Slicing a disk gives a segment, slicing a three-dimensional ball gives a disk, and slicing a four-dimensional ball gives a three-dimensional ball. In every case, the slice at height 𝑡 has radius 1𝑡2.

There is one more surprise waiting in higher dimensions. We do not yet have the integration machinery needed to derive the volume of a ball in arbitrary dimensions, but we can still look at the answer. One might expect the volume of the unit ball to grow as dimensions are added. Instead, it reaches a maximum in dimension five and then shrinks toward zero!

Figure 1.9 The volume of the unit ball is largest in five dimensions. Compared with the box [ 1,1]𝑛 surrounding it, the ball also occupies a smaller and smaller fraction as the dimension increases.

So far, we have only computed the distance from a point to the origin. To find the distance between two arbitrary points, we need to describe the displacement from one to the other. This is our first job in the next chapter, where we turn from points to vectors.