p-Norm and Unit Circle Pics

This was just out of curiosity and now it seems like a nice way to prove that any vector’s unit circle \infty-norm is a square, which is nothing but the maximum of all the scalars in that vector.

Well, this is mainly because am undergoing a course on Matrix Algebra right now, and wanted to experiment using Matlab somehow! ๐Ÿ™‚ So, a norm or more generally the p-norm for a vector is basically

\|x\|_p = (|x_1|^p + |x_2|^p + ... + |x_N|^p)^{1/p}

Yes, and am bloody glad that I can use \LaTeX code in WordPress ๐Ÿ™‚ So nice of them. Here’s how its done. Just insert the lines $ latex \|x\|_p = (|x_1|^p + |x_2|^p + ... + |x_N|^p)^{1/p}$ in your required section. No space is to be put between $ and latex, I couldn’t show without it though as it was converting to \LaTeX.

Anyways, so to find the unit circle (only 1 quadrant) I just did a scatter plot of the random number vectors whose norm was less than 1, and it looks like this.

Unit Circles of Norm - Matlab Simulations

Unit Circles of Norm - Matlab Simulations

This will let you know that the unit-circle went from a triangle like shape, to circle and then is bulging towards the (1,1) point. It reaches this only at \infty. Note that this is just in the positive quadrant, but its symmetrical in all quadrants of the 2-D space considered here.

Advertisements

10 thoughts on “p-Norm and Unit Circle Pics

  1. Vanamali

    Just to add : The unit circle of p-norm, is the set of all vectors with their p-norm =1 ( in this case, the vectors refer to points in R^2 )

    Reply
  2. Pingback: On Distances… « The Technical Experience Page

  3. Pingback: On Norms… | The Technical Experience Page

  4. chacha

    This site is very useful but i would like to know the matlab codes for geneting p_norms.
    for m=3 and p=12,3,4,5 and infinity
    Given norm(ร—)<=1
    Thanks in advance!

    Reply
    1. Makarand Tapaswi Post author

      So, to generate those blue plots, I basically created 2 random numbers in the 0-1 range, and if their norm was < 1, I plotted them. You can use plot3, or scatter and basically generate 3 random numbers. It might take a while to get a solid ball. On the other hand, you could also just linearly sweep from -1 to 1 with a small grid and plot if norm < 1. Hope this helps

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s