Number Line: Dimensional Slicing and the Geometry of Difference of Powers
How does a one-dimensional number line enable the geometric visualization of higher dimensions and the factorization of b^n - a^n?
How this lesson unfolds.
Begin with How can a one-dimensional line axis let us slice and calculate the leftover volume of a four-dimensional hypercube? The sequence then connects Spreading Out in 3D: The Geometric Anatomy of b^3 - a^3 and builds toward Inductive Slicing: Generalizing to n Dimensions.
How can a one-dimensional line axis let us slice and calculate the leftover volume of a four-dimensional hypercube?
We cannot directly draw four spatial axes at right angles in our 3D world, but we can treat the 4th dimension as a continuous parameter line. Slicing along this line converts a 4D hypercube difference b⁴ - a⁴ into a weighted sum of 3D cross-sections: an untouched 3D cube b³ across interval (b - a), and a hollowed 3D block (b³ - a³) across interval a.
- $$b^4 - a^4 = (b - a)b^3 + a(b^3 - a^3) = (b - a)(b^3 + b^2a + ba^2 + a^3)$$
- $$Treating the fourth dimension as a 1D line of length b orthogonal to a 3D volume b^3 partitions the 4D hypercube into two distinct regions: an untouched slab of length (b - a) with volume b^3, and a hollowed segment of length a with volume b^3 - a^3.$$
- Learning goalDeconstruct 4D hypercube volume differences into coordinate intervals and cross-sections geometrically.
- Helpful foundationsCartesian coordinates · volume formulas · difference of cubes · Introduction to Mathematical Thinking (Keith Devlin, Stanford) · Essence of Linear Algebra (3Blue1Brown)
- Common trapAssuming 4D shapes cannot be visualized; orthogonal slicing reduces n-dimensional geometry to 1D slices.
- Next connectionExamine how 3D volume differences decompose into three uniform-thickness rectangular blocks.
More context & mechanics
Consider a 4D hypercube of edge length b, whose total 4D hyper-volume is b⁴. Imagine one edge running along a 1D coordinate axis of total length b. At every point along this axis, the orthogonal 3D cross-section is a solid cube with volume b³.
Now remove an inner 4D hypercube of edge length a, with hyper-volume a⁴, positioned along the interval [0, a]. Along this segment of length a, we subtract a 3D cube of volume a³ from each cross-section.
The remaining 4D volume splits naturally into two regions along the 1D axis:
- Outside the interval ([a, b] of length b - a): The 3D cross-sections are completely intact, each with volume b³. The hyper-volume contribution is (b - a)b³.
- Inside the interval ([0, a] of length a): Each 3D cross-section has had an a³ cube removed, leaving volume (b³ - a³). The hyper-volume contribution is a(b³ - a³).
Substituting the 3D identity b³ - a³ = (b - a)(b² + ab + a²) into the second term gives:
b⁴ - a⁴ = (b - a)b³ + a(b³ - a³) = (b - a)b³ + a(b - a)(b² + ab + a²) = (b - a)(b³ + b²a + ba² + a³)
The number line acts as the dimensional spine that makes 4D subtraction visually transparent.
In machine learning and neural network loss landscapes, parameters live in thousands or millions of dimensions (R^D). High-dimensional volume analysis, known as the "Curse of Dimensionality," relies on dimensional decomposition where the volume of thin shells or hypercube boundaries is calculated by factoring b^D - a^D. Slicing along single coordinate dimensions is also the operational backbone of Gibbs sampling in probabilistic AI and ray marching through 4D spacetime tensors in Neural Radiance Fields (NeRFs).
René Descartes formalized the coordinate line in 1637 (La Géométrie), bridging synthetic Greek geometry with algebra. In the mid-19th century, Ludwig Schläfli and Bernhard Riemann extended Cartesian axes to n dimensions. Schläfli showed that higher-dimensional polytopes could be analyzed recursively by taking parallel hyperplane cross-sections along a one-dimensional coordinate axis.
The Sliced Sausage Rule: If you core out a narrow cylinder from only part of a sausage, the remaining meat is:
Full cross-section × untouched length + Cored cross-section × cored length
Every step up in dimension simply factors out the common wall thickness (b - a).
When an a³ cube is carved out of a b³ cube, how do the leftover pieces naturally unfold into three rectangular blocks of uniform thickness?
Algebraic factoring is not arbitrary symbol manipulation; it is literal physical geometry. The term (b - a) represents the common thickness of three slabs sliced along the three orthogonal axes of the original 3D cube. Factoring out (b - a) reveals the cross-sectional bases: a full square b², a transitional rectangle ab, and a contracted square a².
- $$b^3 - a^3 = (b - a)b^2 + (b - a)ab + (b - a)a^2 = (b - a)(b^2 + ab + a^2)$$
- $$Removing an a^3 cube from a b^3 cube leaves an L-shaped solid that partitions cleanly into three non-overlapping rectangular blocks, each sharing the exact same thickness (b - a) with base areas b^2, ab, and a^2.$$
- Learning goalDissect algebraic identity b³ - a³ into three orthogonal blocks with uniform thickness.
- Helpful foundationsvolume of rectangular cuboids · polynomial expansion · difference of squares · Introduction to Mathematical Thinking (Keith Devlin, Stanford) · Essence of Linear Algebra (3Blue1Brown)
- Common trapEquating (b - a)³ with b³ - a³; the difference partitions into three disjoint slabs.
- Next connectionExtend recursive orthogonal slicing from 3D to general n-dimensional space.
More context & mechanics
Start with a solid cube of edge b and volume b³. Place it at the origin and cut out an inner cube of edge a and volume a³ from one corner. The remaining volume is b³ - a³.
Instead of an awkward hollow shape, slice the remaining material along two planar cuts aligned with the inner cube faces:
- Block 1 (Top slab): Height (b - a), width b, depth b. Volume = (b - a)b².
- Block 2 (Side beam): Height a, width (b - a), depth b. Volume = ab(b - a).
- Block 3 (Corner pillar): Height a, width a, depth (b - a). Volume = a²(b - a).
All three blocks share the identical dimension (b - a) along one axis. When factored out:
b³ - a³ = (b - a)b² + (b - a)ab + (b - a)a² = (b - a)(b² + ab + a²)
The terms inside the second bracket are the surface areas of the three slabs on which the thickness (b - a) rests.
In Constructive Solid Geometry (CSG) and 3D computer graphics engines (such as Blender, Unreal Engine, and CAD software like SolidWorks), Boolean difference operations (A \setminus B) decompose mesh boundaries into non-overlapping convex bounding volumes (axis-aligned bounding boxes, or AABBs). The exact three-slab decomposition derived here is the canonical algorithm used to triangulate the boundary of an excavated cuboid without overlapping faces.
The geometric difference of cubes was known to Islamic mathematicians of the 10th century, notably Al-Karaji and Ibn al-Haytham (Alhazen), who used physical block dissection to solve cubic equations before the emergence of symbolic notation. François Viète in the 16th century later translated these physical dissections into symbolic polynomial identities.
The SOAP Rule with Dimensional Degeneration:
The signs are Same, Opposite, Always Positive: (b - a)(b² + ab + a²).
Notice the powers of b step down while powers of a step up: b² a⁰ → b¹ a¹ → b⁰ a². Each term retains total degree 2, because thickness (b - a) supplies the 1st degree to make degree 3!
How does adding one number line at a time unlock the universal factoring identity for b^n - a^n across all dimensions?
A number line is a 1D universe. Adding a second line creates a 2D plane (b² - a²). A third line sweeps the plane into 3D space (b³ - a³). An n-th line sweeps an (n - 1)-dimensional hypercube into n dimensions. Because every dimension introduces an orthogonal axis of length b hollowed across length a, the remaining hypervolume is always partitioned into n disjoint hyper-slabs, each having thickness (b - a) and hyper-base b^(n-1-k) a^k.
- $$b^n - a^n = (b - a) \sum_{k=0}^{n-1} b^{n-1-k} a^k = (b - a)(b^{n-1} + b^{n-2}a + \dots + a^{n-1})$$
- Learning goalGeneralize geometric slicing to n dimensions, unifying difference of powers with differentiation.
- Helpful foundationsmathematical induction · 3D cuboid slicing · power rule differentiation · Introduction to Mathematical Thinking (Keith Devlin, Stanford) · Essence of Linear Algebra (3Blue1Brown)
- Common trapTreating b^n - a^n as symbolic algebra; it partitions an n-dimensional boundary into disjoint hyper-slabs.
- Next connectionTransition to discrete summations and sigma notation across active boundaries.
More context & mechanics
By induction across dimensions:
- 1D: A segment of length b minus length a is (b - a).
- 2D (Square): An area b² - a² decomposes into 2 strips of thickness (b - a): (b - a)(b + a) = (b - a)b + (b - a)a.
- 3D (Cube): A volume b³ - a³ decomposes into 3 slabs of thickness (b - a): (b - a)(b² + ab + a²).
- 4D (Tesseract): A hyper-volume b⁴ - a⁴ decomposes into 4 hyper-slabs of thickness (b - a): (b - a)(b³ + b²a + ba² + a³).
In general n-dimensional Euclidean space R^n, an n-cube of edge b contains n orthogonal coordinates x₁, x₂, ṡ, xₙ. When an inner n-cube of edge a is removed, the remaining set decomposes into n disjoint rectangular hyper-prisms along coordinate cuts:
b^n - a^n = (b - a) ∑_(k=0)^(n-1) b^(n-1-k) a^k = (b - a)(b^(n-1) + b^(n-2)a + b^(n-3)a² + ṡ + a^(n-1))
Every single term in the expansion corresponds to exactly one hyper-slab with edge length (b - a) along the k-th coordinate axis, length b along unconstrained axes, and length a along previously hollowed axes.
This geometric identity is the foundational engine of calculus: evaluating the derivative of f(x) = x^n requires taking lim_(x → a) (x^n - a^n) / (x - a) = lim_(x → a) (x^(n-1) + x^(n-2)a + ṡ + a^(n-1)) = n a^(n-1). In deep learning, this exact derivative powers backpropagation for polynomial activations, geometric loss regularizers, and high-dimensional isotropic Gaussian integrals.
John Wallis in his 1656 treatise Arithmetica Infinitorum used the expansion of differences of powers to compute the quadrature (area) under polynomial curves y = x^n before Newton and Leibniz invented formal calculus. Wallis recognized that the sum of terms represented discrete geometric increments along number lines.
The Energy Conservation Rule:
The total degree must always equal n. The common factor (b - a) carries degree 1, which forces the second factor to carry degree n - 1 across all n symmetric permutations: b loses one exponent at each step, while a gains one, preserving constant total degree n - 1.