• Home
  • Categories
  • Tags
  • Pricing
  • Submit
    Decorative pattern
    1. Home
    2. Concepts & Definitions
    3. Manhattan Distance

    Manhattan Distance

    Vector distance metric calculating the sum of absolute differences between vector components. Measures grid-like distance and is robust to outliers, with faster calculation as data dimensionality increases.

    🌐Visit Website

    About this tool

    Overview

    Manhattan distance (L1 norm) calculates the distance between vectors by summing the absolute differences of their components. Also known as taxicab or city block distance.

    Formula

    Distance = Σ|a[i] - b[i]|

    Characteristics

    • Grid Distance: Measures path along axes (like Manhattan city blocks)
    • Outlier Robust: Less sensitive to outliers than Euclidean
    • Fast Computation: Values typically smaller than Euclidean
    • High-Dimensional Friendly: Better performance as dimensions increase

    When to Use

    • High-dimensional data
    • When outliers are present
    • Computational efficiency is important
    • Grid-like or discrete data

    Performance Benefits

    • Faster to calculate than Euclidean distance
    • Values are typically smaller
    • Recommended as dimensionality increases

    Comparison

    • Manhattan: Grid distance, robust to outliers
    • Euclidean: Straight-line distance, sensitive to outliers
    • Cosine: Angular similarity, scale invariant

    Use Cases

    • High-dimensional feature spaces
    • Data with potential outliers
    • Performance-sensitive applications
    • Discrete or grid-structured data

    Limitations

    Less intuitive than Euclidean distance for geometric problems. May not reflect actual similarity for normalized or angular comparisons.

    Vector Database Support

    Supported by some vector databases, though less common than cosine and Euclidean. Check specific database documentation.

    Surveys

    Loading more......

    Information

    Websitewww.baeldung.com
    PublishedMar 11, 2026

    Categories

    1 Item
    Concepts & Definitions

    Tags

    3 Items
    #Similarity#Distance Metric#High Dimensional

    Similar Products

    6 result(s)
    Hamming Distance

    Distance metric for binary vectors counting the number of positions at which corresponding bits differ, computed efficiently using XOR and popcount operations for ultra-fast similarity search.

    Dot Product

    Vector similarity metric measuring both directional similarity and magnitude of vectors. Used by many LLMs for training and equivalent to cosine similarity for normalized data. Reports both angle and magnitude information.

    Cosine Similarity

    Fundamental similarity metric for vector search measuring the cosine of the angle between vectors. Range from -1 to 1, with 1 indicating identical direction regardless of magnitude.

    Dot Product (Inner Product)

    Similarity metric computing sum of element-wise products between vectors. Efficient for normalized vectors, equivalent to cosine similarity when vectors are unit length.

    Euclidean Distance (L2 Distance)

    Distance metric measuring straight-line distance between vectors in multi-dimensional space. Lower values indicate higher similarity, with 0 meaning identical vectors.

    Vector Similarity Metrics

    Mathematical measures for comparing vector similarity including cosine similarity (directional), Euclidean distance (geometric), dot product (magnitude+direction), and Manhattan distance (grid-based) for AI and search applications.

    Decorative pattern
    Built with
    Ever Works
    Ever Works

    Connect with us

    Stay Updated

    Get the latest updates and exclusive content delivered to your inbox.

    Product

    • Categories
    • Tags
    • Pricing
    • Help

    Clients

    • Sign In
    • Register
    • Forgot password?

    Company

    • About Us
    • Admin
    • Sitemap

    Resources

    • Blog
    • Submit
    • API Documentation
    All product names, logos, and brands are the property of their respective owners. All company, product, and service names used in this repository, related repositories, and associated websites are for identification purposes only. The use of these names, logos, and brands does not imply endorsement, affiliation, or sponsorship. This directory may include content generated by artificial intelligence.
    Copyright © 2025 Awesome Vector Databases. All rights reserved.·Terms of Service·Privacy Policy·Cookies