Chapitre 5 : Distances et normes

Produit scalaire, normes, inégalités de Cauchy-Schwarz et Minkowski

Auteur·rice

Ibrahim BENKHERFELLAH

Modifié

27 mai 2026

Distances et normes

Jusqu’à présent, nous avons travaillé avec des espaces vectoriels de manière purement algébrique. Pour pouvoir parler de distances, de longueurs ou d’angles, nous devons enrichir notre structure avec des notions métriques. C’est le rôle des normes et des produits scalaires.

Dans tout ce chapitre, l’idée est la suivante : une norme permet de mesurer la taille d’un vecteur, et une distance permet de mesurer à quel point deux objets sont proches. Une fois ces notions posées proprement, on obtient des inégalités fondamentales (triangle, Cauchy-Schwarz, Minkowski) qui structurent toute l’analyse linéaire et la géométrie euclidienne.

Distance : mesurer l’écart entre deux points

Définition 5.1 - Distance

On appelle distance sur un ensemble \(E\) toute fonction \(d : E \times E \to \mathbb{R}\) vérifiant, pour tous \(x, y, z \in E\) :

  1. (d1) Positivité : \(d(x, y) \geq 0\).
  2. (d2) Séparation : \(d(x, y) = 0 \Longleftrightarrow x = y\).
  3. (d3) Symétrie : \(d(x, y) = d(y, x)\).
  4. (d4) Inégalité du triangle : \(d(x, z) \leq d(x, y) + d(y, z)\).

La positivité interdit les « distances négatives ». La séparation garantit qu’aucune paire de points distincts n’est confondue. La symétrie correspond à l’idée intuitive que la distance de \(x\) à \(y\) est la même que celle de \(y\) à \(x\). Enfin, l’inégalité du triangle formalise l’intuition géométrique : passer par un point intermédiaire ne peut pas raccourcir le chemin.

Exemple 5.1.1 - Distance euclidienne dans \(\mathbb{R}^2\)

La distance usuelle entre deux points \((x_1, x_2)\) et \((y_1, y_2)\) dans le plan est : \[ d((x_1, x_2), (y_1, y_2)) = \sqrt{(x_1 - y_1)^2 + (x_2 - y_2)^2} \]

C’est la distance « à vol d’oiseau ».

Exemple 5.1.2 - Distance de Manhattan

Dans \(\mathbb{R}^2\), on peut aussi définir : \[ d_1((x_1, x_2), (y_1, y_2)) = |x_1 - y_1| + |x_2 - y_2| \]

Cette distance correspond au trajet que l’on ferait dans une ville quadrillée (comme Manhattan) en ne pouvant se déplacer que horizontalement ou verticalement.

Exercice

Vérifier que la distance de Manhattan vérifie bien les quatre axiomes d’une distance.

Produit scalaire : faire de la géométrie dans un espace vectoriel

Plaçons-nous maintenant dans le cadre d’un espace vectoriel réel. Le produit scalaire sert à parler d’angles, d’orthogonalité et de longueurs. C’est l’outil standard pour relier algèbre linéaire et géométrie.

Définition 5.2 - Produit scalaire réel

On appelle produit scalaire réel sur un espace vectoriel \(E\) toute application \(f : E \times E \to \mathbb{R}\) telle que, pour tous \(\overrightarrow{x}, \overrightarrow{y}, \overrightarrow{z} \in E\) et tous \(a, b \in \mathbb{R}\) :

  1. (P1) Positivité : \(f(\overrightarrow{x}, \overrightarrow{x}) \geq 0\).
  2. (P2) Séparation : \(f(\overrightarrow{x}, \overrightarrow{x}) = 0 \Longleftrightarrow \overrightarrow{x} = \overrightarrow{0}\).
  3. (P3) Symétrie : \(f(\overrightarrow{x}, \overrightarrow{y}) = f(\overrightarrow{y}, \overrightarrow{x})\).
  4. (P4) Bilinéarité : pour tous \(a, b \in \mathbb{R}\), \[f(a\overrightarrow{x} + b\overrightarrow{y}, \overrightarrow{z}) = a f(\overrightarrow{x}, \overrightarrow{z}) + b f(\overrightarrow{y}, \overrightarrow{z}).\]

Lorsqu’il n’y a pas d’ambiguïté, on note classiquement \(f(\overrightarrow{x}, \overrightarrow{y}) = \langle \overrightarrow{x} | \overrightarrow{y} \rangle\).

Exercice

Les applications suivantes définissent-elles des produits scalaires sur \(\mathbb{R}^2\) ?

  1. \[\varphi_1\!\left(\begin{pmatrix}x_1\\x_2\end{pmatrix},\begin{pmatrix}y_1\\y_2\end{pmatrix}\right) = \sqrt{x_1^2 + y_1^2 + x_2^2 + y_2^2}.\]
  2. \[\varphi_2\!\left(\begin{pmatrix}x_1\\x_2\end{pmatrix},\begin{pmatrix}y_1\\y_2\end{pmatrix}\right) = 4x_1 y_1 - x_2 y_2.\]
  3. \[\varphi_3\!\left(\begin{pmatrix}x_1\\x_2\end{pmatrix},\begin{pmatrix}y_1\\y_2\end{pmatrix}\right) = x_1 y_1 - x_1 y_2 - x_2 y_1 + 2x_2 y_2.\]

Exercice

Soit \(f\) un produit scalaire sur un espace vectoriel \(E\). Montrer, en utilisant uniquement les axiomes, que pour tout \(\overrightarrow{x} \in E\), \[f(\overrightarrow{x}, \overrightarrow{0}) = 0.\]

Définition 5.3 - Espace euclidien

Un espace vectoriel réel \(E\) de dimension finie muni d’un produit scalaire est appelé un espace euclidien.

Lorsque \(E\) est de dimension infinie, on dira plutôt qu’il est préhilbertien (ce n’est pas l’objet de ce cours).

Exemple 5.2.1

Dans \(\mathbb{R}^2\), le produit scalaire usuel \[\left\langle \begin{pmatrix}x_1\\x_2\end{pmatrix} \,\middle|\, \begin{pmatrix}y_1\\y_2\end{pmatrix}\right\rangle = x_1 y_1 + x_2 y_2\] fait de \(\mathbb{R}^2\) un espace euclidien.

Norme : mesurer la taille d’un vecteur

Une norme est une « longueur » compatible avec la structure vectorielle : elle doit respecter la mise à l’échelle (homogénéité) et l’addition (triangle). Ces propriétés suffisent déjà à développer une théorie riche.

Définition 5.4 - Norme

On appelle norme sur un espace vectoriel \(E\) toute application \(N : E \to \mathbb{R}_+\) vérifiant, pour tous \(\overrightarrow{x}, \overrightarrow{y} \in E\) et tout \(\lambda \in \mathbb{R}\) :

  1. (N1) Séparation : \(N(\overrightarrow{x}) = 0 \Longleftrightarrow \overrightarrow{x} = \overrightarrow{0}\).
  2. (N2) Absolue homogénéité : \(N(\lambda \overrightarrow{x}) = |\lambda| N(\overrightarrow{x})\).
  3. (N3) Inégalité du triangle : \(N(\overrightarrow{x} + \overrightarrow{y}) \leq N(\overrightarrow{x}) + N(\overrightarrow{y})\).

Lorsqu’il n’y a pas d’ambiguïté, on note \(N(\overrightarrow{x}) = \|\overrightarrow{x}\|\).

Exemple 5.3.1 - Les trois normes classiques sur \(\mathbb{R}^n\)

Pour \(\overrightarrow{x} = (x_1, \ldots, x_n) \in \mathbb{R}^n\), on définit :

  1. La norme 1 (ou norme de Manhattan) : \(\|\overrightarrow{x}\|_1 = |x_1| + |x_2| + \cdots + |x_n|\)
  2. La norme 2 (ou norme euclidienne) : \(\|\overrightarrow{x}\|_2 = \sqrt{x_1^2 + x_2^2 + \cdots + x_n^2}\)
  3. La norme infinie : \(\|\overrightarrow{x}\|_\infty = \max(|x_1|, |x_2|, \ldots, |x_n|)\)

Exemple 5.3.2

Pour le vecteur \(\overrightarrow{x} = (3, -4)\) dans \(\mathbb{R}^2\) : \[ \|\overrightarrow{x}\|_1 = |3| + |-4| = 7, \quad \|\overrightarrow{x}\|_2 = \sqrt{9 + 16} = 5, \quad \|\overrightarrow{x}\|_\infty = \max(3, 4) = 4 \]

On observe que \(\|\overrightarrow{x}\|_\infty \leq \|\overrightarrow{x}\|_2 \leq \|\overrightarrow{x}\|_1\). Cette inégalité est vraie en général.

Exercice

Montrer que la norme infinie \(\|\overrightarrow{x}\|_\infty = \max_{1 \leq i \leq n} |x_i|\) vérifie bien les trois axiomes d’une norme.

Liens fondamentaux : produit scalaire, norme, distance

On gagne énormément en pratique quand on sait passer d’une notion à l’autre : un produit scalaire donne une norme (et donc une distance). Réciproquement, certaines normes « viennent » d’un produit scalaire : c’est précisément le cas des normes euclidiennes.

Proposition 5.1 - Liens fondamentaux

Soit \(E\) un espace vectoriel réel de dimension finie.

  1. Soit \(\langle \bullet | \bullet \rangle\) un produit scalaire sur \(E\). Alors l’application \[E \to \mathbb{R}_+, \qquad \overrightarrow{x} \mapsto \sqrt{\langle \overrightarrow{x} | \overrightarrow{x} \rangle}\] définit une norme sur \(E\).

  2. Soit \(\|\bullet\|\) une norme sur \(E\). Alors l’application \[E \times E \to \mathbb{R}, \qquad (\overrightarrow{x}, \overrightarrow{y}) \mapsto \frac{\|\overrightarrow{x} + \overrightarrow{y}\|^2 - \|\overrightarrow{x}\|^2 - \|\overrightarrow{y}\|^2}{2}\] définit un produit scalaire sur \(E\) si et seulement si la norme vérifie l’égalité du parallélogramme (Proposition 5.2).

  3. Soit \(\|\bullet\|\) une norme sur \(E\). Alors l’application \[E \times E \to \mathbb{R}, \qquad (\overrightarrow{x}, \overrightarrow{y}) \mapsto \|\overrightarrow{x} - \overrightarrow{y}\|\] définit une distance sur \(E\).

Démonstration

Propriété (1) : Posons \(\|\overrightarrow{x}\| = \sqrt{\langle \overrightarrow{x} | \overrightarrow{x} \rangle}\). Vérifions les trois axiomes d’une norme.

Séparation : \(\|\overrightarrow{x}\| = 0 \Leftrightarrow \langle \overrightarrow{x} | \overrightarrow{x} \rangle = 0 \Leftrightarrow \overrightarrow{x} = \overrightarrow{0}\) (par l’axiome de séparation du produit scalaire).

Homogénéité : \(\|\lambda \overrightarrow{x}\| = \sqrt{\langle \lambda\overrightarrow{x} | \lambda\overrightarrow{x} \rangle} = \sqrt{\lambda^2 \langle \overrightarrow{x} | \overrightarrow{x} \rangle} = |\lambda| \|\overrightarrow{x}\|\).

Inégalité du triangle : On utilise l’inégalité de Cauchy-Schwarz (démontrée plus loin). On a : \[ \|\overrightarrow{x} + \overrightarrow{y}\|^2 = \|\overrightarrow{x}\|^2 + 2\langle \overrightarrow{x} | \overrightarrow{y} \rangle + \|\overrightarrow{y}\|^2 \leq \|\overrightarrow{x}\|^2 + 2\|\overrightarrow{x}\|\|\overrightarrow{y}\| + \|\overrightarrow{y}\|^2 = (\|\overrightarrow{x}\| + \|\overrightarrow{y}\|)^2 \] En prenant la racine carrée, on conclut.

Propriété (3) : Posons \(d(\overrightarrow{x}, \overrightarrow{y}) = \|\overrightarrow{x} - \overrightarrow{y}\|\). La positivité et la séparation découlent de celles de la norme. La symétrie vient de \(\|\overrightarrow{x} - \overrightarrow{y}\| = \|(-1)(\overrightarrow{y} - \overrightarrow{x})\| = \|\overrightarrow{y} - \overrightarrow{x}\|\). L’inégalité du triangle : \[ d(\overrightarrow{x}, \overrightarrow{z}) = \|\overrightarrow{x} - \overrightarrow{z}\| = \|(\overrightarrow{x} - \overrightarrow{y}) + (\overrightarrow{y} - \overrightarrow{z})\| \leq \|\overrightarrow{x} - \overrightarrow{y}\| + \|\overrightarrow{y} - \overrightarrow{z}\| = d(\overrightarrow{x}, \overrightarrow{y}) + d(\overrightarrow{y}, \overrightarrow{z}) \]

Lemme

Soit \(\langle \bullet | \bullet \rangle\) un produit scalaire sur un espace vectoriel \(E\) et, pour tout \(\overrightarrow{x} \in E\), \(\|\overrightarrow{x}\| = \sqrt{\langle \overrightarrow{x} | \overrightarrow{x} \rangle}\). Alors, pour tous \(\overrightarrow{x}, \overrightarrow{y} \in E\), \[\|\overrightarrow{x} + \overrightarrow{y}\|^2 = \|\overrightarrow{x}\|^2 + 2\langle \overrightarrow{x} | \overrightarrow{y} \rangle + \|\overrightarrow{y}\|^2.\]

Démonstration

\[ \begin{aligned} \|\overrightarrow{x} + \overrightarrow{y}\|^2 &= \langle \overrightarrow{x} + \overrightarrow{y} | \overrightarrow{x} + \overrightarrow{y} \rangle \\ &= \langle \overrightarrow{x} | \overrightarrow{x} \rangle + \langle \overrightarrow{x} | \overrightarrow{y} \rangle + \langle \overrightarrow{y} | \overrightarrow{x} \rangle + \langle \overrightarrow{y} | \overrightarrow{y} \rangle \\ &= \|\overrightarrow{x}\|^2 + 2\langle \overrightarrow{x} | \overrightarrow{y} \rangle + \|\overrightarrow{y}\|^2. \end{aligned} \]

Exemple 5.4.1

Dans \(\mathbb{R}^2\) muni du produit scalaire usuel, si \(\overrightarrow{x} = \begin{pmatrix}x_1\\x_2\end{pmatrix}\) alors \[\|\overrightarrow{x}\| = \sqrt{x_1^2 + x_2^2}.\]

Inégalité de Cauchy-Schwarz

Théorème 5.1 - Inégalité de Cauchy-Schwarz

Soit \(\langle \bullet | \bullet \rangle\) un produit scalaire sur un espace vectoriel réel \(E\) et \(\|\bullet\|\) la norme associée. Alors, pour tous \(\overrightarrow{x}, \overrightarrow{y} \in E\), \[|\langle \overrightarrow{x} | \overrightarrow{y} \rangle| \leq \|\overrightarrow{x}\| \|\overrightarrow{y}\|.\]

Démonstration

