Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Number System and Arithmetic
  • Algebra
  • Set Theory
  • Probability
  • Statistics
  • Geometry
  • Calculus
  • Logarithms
  • Mensuration
  • Matrices
  • Trigonometry
  • Mathematics
Open In App
Next Article:
Vector Norms
Next article icon

Vector Norms

Last Updated : 06 Dec, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

A vector norm, sometimes represented with a double bar as ∥x∥, is a function that assigns a non-negative length or size to a vector x in n-dimensional space. Norms are essential in mathematics and machine learning for measuring vector magnitudes and calculating distances.

A vector norm satisfies three properties:

  • Non-negativity: ∣x∣ > 0| if x ≠ 0, and ∣x∣=0 if and only if x = 0.
  • Scalar Multiplication: ∣kx∣ = ∣k∣ ⋅ ∣x∣ for any scalar k.
  • Triangle Inequality: ∣x + y∣ ≤ ∣x∣ + ∣y∣.

Types of Vector Norms

The vector norm ∣x∣p, also known as the p-norm, for p = 1, 2,… is defined as:

| \mathbf{x} |_p = \left( \sum_{i=1}^{n} | x_i |^p \right)^{\frac{1}{p}}

This general formula encompasses several specific norms that are commonly used.

Commonly used norms are:

  • L1 Norm
  • L2 Norm
  • L∞ Norm

Let's discuss these in detail.

L1 Norm

The L1 norm, also known as the Manhattan norm or Taxicab norm, is a way to measure the "length" or "magnitude" of a vector by summing the absolute values of its components.

Mathematically, for a vector x = [x1, x2, . . ., xn], the L1 norm ∣x∣1​ is defined as:

∣x∣1 = ∣x1∣ + ∣x2∣ + ∣x3∣ + ... + ∣xn∣

Example: If x = [3, −4, 2], then the L1 norm is:

∣x∣1 ​= ∣3∣ + ∣−4∣ + ∣2∣ = 3 + 4 + 2 = 9

L2 Norm

The L2 norm, also known as the Euclidean norm, is a measure of the "length" or "magnitude" of a vector, calculated as the square root of the sum of the squares of its components.

For a vector x = [x1, x2, . . ., xn], the L2 norm ∣x∣2​ is defined as:

| \mathbf{x} |_2 = \sqrt{x_1^2 + x_2^2 + \dots + x_n^2}

Example: If x = [3, −4, 2], then the L2 norm is:

| \mathbf{x} |_2 = \sqrt{3^2 + (-4)^2 + 2^2}
= \sqrt{9 + 16 + 4}
=√29 ≈ 5.39

L∞ norm

The L∞ norm, also known as the Infinity norm or Max norm, measures the "size" of a vector by taking the largest absolute value among its components. Unlike the L1 and L2 norms, which consider the combined contribution of all components, the L∞ norm focuses solely on the component with the maximum magnitude.

For a vector x = [x1, x2, . . ., xn], the L∞ norm ∣x∣∞​ is defined as:

∣x∣∞ ​= max​∣xi​∣ where 1 ≤ i ≤ n

Example: If x = [3, −4, 2], then the L∞ norm is:

∣x∣∞​= max(∣3∣, ∣−4∣, ∣2∣) = 4

Read More,

  • Vector Space
  • Linear Algebra

Next Article
Vector Norms

S

surajb1g23
Improve
Article Tags :
  • Mathematics
  • Maths
  • Vector-Calculus

Similar Reads

    Vectors in Maths
    In mathematics, vectors are fundamental objects that represent quantities with both magnitude and direction. They are widely used in various branches of mathematics, physics, engineering, computer science, and other disciplines.Key Features of Vectors:1. Magnitude: The size or length of the vector.
    8 min read
    Unit Vector
    Unit Vector: Vector quantities are physical quantities that have both magnitude and direction. We define them using their initial point and final point. Unit vectors are the vectors that have a magnitude of 1. For example \vec A    = 2i + 3j is not a unit vector as its magnitude is,|A| = √(22 + 32)
    11 min read
    Types of Vectors
    Vector is a physical quantity that has both direction and magnitude, it is a quantity that not only tells us about its strength but also gives us details about the direction in which it is acting upon. There are various types of vectors based on different parameters like their direction, magnitude,
    9 min read
    Collinear Vectors
    Vectors are also called Euclidean vectors or Spatial vectors, and they have many applications in mathematics, physics, engineering, and various other fields. There are different types of vectors, including zero vectors (which have 0 magnitude and no direction), unit vectors (which have a magnitude o
    7 min read
    Properties of Vectors
    Vectors are one of the most important concepts in mathematics. Vectors are quantities that have both magnitude and direction. A vector quantity is represented by an arrow above its head.For example a vector \overrightarrow{A} where A or |A| represents the magnitude of the vectors.Vectors are used to
    11 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences