I'm currently working with a computer science problem that requires me to build vectors that can return their own norms. Based on Wolfram Alpha's description, I think I have an idea of how this is accomplished for the simple $L^2$ norm ($\sqrt{a^2+b^2+c^2}$, and so on) required by the exercise, but I've no notion of what this is actually useful for or why I would want to find it, outside of it being required by the exercise.

Any insight is appreciated!

  • 1
    $\begingroup$ What do you mean by a vector "that can return its own norm"? The language of computer science is very mysterious to me... $\endgroup$ May 31, 2016 at 10:21
  • 1
    $\begingroup$ @goblin a vector is an object in a programming language, which knows its properties, like coordinates and norm... $\endgroup$
    – gt6989b
    May 31, 2016 at 18:30
  • $\begingroup$ Yeah, sorry @goblin, that was just meant to be background, it wasn't really pertinent to what I was actually asking. As gt6989b said, I was creating an object intended to hold vectors (using another 'array' object as a property of the vector object to hold individual vector 'x' values), which had the ability to access the vector it was storing, return it to various functions, and make various of computations on the vector, including conducting arithmetic with any vectors passed to it and computing and returning its own vector norm. I just didn't know what the norm was used for mathematically. $\endgroup$
    – Brad
    May 31, 2016 at 19:25
  • $\begingroup$ @Brad, hmmm okay. So you hand the "vector" the query "I want to know your norm" and it speaks back to you: "my norm is 2.87" type-thing? Or have I completely misunderstood you? By the way the whole object-oriented thing isn't widely understood by mathematicians (unless they have a background in programming), so maybe include a bit more explanation any time you want to include OOP language/concepts in a math question. $\endgroup$ Jun 1, 2016 at 4:03
  • $\begingroup$ @goblin there's not quite that much interface built in, but that's the basic idea. In the actual code you could do something like var myVector = new Vector([1, 2, 3]); console.log(myVector.norm());. console.log() is a method (like a function) that prints an argument passed to it to the 'console' interface the programmer uses. So, the myVector.norm() method accesses the array inside of myVector, computes the norm, and hands it to console.log to be printed out, resulting in something to the effect of 3.7416573867739413855837487323165 being printed to the console. $\endgroup$
    – Brad
    Jun 1, 2016 at 6:29

1 Answer 1


Norms are a measure of distance. One has different ways to define what is the distance between points in multiple dimensions, which collapse to the usual notion of the absolute value in 1D.

in particular, Euclidean distance is defined by the 2-norm, $$ \left\| \begin{pmatrix} x_1 \\ \vdots \\ x_k \end{pmatrix} \right\|_2 = \sqrt{\sum_{i=1}^k x_i^2} $$

There are others, of which the 1-norm $$ \left\| \begin{pmatrix} x_1 \\ \vdots \\ x_k \end{pmatrix} \right\|_1 = \sum_{i=1}^k \left|x_i\right| $$ and the infinity norm $$ \left\| \begin{pmatrix} x_1 \\ \vdots \\ x_k \end{pmatrix} \right\|_\infty = \max_{1 \le i \le k} \left\{|x_i|\right\} $$ are the most useful.

You are welcome to read up more on Wikipedia, lecture notes.

  • $\begingroup$ Thank you! Yes, I did look at the Wikipedia link, but it was a bit over my head at this point. I appreciate you distilling it so well! Having looked at the Wikipedia again after reading your explanation, it makes quite a bit more sense. $\endgroup$
    – Brad
    May 31, 2016 at 2:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .