{"id":4022,"date":"2025-07-25T17:08:44","date_gmt":"2025-07-25T17:08:44","guid":{"rendered":"https:\/\/uplatz.com\/blog\/?p=4022"},"modified":"2025-07-25T17:08:44","modified_gmt":"2025-07-25T17:08:44","slug":"manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions","status":"publish","type":"post","link":"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/","title":{"rendered":"Manhattan Distance Formula \u2013 Grid-Based Metric for Similarity in High Dimensions"},"content":{"rendered":"<p><b><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4023\" src=\"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/07\/Manhattan-Distance-Formula-\u2013-Grid-Based-Metric-for-Similarity-in-High-Dimensions.jpg\" alt=\"\" width=\"1280\" height=\"720\" srcset=\"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/07\/Manhattan-Distance-Formula-\u2013-Grid-Based-Metric-for-Similarity-in-High-Dimensions.jpg 1280w, https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/07\/Manhattan-Distance-Formula-\u2013-Grid-Based-Metric-for-Similarity-in-High-Dimensions-300x169.jpg 300w, https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/07\/Manhattan-Distance-Formula-\u2013-Grid-Based-Metric-for-Similarity-in-High-Dimensions-1024x576.jpg 1024w, https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2025\/07\/Manhattan-Distance-Formula-\u2013-Grid-Based-Metric-for-Similarity-in-High-Dimensions-768x432.jpg 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/>\ud83d\udd39 Short Description:<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> The Manhattan Distance formula measures the absolute difference between points across each dimension. It mimics the way you&#8217;d move through a city grid\u2014up, down, left, or right\u2014rather than diagonally.<\/span><\/p>\n<p><b>\ud83d\udd39 Description (Plain Text):<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><b>Manhattan Distance<\/b><span style=\"font-weight: 400;\">, also known as <\/span><b>Taxicab Geometry<\/b><span style=\"font-weight: 400;\"> or <\/span><b>L1 norm<\/b><span style=\"font-weight: 400;\">, is a popular mathematical distance metric that calculates the total absolute difference between coordinates of two points. This formula is particularly valuable in high-dimensional spaces and settings where movement is constrained to a grid-like path (e.g. urban navigation, matrix traversal, or grid-based machine learning problems).<\/span><\/p>\n<h4><b>\ud83d\udccc Formula (for two points p and q in n-dimensional space):<\/b><\/h4>\n<p><b>D(p, q) = |p\u2081 &#8211; q\u2081| + |p\u2082 &#8211; q\u2082| + &#8230; + |p\u2099 &#8211; q\u2099|<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Where:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>p = (p\u2081, p\u2082, &#8230;, p\u2099)<\/b><span style=\"font-weight: 400;\"> and <\/span><b>q = (q\u2081, q\u2082, &#8230;, q\u2099)<\/b><span style=\"font-weight: 400;\"> are two points in <\/span><b>n-dimensional<\/b><span style=\"font-weight: 400;\"> space<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>|p\u1d62 &#8211; q\u1d62|<\/b><span style=\"font-weight: 400;\"> is the absolute difference between the i-th dimensions<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Unlike Euclidean Distance, <\/span><b>no squaring or square root<\/b><span style=\"font-weight: 400;\"> is involved<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<\/ul>\n<h4><b>\ud83c\udfd9\ufe0f Why It\u2019s Called &#8220;Manhattan&#8221; Distance<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">The term originates from how movement occurs in a grid-based city like Manhattan, New York. Instead of moving diagonally (as a bird might fly), a taxi would have to travel along straight lines \u2014 going north\/south and east\/west \u2014 just like the blocks of a city. The Manhattan Distance reflects the <\/span><b>sum of the absolute differences<\/b><span style=\"font-weight: 400;\"> along each axis, just as a car would tally up its turns and blocks covered.<\/span><\/p>\n<p><b>Example (2D case):<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> Point A = (1, 2), Point B = (4, 6)<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> Manhattan Distance = |4 &#8211; 1| + |6 &#8211; 2| = 3 + 4 = <\/span><b>7<\/b><\/p>\n<p><span style=\"font-weight: 400;\">This metric emphasizes <\/span><b>individual axis-aligned differences<\/b><span style=\"font-weight: 400;\"> and is computationally simpler than calculating a diagonal (Euclidean) distance.<\/span><\/p>\n<h3><b>\ud83d\udcbc Real-World Applications<\/b><\/h3>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Machine Learning \u2013 KNN, Clustering<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> In algorithms like <\/span><b>K-Nearest Neighbors (KNN)<\/b><span style=\"font-weight: 400;\"> and <\/span><b>K-Means<\/b><span style=\"font-weight: 400;\">, Manhattan Distance can replace Euclidean Distance to improve performance, especially when dealing with <\/span><b>high-dimensional data<\/b><span style=\"font-weight: 400;\"> or <\/span><b>sparse matrices<\/b><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Recommendation Systems<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> When comparing user profiles, the Manhattan Distance offers a clearer distinction in some cases where differences in preferences are axis-aligned.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Computer Vision<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> For simple image comparison and object detection tasks where pixels are laid out on a grid, Manhattan Distance is a computationally lighter alternative.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Game Development<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> In grid-based games (e.g., tile maps, board games, chess), pathfinding uses Manhattan Distance to evaluate proximity between entities.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Finance and Risk Modeling<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> Used in <\/span><b>portfolio analysis<\/b><span style=\"font-weight: 400;\"> where differences in assets or time series data are compared based on absolute changes rather than squared deviations.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Robotics and Urban Planning<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> Used in <\/span><b>pathfinding algorithms<\/b><span style=\"font-weight: 400;\"> for drones, robots, or delivery routing in structured spaces where diagonal movement is not possible.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<\/ol>\n<h3><b>\ud83e\udde0 Key Insights &amp; Comparisons<\/b><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Contrast with Euclidean Distance<\/b><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> Euclidean gives the shortest path (hypotenuse), while Manhattan gives the step-wise path. For example, in high-dimensional, sparse, or categorical datasets, Manhattan often performs better than Euclidean.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>L1 vs. L2 Norm<\/b><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Manhattan Distance uses the <\/span><b>L1 norm<\/b><span style=\"font-weight: 400;\">, summing absolute differences.<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">Euclidean Distance uses the <\/span><b>L2 norm<\/b><span style=\"font-weight: 400;\">, summing squared differences and taking a square root.<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">L1 is more robust to <\/span><b>outliers<\/b><span style=\"font-weight: 400;\"> and more interpretable in some real-world situations.<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Interpretability<\/b><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> In many cases, especially involving costs or time, Manhattan Distance is easier to interpret \u2014 each unit difference represents a step or cost in one direction.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>High-Dimensional Suitability<\/b><span style=\"font-weight: 400;\">:<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"> Manhattan Distance <\/span><b>mitigates some problems of the \u201ccurse of dimensionality\u201d<\/b><span style=\"font-weight: 400;\"> seen in Euclidean space. It avoids over-penalizing large values and performs better when features are not correlated.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<\/ul>\n<h3><b>\u26a0\ufe0f Limitations<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Despite its benefits, Manhattan Distance has certain limitations:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Not rotation invariant<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> Unlike Euclidean Distance, Manhattan Distance changes if you rotate the coordinate system.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Not suitable for circular or spatial proximity tasks<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> In geographic mapping or when curved surfaces are involved, Euclidean or geodesic distances are better suited.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Ignores correlation between features<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> Like many other distance metrics, it assumes features are independent unless otherwise encoded.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Sensitive to scaling<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> Requires normalization when dimensions have vastly different ranges or units to prevent domination by any one feature.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>May not align with intuitive human similarity<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> For example, in natural language tasks or image recognition, deeper context might be needed beyond grid-based differences.<\/span><span style=\"font-weight: 400;\"><\/p>\n<p><\/span><\/li>\n<\/ol>\n<h3><b>\u2705 When to Use Manhattan Distance<\/b><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Your data is <\/span><b>sparse<\/b><span style=\"font-weight: 400;\"> (e.g., lots of 0s in vectors)<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Features are <\/span><b>independent and uncorrelated<\/b><b>\n<p><\/b><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Movement or comparison is <\/span><b>grid-based or axis-aligned<\/b><b>\n<p><\/b><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">You&#8217;re working in <\/span><b>high-dimensional space<\/b><b>\n<p><\/b><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Interpretability and computational simplicity are priorities<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Your model is sensitive to <\/span><b>outliers or skewed distributions<\/b><b>\n<p><\/b><\/li>\n<\/ul>\n<h3><b>\ud83d\udd0d Visual Representation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Imagine a grid or matrix. If you want to move from the bottom-left corner to the top-right, you must move across rows and columns. This structure is at the core of Manhattan Distance logic. In comparison, a straight diagonal shortcut (as Euclidean Distance would allow) might be physically impossible or unrealistic in many real-world use cases.<\/span><\/p>\n<h3><b>\ud83e\udde9 Bonus: Manhattan Distance in NLP<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Though less common than cosine similarity or Euclidean metrics, Manhattan Distance can be used with <\/span><b>TF-IDF vectors<\/b><span style=\"font-weight: 400;\"> or <\/span><b>word embeddings<\/b><span style=\"font-weight: 400;\"> to calculate textual dissimilarity. For specific problems like <\/span><b>bag-of-words sentiment analysis<\/b><span style=\"font-weight: 400;\">, it can offer a rough but effective distance measure.<\/span><\/p>\n<h3><b>\ud83d\udcce Summary<\/b><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Formula<\/b><span style=\"font-weight: 400;\">: Sum of absolute differences<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Best for<\/b><span style=\"font-weight: 400;\">: High-dimensional, sparse, grid-based problems<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Advantages<\/b><span style=\"font-weight: 400;\">: Interpretable, efficient, outlier-resistant<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Drawbacks<\/b><span style=\"font-weight: 400;\">: Not rotation-invariant, ignores semantics<\/span><span style=\"font-weight: 400;\">\n<p><\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Manhattan Distance is a <\/span><b>trusted ally<\/b><span style=\"font-weight: 400;\"> in many data science, robotics, and AI projects where linear paths and performance matter more than perfect geometric symmetry.<\/span><\/p>\n<p><b>\ud83d\udd39 Meta Title:<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> Manhattan Distance Formula \u2013 Grid-Based Metric for Machine Learning &amp; AI<\/span><\/p>\n<p><b>\ud83d\udd39 Meta Description:<\/b><b><br \/>\n<\/b><span style=\"font-weight: 400;\"> Learn how the Manhattan Distance formula measures axis-aligned similarity between points. Ideal for high-dimensional data, robotics, and grid-based systems, it&#8217;s a powerful L1 norm metric used in KNN, clustering, and pathfinding.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udd39 Short Description: The Manhattan Distance formula measures the absolute difference between points across each dimension. It mimics the way you&#8217;d move through a city grid\u2014up, down, left, or right\u2014rather <span class=\"readmore\"><a href=\"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/\">Read More &#8230;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-4022","post","type-post","status-publish","format-standard","hentry","category-infographics"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Manhattan Distance Formula \u2013 Grid-Based Metric for Similarity in High Dimensions | Uplatz Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Manhattan Distance Formula \u2013 Grid-Based Metric for Similarity in High Dimensions | Uplatz Blog\" \/>\n<meta property=\"og:description\" content=\"\ud83d\udd39 Short Description: The Manhattan Distance formula measures the absolute difference between points across each dimension. It mimics the way you&#8217;d move through a city grid\u2014up, down, left, or right\u2014rather Read More ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/\" \/>\n<meta property=\"og:site_name\" content=\"Uplatz Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Uplatz-1077816825610769\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-25T17:08:44+00:00\" \/>\n<meta name=\"author\" content=\"uplatzblog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@uplatz_global\" \/>\n<meta name=\"twitter:site\" content=\"@uplatz_global\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"uplatzblog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\\\/\"},\"author\":{\"name\":\"uplatzblog\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#\\\/schema\\\/person\\\/8ecae69a21d0757bdb2f776e67d2645e\"},\"headline\":\"Manhattan Distance Formula \u2013 Grid-Based Metric for Similarity in High Dimensions\",\"datePublished\":\"2025-07-25T17:08:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\\\/\"},\"wordCount\":898,\"publisher\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#organization\"},\"articleSection\":[\"Infographics\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\\\/\",\"url\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\\\/\",\"name\":\"Manhattan Distance Formula \u2013 Grid-Based Metric for Similarity in High Dimensions | Uplatz Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#website\"},\"datePublished\":\"2025-07-25T17:08:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/uplatz.com\\\/blog\\\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Manhattan Distance Formula \u2013 Grid-Based Metric for Similarity in High Dimensions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/\",\"name\":\"Uplatz Blog\",\"description\":\"Uplatz is a global IT Training &amp; Consulting company\",\"publisher\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#organization\",\"name\":\"uplatz.com\",\"url\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/Uplatz-Logo-Copy-2.png\",\"contentUrl\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/11\\\/Uplatz-Logo-Copy-2.png\",\"width\":1280,\"height\":800,\"caption\":\"uplatz.com\"},\"image\":{\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Uplatz-1077816825610769\\\/\",\"https:\\\/\\\/x.com\\\/uplatz_global\",\"https:\\\/\\\/www.instagram.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/7956715?trk=tyah&amp;amp;amp;amp;trkInfo=clickedVertical:company,clickedEntityId:7956715,idx:1-1-1,tarId:1464353969447,tas:uplatz\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/uplatz.com\\\/blog\\\/#\\\/schema\\\/person\\\/8ecae69a21d0757bdb2f776e67d2645e\",\"name\":\"uplatzblog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g\",\"caption\":\"uplatzblog\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Manhattan Distance Formula \u2013 Grid-Based Metric for Similarity in High Dimensions | Uplatz Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/","og_locale":"en_US","og_type":"article","og_title":"Manhattan Distance Formula \u2013 Grid-Based Metric for Similarity in High Dimensions | Uplatz Blog","og_description":"\ud83d\udd39 Short Description: The Manhattan Distance formula measures the absolute difference between points across each dimension. It mimics the way you&#8217;d move through a city grid\u2014up, down, left, or right\u2014rather Read More ...","og_url":"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/","og_site_name":"Uplatz Blog","article_publisher":"https:\/\/www.facebook.com\/Uplatz-1077816825610769\/","article_published_time":"2025-07-25T17:08:44+00:00","author":"uplatzblog","twitter_card":"summary_large_image","twitter_creator":"@uplatz_global","twitter_site":"@uplatz_global","twitter_misc":{"Written by":"uplatzblog","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/#article","isPartOf":{"@id":"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/"},"author":{"name":"uplatzblog","@id":"https:\/\/uplatz.com\/blog\/#\/schema\/person\/8ecae69a21d0757bdb2f776e67d2645e"},"headline":"Manhattan Distance Formula \u2013 Grid-Based Metric for Similarity in High Dimensions","datePublished":"2025-07-25T17:08:44+00:00","mainEntityOfPage":{"@id":"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/"},"wordCount":898,"publisher":{"@id":"https:\/\/uplatz.com\/blog\/#organization"},"articleSection":["Infographics"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/","url":"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/","name":"Manhattan Distance Formula \u2013 Grid-Based Metric for Similarity in High Dimensions | Uplatz Blog","isPartOf":{"@id":"https:\/\/uplatz.com\/blog\/#website"},"datePublished":"2025-07-25T17:08:44+00:00","breadcrumb":{"@id":"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/uplatz.com\/blog\/manhattan-distance-formula-grid-based-metric-for-similarity-in-high-dimensions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/uplatz.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Manhattan Distance Formula \u2013 Grid-Based Metric for Similarity in High Dimensions"}]},{"@type":"WebSite","@id":"https:\/\/uplatz.com\/blog\/#website","url":"https:\/\/uplatz.com\/blog\/","name":"Uplatz Blog","description":"Uplatz is a global IT Training &amp; Consulting company","publisher":{"@id":"https:\/\/uplatz.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/uplatz.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/uplatz.com\/blog\/#organization","name":"uplatz.com","url":"https:\/\/uplatz.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/uplatz.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2016\/11\/Uplatz-Logo-Copy-2.png","contentUrl":"https:\/\/uplatz.com\/blog\/wp-content\/uploads\/2016\/11\/Uplatz-Logo-Copy-2.png","width":1280,"height":800,"caption":"uplatz.com"},"image":{"@id":"https:\/\/uplatz.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Uplatz-1077816825610769\/","https:\/\/x.com\/uplatz_global","https:\/\/www.instagram.com\/","https:\/\/www.linkedin.com\/company\/7956715?trk=tyah&amp;amp;amp;amp;trkInfo=clickedVertical:company,clickedEntityId:7956715,idx:1-1-1,tarId:1464353969447,tas:uplatz"]},{"@type":"Person","@id":"https:\/\/uplatz.com\/blog\/#\/schema\/person\/8ecae69a21d0757bdb2f776e67d2645e","name":"uplatzblog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7f814c72279199f59ded4418a8653ad15f5f8904ac75e025a4e2abe24d58fa5d?s=96&d=mm&r=g","caption":"uplatzblog"}}]}},"_links":{"self":[{"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/posts\/4022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/comments?post=4022"}],"version-history":[{"count":1,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/posts\/4022\/revisions"}],"predecessor-version":[{"id":4024,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/posts\/4022\/revisions\/4024"}],"wp:attachment":[{"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/media?parent=4022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/categories?post=4022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/uplatz.com\/blog\/wp-json\/wp\/v2\/tags?post=4022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}