Si \(\overrightarrow{y} = \overrightarrow{0}\), c’est immédiat. Sinon, pour tout \(t \in \mathbb{R}\), la quantité \(\|\overrightarrow{x} + t\overrightarrow{y}\|^2\) est un polynôme de degré 2 en \(t\) et \[\|\overrightarrow{x} + t\overrightarrow{y}\|^2 = \|\overrightarrow{x}\|^2 + 2t\langle \overrightarrow{x} | \overrightarrow{y} \rangle + t^2 \|\overrightarrow{y}\|^2.\] Ce polynôme étant \(\geq 0\) pour tout \(t\), son discriminant est \(\leq 0\), donc \[(2\langle \overrightarrow{x} | \overrightarrow{y} \rangle)^2 - 4\|\overrightarrow{x}\|^2\|\overrightarrow{y}\|^2 \leq 0.\] On simplifie et on prend la racine, d’où l’inégalité.

Inégalités de Minkowski

Théorème 5.2 - Inégalités de Minkowski

Soit \(\|\bullet\|\) une norme sur un espace vectoriel réel \(E\). Alors, pour tous \(\overrightarrow{x}, \overrightarrow{y} \in E\), \[\Big|\|\overrightarrow{x}\| - \|\overrightarrow{y}\|\Big| \leq \|\overrightarrow{x} + \overrightarrow{y}\| \leq \|\overrightarrow{x}\| + \|\overrightarrow{y}\|.\]

Démonstration

L’inégalité de droite est l’inégalité du triangle. Pour l’inégalité de gauche : \[\|\overrightarrow{x}\| = \|(\overrightarrow{x} + \overrightarrow{y}) - \overrightarrow{y}\| \leq \|\overrightarrow{x} + \overrightarrow{y}\| + \|\overrightarrow{y}\|.\] Donc \(\|\overrightarrow{x}\| - \|\overrightarrow{y}\| \leq \|\overrightarrow{x} + \overrightarrow{y}\|\). En échangeant les rôles de \(\overrightarrow{x}\) et \(\overrightarrow{y}\), on obtient l’inégalité avec la valeur absolue.

Parallélogramme et polarisation : reconnaître une norme euclidienne

Proposition 5.2 - Égalité du parallélogramme

Soit \(\langle \bullet | \bullet \rangle\) un produit scalaire sur \(E\) et \(\|\bullet\|\) la norme associée. Alors, pour tous \(\overrightarrow{x}, \overrightarrow{y} \in E\), \[\|\overrightarrow{x} + \overrightarrow{y}\|^2 + \|\overrightarrow{x} - \overrightarrow{y}\|^2 = 2\left(\|\overrightarrow{x}\|^2 + \|\overrightarrow{y}\|^2\right).\]

Démonstration

Par le Lemme, \[\|\overrightarrow{x} + \overrightarrow{y}\|^2 = \|\overrightarrow{x}\|^2 + 2\langle \overrightarrow{x} | \overrightarrow{y} \rangle + \|\overrightarrow{y}\|^2.\] En remplaçant \(\overrightarrow{y}\) par \(-\overrightarrow{y}\), \[\|\overrightarrow{x} - \overrightarrow{y}\|^2 = \|\overrightarrow{x}\|^2 - 2\langle \overrightarrow{x} | \overrightarrow{y} \rangle + \|\overrightarrow{y}\|^2.\] En additionnant, les termes croisés s’annulent et on conclut.

Proposition 5.3 - Identité de polarisation

Soit \(\langle \bullet | \bullet \rangle\) un produit scalaire sur \(E\) et \(\|\bullet\|\) la norme associée. Alors, pour tous \(\overrightarrow{x}, \overrightarrow{y} \in E\), \[\|\overrightarrow{x} + \overrightarrow{y}\|^2 - \|\overrightarrow{x} - \overrightarrow{y}\|^2 = 4\langle \overrightarrow{x} | \overrightarrow{y} \rangle.\]

Démonstration

On applique le Lemme à \(\overrightarrow{x} + \overrightarrow{y}\) puis à \(\overrightarrow{x} - \overrightarrow{y}\) et on soustrait les deux identités (les termes \(\|\overrightarrow{x}\|^2\) et \(\|\overrightarrow{y}\|^2\) s’éliminent).

Produit scalaire canonique sur \(\mathbb{R}^n\)

