Sums of Squares and Geometry


Sums of Squares and Geometry

Corey
Math can be a tease. In two and three dimensions, algebra and geometry keep handing ideas back and forth: a numerical condition becomes a shape we can picture, and the shape can make the numerical facts easier to understand.

Maria
The unit circle is a perfect example. The points on a circle of radius one centered at the origin are exactly the pairs of numbers x and y that satisfy x squared plus y squared equals one.

Corey
That connection has a lot of reach. Sums of squares and circles or spheres show up in ways that link geometry to number theory, Pythagorean triples, and even topological arguments like the Borsuk-Ulam theorem.

Maria
But the visual shortcut starts to fail when the problem involves four numbers, ten numbers, or a hundred. We can use two- and three-dimensional analogies, but we can’t just look at a high-dimensional shape all at once.

Corey
So the goal today is a middle ground: a way to reason about higher-dimensional geometry that is still analytic, but gives us something concrete to picture. We’ll use sliders for coordinates and think of the squares of those coordinates as real estate.

Maria
Let’s define the object first. A four-dimensional unit sphere centered at the origin is the set of quadruplets x, y, z, and w for which x squared plus y squared plus z squared plus w squared equals one.

Corey
A projection of that sphere into three dimensions can be hard to interpret, and even if we get comfortable with it, the same kind of picture doesn’t scale naturally to five or six dimensions. Instead, imagine four number lines, one for each coordinate, each with a slider.

Maria
Every setting of those four sliders represents one point in four-dimensional space. The point is on the unit sphere exactly when the four squared coordinate values add up to one.

Corey
To understand the sliders, let’s start with the circle. Think of x squared as the real estate used by x and y squared as the real estate used by y. Together, they have one unit of real estate to share.

Maria
And real estate is cheap near zero but expensive farther away. If x starts at one and moves down to 0.9, its square falls from one to 0.81, so it gives up 0.19 units of real estate.

Corey
For y squared to gain that same 0.19, y has to move from zero to about 0.44. So x changes by only 0.1 while y changes by more than four times as much.

Maria
That’s the steep part of the circle near its rightmost point. A small change in x can allow a much bigger change in y because the real estate being given up and gained has different costs at those locations.

Corey
You can even mark each number line with ticks showing equal changes in squared value, say 0.05. As the sliders move around the circle, the trade-off between x squared and y squared looks like a piston dance: sliders move more slowly where real estate is expensive.

Maria
The real-estate language also keeps the units straight. Add up the squared coordinates to get the total real estate; take the square root, and you get the distance from the origin.

Corey
For a three-dimensional unit sphere, just add a z slider. Now x, y, and z share the same one unit of real estate.

Maria
If x is fixed at 0.5, it uses 0.25 units, leaving 0.75 for y and z to trade between them. Geometrically, fixing x at 0.5 slices the sphere with a plane, and the possible y and z values form a circle.

Corey
As x increases, less real estate remains for y and z, so that circular slice gets smaller. At x equals one, nothing is left for the other sliders: y and z must both be zero.

Maria
In higher dimensions, fixing one coordinate similarly leaves the others to share what remains. That’s the slider version of taking a slice, even when we can’t picture the whole shape.

Corey
There’s a famous puzzle that gives this method something to explain. In two dimensions, put four unit circles at the corners of a square that runs from negative one to one on each axis. They’re tangent to neighboring circles.

Maria
Now find the radius of the circle centered at the origin that just touches those corner circles. The distance from the origin to a corner, such as the point (1, 1), is the square root of two.

Corey
Subtract the corner circle’s radius of one, and the inner circle has radius square root of two minus one, about 0.414. Nothing about that seems especially surprising.

Maria
In three dimensions, use a cube with corners whose coordinates are all either one or negative one. Put a unit sphere at each of its eight corners. The distance from the origin to a corner like (1, 1, 1) is the square root of three.

Corey
So the inner sphere’s radius is square root of three minus one, about 0.73. The general distance rule is the same: square each coordinate, add the squares, and take the square root.

Maria
Now let’s revisit these examples using sliders. Focus on the circle centered at (1, negative one). Its real estate is measured from that center: x uses the square of its distance from one, and y uses the square of its distance from negative one.

