ATLAS Ouvrir dans l'atlas →

ExerciceMaths Sup – MPSI, chapitre 19 — Espaces préhilbertiens réels · Projection orthogonale sur un sous-espace de dimension finie

Exercice 45

DémonstrationCalcul

Méthode des moindres carrés. Soit p⩽np \leqslant n deux entiers, A∈ℳn,p(ℝ)A \in \mathcal{M}_{n,p}(\mathbb{R}) une matrice de rang pp et B∈ℳn,1(ℝ)B \in \mathcal{M}_{n,1}(\mathbb{R}).

1. Montrer qu'il existe un unique X0∈ℳp,1(ℝ)X_{0} \in \mathcal{M}_{p,1}(\mathbb{R}) tel que ∥AX0−B∥=inf⁡{∥AX−B∥  ∣  X∈ℳp,1(ℝ)}.\lVert AX_{0} - B \rVert = \inf\big\{\lVert AX - B \rVert \;\big|\; X \in \mathcal{M}_{p,1}(\mathbb{R})\big\}.

2. Montrer que X0X_{0} est l'unique solution du système ATAX=ATB{A}^{T}AX = {A}^{T}B.

3. Application : calculer inf⁡{(x+y−1)2+(x−y)2+(2x+y+2)2  ∣  (x,y)∈ℝ2}\inf\big\{(x + y - 1)^{2} + (x - y)^{2} + (2x + y + 2)^{2} \;\big|\; (x, y) \in \mathbb{R}^{2}\big\}.

Corrigé

On munit ℳn,1(ℝ)\mathcal{M}_{n,1}(\mathbb{R}) du produit scalaire canonique.

1. L'ensemble F=Im A={AX∣X∈ℳp,1(ℝ)}F = \mathrm{Im}\, A = \{AX \mid X \in \mathcal{M}_{p,1}(\mathbb{R})\} est un sous-espace de ℳn,1(ℝ)\mathcal{M}_{n,1}(\mathbb{R}), de dimension finie rgA=p\mathrm{rg} A = p. Par le théorème 7, la borne inférieure des ∥Y−B∥\lVert Y - B \rVert, pour Y∈FY \in F, est atteinte en un unique Y0=pF(B)Y_{0} = p_{F}(B). Par le théorème du rang, dim⁡Ker A=p−rgA=0\dim\mathrm{Ker}\, A = p - \mathrm{rg} A = 0 : l'application X↦AXX \mapsto AX est injective, et il existe un unique X0X_{0} tel que AX0=Y0AX_{0} = Y_{0}. Ce X0X_{0} convient ; si X1X_{1} convient aussi, AX1AX_{1} réalise le minimum sur FF, donc AX1=Y0=AX0AX_{1} = Y_{0} = AX_{0}, et X1=X0X_{1} = X_{0} par injectivité. il existe un unique X0 reˊalisant ∥AX0−B∥=d(B,Im A)\boxed{\text{il existe un unique } X_{0} \text{ réalisant } \lVert AX_{0} - B \rVert = d(B, \mathrm{Im}\, A)}

2. La démonstration de la question 1 de l'exercice 44 n'utilise pas que AA est carrée : pour A∈ℳn,p(ℝ)A \in \mathcal{M}_{n,p}(\mathbb{R}), on a encore (Im A)⊥=Ker (AT)(\mathrm{Im}\, A)^{\perp} = \mathrm{Ker}\,({A}^{T}). Par la proposition 10 (ii), AX0=pF(B)AX_{0} = p_{F}(B) équivaut à B−AX0∈F⊥B - AX_{0} \in F^{\perp}, donc à AT(B−AX0)=0,soitATAX0=ATB{A}^{T}(B - AX_{0}) = 0, \qquad\text{soit}\qquad \boxed{{A}^{T}AX_{0} = {A}^{T}B} Ce sont les équations normales de la méthode du cours. La matrice ATA∈ℳp(ℝ){A}^{T}A \in \mathcal{M}_{p}(\mathbb{R}) est inversible : la question 2 de l'exercice 44, dont la démonstration vaut aussi pour une matrice rectangulaire, donne Ker (ATA)=Ker A={0}\mathrm{Ker}\,({A}^{T}A) = \mathrm{Ker}\, A = \{0\}. Le système a donc une unique solution, qui est X0X_{0}.

3. La quantité à minimiser est ∥AX−B∥2\lVert AX - B \rVert^{2}, avec A=(111−121),B=(10−2),X=(xy).A = \begin{pmatrix} 1 & 1 \\ 1 & -1 \\ 2 & 1 \end{pmatrix}, \qquad B = \begin{pmatrix} 1 \\ 0 \\ -2 \end{pmatrix}, \qquad X = \begin{pmatrix} x \\ y \end{pmatrix}. Les deux colonnes de AA ne sont pas colinéaires, donc rgA=2\mathrm{rg} A = 2. On calcule ATA=(6223),ATB=(−3−1),{6x+2y=−32x+3y=−1{A}^{T}A = \begin{pmatrix} 6 & 2 \\ 2 & 3 \end{pmatrix}, \qquad {A}^{T}B = \begin{pmatrix} -3 \\ -1 \end{pmatrix}, \qquad \left\{ \begin{array}{l} 6x + 2y = -3 \\ 2x + 3y = -1 \end{array} \right. Le déterminant du système vaut 1414, et l'on trouve X0=(−12,0)X_{0} = \big(-\frac{1}{2}, 0\big). Le résidu R=B−AX0=(32,12,−1)R = B - AX_{0} = \big(\frac{3}{2}, \frac{1}{2}, -1\big) est orthogonal aux deux colonnes de AA, puisque 32+12−2=0\frac{3}{2} + \frac{1}{2} - 2 = 0 et 32−12−1=0\frac{3}{2} - \frac{1}{2} - 1 = 0 ✓. Le minimum vaut ∥R∥2\lVert R \rVert^{2} : inf⁡(x,y)∈ℝ2((x+y−1)2+(x−y)2+(2x+y+2)2)=94+14+1=72,atteint en (−12,0)\boxed{\inf_{(x, y) \in \mathbb{R}^{2}} \big((x + y - 1)^{2} + (x - y)^{2} + (2x + y + 2)^{2}\big) = \frac{9}{4} + \frac{1}{4} + 1 = \frac{7}{2}, \quad \text{atteint en } \Big(-\frac{1}{2}, 0\Big)} On retrouve la même valeur en remplaçant directement : (−32)2+(−12)2+12=72\big(-\frac{3}{2}\big)^{2} + \big(-\frac{1}{2}\big)^{2} + 1^{2} = \frac{7}{2} ✓. Le système AX=BAX = B de trois équations à deux inconnues n'a pas de solution ; X0X_{0} est celle qui « s'en approche le plus » au sens des moindres carrés.

À retenir. La proposition 14 du cours est le cas particulier où AA a pour colonnes (xi)(x_{i}) et (1,…,1)(1, \dots, 1), et où X=(a,b)X = (a, b). L'hypothèse « abscisses non toutes égales » y est exactement l'hypothèse rgA=2\mathrm{rg} A = 2.

Ouvrir dans l'atlas interactif →