LINEAR ALGEBRA (Part-6) - Norms

LINEAR ALGEBRA (Part-6)

Norms

Norms

Norm is used to measure the size/length/magnitude/distance of a vector.
Like for example we know the Normal distance between two points x1=2 and x2=4 is x2-x1=4-2=2
Another example is the Euclidean distance between two points x1=2 and x2=4 is √(4-2)2=2
In general Norm is written by LP norm = ||x||p = (∑|xi|p)1/p Where p = 1 or 2

L1 Norm

The L1 norm is calculated as the sum of the absolute vector values.
Let's put 1 in the above general norm equation. Here p=1 as L1 Norm.
||x||p = (∑|xi|p)1/p
||x||1 = (∑|xi|1)1/1
||x||1 = ∑|xi|
So it is just the sum of the absolute vector values.
consider vector v = [1 -2 6]
||v||1 = |1| + |-2| + |6| = 1+2+6 = 9

L2 Norm

It is also called Euclidean norm.
The L2 norm is calculated as root over of the sum of the squared vector values.
Let's put 2 in the above general norm equation. Here p=2 as L2 Norm.
||x||p = (∑|xi|p)1/p
||x||2 = (∑|xi|2)1/2
1/2 is equal to root over "√".
||x||2 = √∑|xi|2
So it is just root over of the sum of the squared vector values.
consider vector v = [1 -2 6]
||v||2 = √ ( 12 + (-2)2 + 62 ) = √(1+4+36) = √41 = 6.403
L2 Norm is used so frequently that it is normally written as ||x||
L2 Norm can also be calculated by √xxT
√xxT = √ ( [1 -2 6] . [1 -2 6]T ) = √ ( (1X1) + (-2X-2) + (6X6) )
√xxT = √(1+4+36) = √41 = 6.403

Max Norm

It is represented as L
The max norm is calculated as returning the maximum value of the vector.
consider vector v = [1 -2 6] Then, L = max(v) = 6

Frobenius norm

It is the same as L2 Norm.

SOURCE

1) Deep Learning (Ian Goodfellow, Yoshua Bengio, Aaron Courville)

2) https://machinelearningmastery.com/vector-norms-machine-learning

মন্তব্যসমূহ

এই ব্লগটি থেকে জনপ্রিয় পোস্টগুলি

LINEAR ALGEBRA (Part-2) - Multiplying Matrices

What Is derivative? (Part - 1)

LINEAR ALGEBRA (Part-1) - Scalars, Vectors, Matrices and Tensors