Corey
The point on that circle closest to the origin is where x and y are equal. If you perturb away from that point, the changes that keep you on the corner circle make your distance from the origin increase.

Maria
Here’s the key idea for the higher-dimensional puzzle: that closest point is also where the corner circle touches the inner circle. So we can find the inner radius by examining that shared point, but measure its coordinates from the origin.

Corey
In two dimensions, both coordinates at the closest point are below 0.5. Each contributes less than 0.25 units of real estate measured from the origin, so the total is less than 0.5.

Maria
In three dimensions, the closest point on the corner sphere has all three coordinates equal, and each is a little beyond 0.5. From the corner, the three coordinates share one unit of real estate equally; from the origin, their total is less than 0.75.

Corey
That’s consistent with a fairly small inner sphere. But the balance changes in four dimensions. There are sixteen corner spheres, and we can focus on the one centered at (1, 1, 1, 1).

Maria
At its point closest to the origin, all four coordinates are 0.5. Each coordinate is 0.5 away from its corresponding corner coordinate, so each uses 0.25 units of real estate there. Four times 0.25 is exactly one.

Corey
And measured from the origin, those same four coordinates also contribute 0.25 each. Their total is one, so the inner sphere has radius one—the same radius as each corner sphere.

Maria
That result has a striking consequence. If all the real estate on that inner sphere goes to one coordinate, you reach a point like (1, 0, 0, 0), which lies on the boundary of the four-dimensional box.

Corey
In five dimensions, there are thirty-two corner spheres. At the closest point on the one centered at (1, 1, 1, 1, 1), the five coordinates equally share one unit of real estate measured from that corner.

Maria
Each coordinate is a little greater than 0.5. If all five were just 0.5, they’d contribute 0.25 each, for a total of 1.25—too much for the one unit they have to share.

Corey
But measured from the origin, those five coordinates contribute more than one unit in total. The inner radius is about 1.24, so the inner sphere can extend beyond the box along a coordinate axis.

Maria
A useful general calculation makes the pattern clear. In n dimensions, at the closest point on a corner unit sphere, all coordinates are equal. Each is one over the square root of n away from its corner value of one, so its coordinate value is one minus one over the square root of n.

Corey
The distance from the origin to that point is therefore the square root of n times that coordinate value: square root of n minus one. That’s the inner radius. It gives about 0.414 in two dimensions, 0.73 in three, one in four, and 1.24 in five.

Maria
Try ten dimensions. There are ten coordinates, and at the closest point on a corner sphere they all share the corner-centered unit of real estate equally. The same calculation gives an inner radius of about 2.16.

Corey
That’s more than twice the radius of the corner spheres. And since the ten-dimensional box’s faces are still only one unit from the origin along any single coordinate axis, this inner sphere extends beyond even the outer box that bounds the corner spheres.

Maria
That outer box runs from negative two to two along each coordinate, so its width is four. A sphere with radius about 2.16 has diameter greater than four, which is why it sticks outside that box.

Corey
The box’s face stays the same distance from the origin as dimensions increase, because reaching it only involves moving along one axis. But the corner point has a coordinate in every dimension, and all those squared coordinates add to its distance from the center.

Maria
That’s why the inner radius keeps growing without bound as the dimension increases. The proportion of the inner sphere that lies inside the box also decreases exponentially toward zero.

Corey
The purpose isn’t just to spring a surprising fact on us. The sliders give us a way to reason about it: watch what each coordinate can do, and keep track of how the shared squared values change.

Maria
It’s limited, of course. We’re like a bug on the surface of a shape: we can get a feel for local movements, not see the whole high-dimensional object at once. And this coordinate-based picture gives up the elegance of geometry without coordinates.

Corey
Still, treating a high-dimensional point as a literal list of numbers—and its squared coordinates as shared real estate—makes the topic less mysterious. It lets us think visually even when we can’t visualize the whole space.

Maria
So the next time a problem has ten coordinates, you don’t have to squeeze it into a picture of three-dimensional space. You can use the sliders, follow the real-estate exchange, and let that become your foothold for doing the math.

Ask anything
We've read this whole study set, so questions about it get the best answers.