 # Unit Balls for Different p-Norms in 2D and 3D

Initializing live version Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration shows the set of points within distance 1 from the origin in 2D and in 3D. The distance is measured using different -norms, which are standard norms for finite-dimensional spaces. This set of points is called the unit ball.

Contributed by: Aaron T. Becker and Ravi Patel (January 2021)
Open content licensed under CC BY-NC-SA

## Snapshots   ## Details

In mathematics, a norm is the length (or size) of a vector. A -norm is a norm on a finite-dimensional space of dimension defined as .

This Demonstration shows sets of unit-norm vectors for different -norms.

The norm for is the sum of the distances a 3D computer numerical control (CNC) mill would have to move in the , and directions. In 3D the unit ball is an octahedron, and in 2D it is a square with corners at ; .

The norm for  is the usual Euclidean square norm obtained using the Pythagorean theorem. In 3D the unit ball is a sphere, and in 2D it is a circle with radius 1; .

The norm for is simply the maximum over , and . This is proportional to the time a CNC mill would take to reach a goal if all axes can move simultaneously with the same top speed. In 3D the unit ball is a unit cube, and in 2D it is a square with corners at ; .

The norms for are uncommon, but represent where there is a penalty for moving in more than one cardinal direction. This often occurs when trying to accomplish multiple objectives with a fixed budget. For example, flying cars have existed since 1935, but car-airplane hybrids are usually both poorly performing automobiles and ungainly fliers. In 3D and 2D the unit balls are star shapes with points along the coordinate axes. The following metric might represent these tradeoffs if represents ability as a car, ability as an airplane and ability as a boat; .

In 2D, this Demonstration shows the norm functions as orange 3D shapes filled with blue water up to distance 1 from the origin. When this is viewed from above, the area filled with water is the 2D unit ball.

In 3D, this Demonstration shows unit balls for the selected norm value. The unit ball is distance 1 from the origin, according to the selected -norm.

The built-in Wolfram Language function Norm can be used to build similar plots, but it requires that .

For vectors, Norm[v,p] is Total[Abs[v]^p]^(1/p).

For vectors, Norm[v,Infinity] is the \[Hyphen]norm given by Max[Abs[v]].

## Permanent Citation

Aaron T. Becker and Ravi Patel

 Feedback (field required) Email (field required) Name Occupation Organization Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback. Send