What is the triangle inequality and why must a valid norm satisfy it?

Quick Overview

Asks what the triangle inequality says and why every valid norm has to satisfy it. Tests the norm axioms, what the inequality guarantees for distances, continuity and convexity, and how to recognize a function such as an Lp formula with p below 1 that fails it.

What is the triangle inequality and why must a valid norm satisfy it?

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Other

What is the triangle inequality, and why must a valid norm satisfy it? ```hint Try a function that fails it Look at what the inequality guarantees for the distance $d(x, y) = \|x - y\|$, and test the $L_p$ formula with $p = 1/2$ on the vectors $(1, 0)$ and $(0, 1)$. ``` ### What a Strong Answer Covers - The statement of the inequality and its geometric reading - Where it sits among the axioms that define a norm - What it guarantees: a proper metric, continuity of the norm, and convexity - A function that fails it and what breaks as a result - When equality holds, and why the answer depends on the norm ### Follow-up Questions - Prove the triangle inequality for the Euclidean norm. - Why is the $L_p$ expression with $p < 1$ not a norm, and why is it still used to encourage sparsity? - Is cosine distance a metric? What would the answer change for a nearest-neighbor index? - How do tree-based nearest-neighbor indexes use the triangle inequality to skip work?

Overview: Asks what the triangle inequality says and why every valid norm has to satisfy it. Tests the norm axioms, what the inequality guarantees for distances, continuity and convexity, and how to recognize a function such as an Lp formula with p below 1 that fails it.

General logo
General
Nov 24, 2026
mediumData ScientistOtherStatistics & Math
0
0

What is the triangle inequality, and why must a valid norm satisfy it?

What a Strong Answer Covers Guidance

  • The statement of the inequality and its geometric reading
  • Where it sits among the axioms that define a norm
  • What it guarantees: a proper metric, continuity of the norm, and convexity
  • A function that fails it and what breaks as a result
  • When equality holds, and why the answer depends on the norm

Follow-up Questions Guidance

  • Prove the triangle inequality for the Euclidean norm.
  • Why is the LpL_p expression with p<1p < 1 not a norm, and why is it still used to encourage sparsity?
  • Is cosine distance a metric? What would the answer change for a nearest-neighbor index?
  • How do tree-based nearest-neighbor indexes use the triangle inequality to skip work?