Définition 5.5 - Produit scalaire canonique

Considérons \(\mathbb{R}^n\) (avec \(n \in \mathbb{N}_{>0}\)). On appelle produit scalaire canonique l’application \[\mathbb{R}^n \times \mathbb{R}^n \to \mathbb{R}, \qquad (\overrightarrow{x}, \overrightarrow{y}) \mapsto \langle \overrightarrow{x} | \overrightarrow{y} \rangle = {}^t\!\overrightarrow{x}\, \overrightarrow{y} = \sum_{i=1}^n x_i y_i.\] Sa norme associée est appelée norme euclidienne canonique.

La norme euclidienne canonique mesure les distances « usuelles ». Par exemple, dans \(\mathbb{R}^2\), la norme de \(\begin{pmatrix}1\\1\end{pmatrix}\) vaut \(\sqrt{2}\).

Exercice

Montrer que \[\langle \overrightarrow{x} | \overrightarrow{y} \rangle = \sum_{i=1}^n x_i y_i\] définit un produit scalaire sur \(\mathbb{R}^n\).

Exercice

Considérons \(\|\bullet\|\) la norme euclidienne canonique sur \(\mathbb{R}^2\). Montrer que \[\|\overrightarrow{x} + \overrightarrow{y}\| = \|\overrightarrow{x}\| + \|\overrightarrow{y}\|\] si et seulement si \(\overrightarrow{x}\) et \(\overrightarrow{y}\) sont colinéaires de même sens (c’est-à-dire \(\overrightarrow{x} = \lambda\overrightarrow{y}\) pour \(\lambda \geq 0\)).

Exemple 5.8.1 - Application numérique de Cauchy-Schwarz

Dans \(\mathbb{R}^3\) avec le produit scalaire canonique, prenons \(\overrightarrow{x} = (1, 2, 3)\) et \(\overrightarrow{y} = (4, 5, 6)\). On a : \[ \langle \overrightarrow{x} | \overrightarrow{y} \rangle = 1 \cdot 4 + 2 \cdot 5 + 3 \cdot 6 = 32 \] \[ \|\overrightarrow{x}\| = \sqrt{1 + 4 + 9} = \sqrt{14}, \quad \|\overrightarrow{y}\| = \sqrt{16 + 25 + 36} = \sqrt{77} \]

Cauchy-Schwarz donne \(|32| \leq \sqrt{14} \cdot \sqrt{77} = \sqrt{1078} \approx 32{,}83\). L’inégalité est bien vérifiée (et presque une égalité, ce qui signifie que les deux vecteurs sont presque colinéaires).

Exercice

Soit \(\overrightarrow{x} = (1, 1, 1, 1)\) et \(\overrightarrow{y} = (1, -1, 1, -1)\) dans \(\mathbb{R}^4\). Calculer \(\langle \overrightarrow{x} | \overrightarrow{y} \rangle\), \(\|\overrightarrow{x}\|\) et \(\|\overrightarrow{y}\|\). Vérifier l’inégalité de Cauchy-Schwarz. Que remarque-t-on ?

Exercice

En utilisant l’inégalité de Cauchy-Schwarz dans \(\mathbb{R}^n\) avec des vecteurs bien choisis, montrer que pour tous réels \(a_1, \ldots, a_n\) : \[ \left(\sum_{i=1}^n a_i\right)^2 \leq n \sum_{i=1}^n a_i^2 \]

Remarque

La notion de distance est au cœur de plusieurs algorithmes de data science. Dans l’algorithme des \(k\)-moyennes (chapitre 8), on regroupe les données en clusters en minimisant les distances au centre de chaque groupe. Le choix de la norme (euclidienne, Manhattan, etc.) influence directement les résultats de la classification. La norme euclidienne, issue du produit scalaire canonique, est le choix le plus courant, mais d’autres normes peuvent être plus adaptées selon le contexte (par exemple la norme de Manhattan pour des données catégorielles ou discrètes).