# Norm (mathematics)

In mathematics, the norm of a vector is its length. A vector is a mathematical object that has a size, called the magnitude, and a direction. For the real numbers, the only norm is the absolute value. For spaces with more dimensions, the norm can be any function $p$ with the following three properties:

1. Scales for real numbers $a$ , that is, $p(ax)=|a|p(x)$ .
2. Function of sum is less than sum of functions, that is, $p(x+y)\leq p(x)+p(y)$ (also known as the triangle inequality).
3. $p(x)=0$ if and only if $x=0$ .

## Definition

For a vector $x$ , the associated norm is written as $||x||_{p}$ , or L$p$ where $p$ is some value. The value of the norm of $x$ with some length $N$ is as follows:

$||x||_{p}={\sqrt[{p}]{x_{1}^{p}+x_{2}^{p}+...+x_{N}^{p}}}$ The most common usage of this is the Euclidean norm, also called the standard distance formula.

## Examples

1. The one-norm is the sum of absolute values: $\|x\|_{1}=|x_{1}|+|x_{2}|+...+|x_{N}|.$ This is like finding the distance from one place on a grid to another by summing together the distances in all directions the grid goes; see Manhattan Distance.
2. Euclidean norm (also called L2-norm) is the sum of the squares of the values: $\|x\|_{2}={\sqrt {x_{1}^{2}+x_{2}^{2}+...+x_{N}^{2}}}$ 3. Maximum norm is the maximum absolute value: $\|x\|_{\infty }=\max(|x_{1}|,|x_{2}|,...,|x_{N}|)$ 4. When applied to matrices, the Euclidean norm is referred to as the Frobenius norm.
5. L0 norm is the number of non-zero elements present in a vector.