This was just out of curiosity and now it seems like a nice way to prove that any vector’s unit circle

-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

Yes, and am bloody glad that I can use 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 .

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

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 . Note that this is just in the positive quadrant, but its symmetrical in all quadrants of the 2-D space considered here.

### Like this:

Like Loading...

*Related*

VanamaliJust 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 )

Makarand TapaswiPost authorYes, the graphs however are for the p-norm <= 1 (in the positive quadrant)

Aditya BheemaraoNice. blog’s picking speed and tech depth as well ๐

ShaileshCan you please tell me, how to get that output in Matlab?? I mean the commands

Pingback: On Distances… « The Technical Experience Page

Pingback: On Norms… | The Technical Experience Page

ChachaCan any one help me the matlab codes for plotting p-norms in three dimension for norm(ร)<=1

i.e

m=3

p=1-5

chachaThis 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!

Makarand TapaswiPost authorSo, 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

ChachaThank you but it could be good if you can help me the codes