תרגיל 1
לפניכם 4 שאלות אמריקאיות. עליכם לבחור בתשובה הנכונה ולנמק אותה .
נתונה בעית ריבועים פחותים x ‾ ∗ = arg min x ‾ ∥ A x ‾ − b ‾ ∥ 2 2 \underline{x}^*=\arg\underset{\underline{x}}{\min}\left\lVert A\underline{x}-\underline{b} \right\rVert_{2}^2 x ∗ = arg x min ∥ A x − b ∥ 2 2 שבה המטריצה A A A ידועה והוקטור b ‾ \underline{b} b לא ידוע.
A = ( − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ) b ‾ = ( ? ? ? ? ? ? ? ? ? ? ) A=\begin{pmatrix}
-4 & 1 & 1 & 1 \\
1 & -4 & 1 & 1 \\
1 & 1 & -4 & 1 \\
1 & 1 & 1 & -4 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1
\end{pmatrix} \qquad \qquad \underline{b}=\begin{pmatrix}
? \\
? \\
? \\
? \\
? \\
? \\
? \\
? \\
? \\
?
\end{pmatrix} A = − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 b = ? ? ? ? ? ? ? ? ? ?
מי מהוקטורים הבאים עשוי להיות וקטור השארית של הפתרון האופטימלי r ‾ ∗ = A x ‾ ∗ − b ‾ \underline{r}^*=A\underline{x}^*-\underline{b} r ∗ = A x ∗ − b ?
א. r ‾ ∗ = ( − 4 1 1 1 1 1 1 1 1 1 ) t \underline{r}^*=\begin{pmatrix}-4 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1\end{pmatrix}^t r ∗ = ( − 4 1 1 1 1 1 1 1 1 1 ) t
ב. r ‾ ∗ = ( 2 − 8 2 2 2 2 2 2 2 2 ) t \underline{r}^*=\begin{pmatrix}2 & -8 & 2 & 2 & 2 & 2 & 2 & 2 & 2 & 2\end{pmatrix}^t r ∗ = ( 2 − 8 2 2 2 2 2 2 2 2 ) t
ג. r ‾ ∗ = ( 4 4 4 4 4 4 4 4 4 − 16 ) t \underline{r}^*=\begin{pmatrix}4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & -16\end{pmatrix}^t r ∗ = ( 4 4 4 4 4 4 4 4 4 − 16 ) t
ד. r ‾ ∗ = ( 1 1 1 1 1 1 1 1 1 1 ) t \underline{r}^*=\begin{pmatrix}1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1\end{pmatrix}^t r ∗ = ( 1 1 1 1 1 1 1 1 1 1 ) t
ה. כל הוקטורים הנ"ל מתאימים להיות r ‾ ∗ \underline{r}^* r ∗ .
תשובה: ג'
הוכחה:
לפי משפט:
x ‾ ∗ = A † b ‾ = ( A t A ) − 1 A t b ‾ \underline{x}^*=A^{\dagger}\underline{b}=(A^tA)^{-1}A^t\underline{b} x ∗ = A † b = ( A t A ) − 1 A t b
לכן מתקיים:
A t A x ‾ ∗ − A t b ‾ = 0 ⟹ A t ( A x ‾ ∗ − b ‾ ) = 0 ⟹ A t r ‾ ∗ = 0 A^tA\underline{x}^*-A^t\underline{b}=0 \implies A^t(A\underline{x}^*-\underline{b})=0 \implies A^t \underline{r}^*=0 A t A x ∗ − A t b = 0 ⟹ A t ( A x ∗ − b ) = 0 ⟹ A t r ∗ = 0
כעת נמצא את r ‾ ∗ \underline{r}^* r ∗ על פי התנאי הנ"ל:
( − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 ) ( r 1 r 2 ⋮ r 10 ) = ( 0 0 ⋮ 0 ) \begin{pmatrix}
-4 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & -4 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & -4 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & -4 & 1 & 1 & 1 & 1 & 1 & 1
\end{pmatrix}\begin{pmatrix}
r_{1} \\
r_{2} \\
\vdots \\
r_{10}
\end{pmatrix}=\begin{pmatrix}
0 \\
0 \\
\vdots \\
0
\end{pmatrix} − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 r 1 r 2 ⋮ r 10 = 0 0 ⋮ 0
( − 4 r 1 + r 2 + ⋯ + r 10 r 1 − 4 r 2 + r 3 + ⋯ + r 10 r 1 + r 2 − 4 r 3 + r 4 + ⋯ + r 10 r 1 + r 2 + r 3 − 4 r 4 + r 5 + ⋯ + r 10 ) = ( 0 0 0 0 ) ⟺ { − 4 r 1 + r 2 + ⋯ + r 10 = 0 r 1 − 4 r 2 + r 3 + ⋯ + r 10 = 0 r 1 + r 2 − 4 r 3 + r 4 + ⋯ + r 10 = 0 r 1 + r 2 + r 3 − 4 r 4 + r 5 + ⋯ + r 10 = 0 \begin{pmatrix}
-4r_{1}+r_{2}+\dots+r_{10} \\
r_{1}-4r_{2}+r_{3}+\dots+r_{10} \\
r_{1}+r_{2}-4r_{3}+r_{4}+\dots+r_{10} \\
r_{1}+r_{2}+r_{3}-4r_{4}+r_{5}+\dots+r_{10}
\end{pmatrix}=\begin{pmatrix}
0 \\
0 \\
0 \\
0
\end{pmatrix}\iff \begin{cases}
-4r_{1}+r_{2}+\dots+r_{10}=0 \\
r_{1}-4r_{2}+r_{3}+\dots+r_{10}=0 \\
r_{1}+r_{2}-4r_{3}+r_{4}+\dots+r_{10}=0 \\
r_{1}+r_{2}+r_{3}-4r_{4}+r_{5}+\dots+r_{10}=0
\end{cases} − 4 r 1 + r 2 + ⋯ + r 10 r 1 − 4 r 2 + r 3 + ⋯ + r 10 r 1 + r 2 − 4 r 3 + r 4 + ⋯ + r 10 r 1 + r 2 + r 3 − 4 r 4 + r 5 + ⋯ + r 10 = 0 0 0 0 ⟺ ⎩ ⎨ ⎧ − 4 r 1 + r 2 + ⋯ + r 10 = 0 r 1 − 4 r 2 + r 3 + ⋯ + r 10 = 0 r 1 + r 2 − 4 r 3 + r 4 + ⋯ + r 10 = 0 r 1 + r 2 + r 3 − 4 r 4 + r 5 + ⋯ + r 10 = 0
⟺ { r 1 = r 2 + ⋯ + r 10 4 r 2 + ⋯ + r 10 4 − 4 r 2 + r 3 + ⋯ + r 10 = 0 ⟹ 15 r 2 = 5 r 3 + ⋯ + 5 r 10 ⟹ r 2 = r 3 + ⋯ + r 10 3 ⟹ r 1 = r 3 + ⋯ + r 10 3 + r 3 + ⋯ + r 10 4 = 4 r 3 + ⋯ + 4 r 10 12 = r 3 + ⋯ + r 10 3 = r 2 2 3 ( r 3 + ⋯ + r 10 ) − 4 r 3 + r 4 + ⋯ + r 10 = 0 ⟹ 10 r 3 = 5 r 4 + ⋯ + 5 r 10 ⟹ r 3 = r 4 + ⋯ + r 10 2 ⟹ r 2 = r 4 + ⋯ + r 10 2 + r 4 + ⋯ + r 10 3 = 3 r 4 + ⋯ + 3 r 10 6 = r 4 + ⋯ + r 10 2 = r 3 ⟹ r 1 = r 2 = r 4 + ⋯ + r 10 2 = r 3 3 2 ( r 4 + ⋯ + r 10 ) − 4 r 4 + r 5 + ⋯ + r 10 = 0 ⟹ 5 r 4 = 5 r 5 + ⋯ + 5 r 10 ⟹ r 4 = r 5 + ⋯ + r 10 ⟹ r 3 = r 5 + ⋯ + r 10 + r 5 + ⋯ + r 10 2 = 2 r 5 + ⋯ + 2 r 10 2 = r 5 + ⋯ + r 10 = r 4 ⟹ r 1 = r 2 = r 3 = r 4 = r 5 + ⋯ + r 10 \iff \begin{cases}
r_{1}=\frac{r_{2}+\dots+r_{10}}{4} \\
\frac{r_{2}+\dots+r_{10}}{4}-4r_{2}+r_{3}+\dots+r_{10}=0\implies 15r_{2}=5r_{3}+\dots+5r_{10}\implies r_{2}=\frac{r_{3}+\dots+r_{10}}{3} \\
\implies r_{1}=\frac{\frac{r_{3}+\dots+r_{10}}{3}+r_{3}+\dots +r_{10}}{4}=\frac{4r_{3}+\dots+4r_{10}}{12}=\frac{r_{3}+\dots+r_{10}}{3}=r_{2} \\
\frac{2}{3}(r_{3}+\dots+r_{10})-4r_{3}+r_{4}+\dots+r_{10}=0\implies 10r_{3}=5r_{4}+\dots+5r_{10}\implies r_{3}=\frac{r_{4}+\dots+r_{10}}{2} \\
\implies r_{2}=\frac{\frac{r_{4}+\dots+r_{10}}{2}+r_{4}+\dots+r_{10}}{3}=\frac{3r_{4}+\dots+3r_{10}}{6}=\frac{r_{4}+\dots+r_{10}}{2}=r_{3} \\
\implies r_{1}=r_{2}=\frac{r_{4}+\dots+r_{10}}{2}=r_{3} \\
\frac{3}{2}(r_{4}+\dots+r_{10})-4r_{4}+r_{5}+\dots+r_{10}=0\implies 5r_{4}=5r_{5}+\dots+5r_{10}\implies r_{4}=r_{5}+\dots+r_{10} \\
\implies r_{3}=\frac{r_{5}+\dots+r_{10}+r_{5}+\dots+r_{10}}{2}=\frac{2r_{5}+\dots+2r_{10}}{2}=r_{5}+\dots+r_{10}=r_{4} \\
\implies r_{1}=r_{2}=r_{3}=r_{4}=r_{5}+\dots+r_{10}
\end{cases} ⟺ ⎩ ⎨ ⎧ r 1 = 4 r 2 + ⋯ + r 10 4 r 2 + ⋯ + r 10 − 4 r 2 + r 3 + ⋯ + r 10 = 0 ⟹ 15 r 2 = 5 r 3 + ⋯ + 5 r 10 ⟹ r 2 = 3 r 3 + ⋯ + r 10 ⟹ r 1 = 4 3 r 3 + ⋯ + r 10 + r 3 + ⋯ + r 10 = 12 4 r 3 + ⋯ + 4 r 10 = 3 r 3 + ⋯ + r 10 = r 2 3 2 ( r 3 + ⋯ + r 10 ) − 4 r 3 + r 4 + ⋯ + r 10 = 0 ⟹ 10 r 3 = 5 r 4 + ⋯ + 5 r 10 ⟹ r 3 = 2 r 4 + ⋯ + r 10 ⟹ r 2 = 3 2 r 4 + ⋯ + r 10 + r 4 + ⋯ + r 10 = 6 3 r 4 + ⋯ + 3 r 10 = 2 r 4 + ⋯ + r 10 = r 3 ⟹ r 1 = r 2 = 2 r 4 + ⋯ + r 10 = r 3 2 3 ( r 4 + ⋯ + r 10 ) − 4 r 4 + r 5 + ⋯ + r 10 = 0 ⟹ 5 r 4 = 5 r 5 + ⋯ + 5 r 10 ⟹ r 4 = r 5 + ⋯ + r 10 ⟹ r 3 = 2 r 5 + ⋯ + r 10 + r 5 + ⋯ + r 10 = 2 2 r 5 + ⋯ + 2 r 10 = r 5 + ⋯ + r 10 = r 4 ⟹ r 1 = r 2 = r 3 = r 4 = r 5 + ⋯ + r 10
⟺ r ‾ ∗ = ( r 5 + ⋯ + r 10 r 5 + ⋯ + r 10 r 5 + ⋯ + r 10 r 5 + ⋯ + r 10 r 5 r 6 r 7 r 8 r 9 r 10 ) \iff \underline{r}^*=\begin{pmatrix}
r_{5}+\dots+r_{10} \\
r_{5}+\dots+r_{10} \\
r_{5}+\dots+r_{10} \\
r_{5}+\dots+r_{10} \\
r_{5} \\
r_{6} \\
r_{7} \\
r_{8} \\
r_{9} \\
r_{10}
\end{pmatrix} ⟺ r ∗ = r 5 + ⋯ + r 10 r 5 + ⋯ + r 10 r 5 + ⋯ + r 10 r 5 + ⋯ + r 10 r 5 r 6 r 7 r 8 r 9 r 10
כעת, לאחר שמצאנו את כל התנאים על r ‾ ∗ \underline{r}^* r ∗ נרצה לראות אילו מהתשובות מתאימה:
התשובה הראשונה מקיימת 1 + 1 + 1 + 1 + 1 + 1 = 6 ≠ 1 ≠ − 4 1+1+1+1+1+1=6\neq 1 \neq -4 1 + 1 + 1 + 1 + 1 + 1 = 6 = 1 = − 4 ולכן היא לא נכונה.
התשובה השנייה מקיימת 2 + 2 + 2 + 2 + 2 + 2 = 12 ≠ 2 ≠ − 8 2+2+2+2+2+2=12\neq{2} \neq -8 2 + 2 + 2 + 2 + 2 + 2 = 12 = 2 = − 8 ולכן היא לא נכונה.
התשובה השלישית מקיימת: − 16 + 4 + 4 + 4 + 4 + 4 = 4 -16+4+4+4+4+4=4 − 16 + 4 + 4 + 4 + 4 + 4 = 4 ולכן היא התשובה הנכונה
∎
נתונה לנו המטריצה הבאה:
A = ( 1 0 1 2 1 0 1 0 1 2 1 0 1 0 1 2 1 0 1 0 1 2 1 0 ) A=\begin{pmatrix}
1 & 0 & 1 \\
2 & 1 & 0 \\
1 & 0 & 1 \\
2 & 1 & 0 \\
1 & 0 & 1 \\
2 & 1 & 0 \\
1 & 0 & 1 \\
2 & 1 & 0
\end{pmatrix} A = 1 2 1 2 1 2 1 2 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0
ברצוננו למצוא וקטור b ‾ \underline{b} b שעבורו השגיאה של הפתרון האופטימלי לבעיית הריבועים הפחותים תהיה
min x ‾ ∥ A x ‾ − b ‾ ∥ 2 2 = 0 \underset{\underline{x}}{\min}\left\lVert A\underline{x}-\underline{b} \right\rVert _{2}^2=0 x min ∥ A x − b ∥ 2 2 = 0
והפתרון יהיה יחיד .
מי מהוקטורים הבאים עונה על שתי הדרישות?
א. b ‾ = ( 0 1 0 1 1 0 1 0 ) t \underline{b}=\begin{pmatrix}0 & 1 & 0 & 1 & 1 & 0 & 1 & 0\end{pmatrix}^t b = ( 0 1 0 1 1 0 1 0 ) t
ב. b ‾ = ( 0 0 0 0 1 1 − 1 − 1 ) t \underline{b}=\begin{pmatrix}0 & 0 & 0 & 0 & 1 & 1 & -1 & -1\end{pmatrix}^t b = ( 0 0 0 0 1 1 − 1 − 1 ) t
ג. b ‾ = ( 1 0 − 1 0 1 0 − 1 0 ) t \underline{b}=\begin{pmatrix}1 & 0 & -1 & 0 & 1 & 0 & -1 & 0\end{pmatrix}^t b = ( 1 0 − 1 0 1 0 − 1 0 ) t
ד. b ‾ = ( 1 2 3 4 5 6 7 8 ) t \underline{b}=\begin{pmatrix}1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\end{pmatrix}^t b = ( 1 2 3 4 5 6 7 8 ) t
ה. לא קיים וקטור b ‾ \underline{b} b שעונה על שתי הדרישות.
תשובה: ה'
הוכחה:
הפתרון יחיד ⟺ \iff ⟺ המטריצה A t A A^tA A t A היא סימטרית וחיובית מוגדרת. נבדוק זאת:
A t A = ( 1 2 1 2 1 2 1 2 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 ) ( 1 0 1 2 1 0 1 0 1 2 1 0 1 0 1 2 1 0 1 0 1 2 1 0 ) = ( 1 + 4 + 1 + 4 + 1 + 4 + 1 + 4 2 + 2 + 2 + 2 1 + 1 + 1 + 1 2 + 2 + 2 + 2 1 + 1 + 1 + 1 0 1 + 1 + 1 + 1 0 1 + 1 + 1 + 1 ) = ( 20 8 4 8 4 0 4 0 4 ) \begin{align*}
A^tA&=\begin{pmatrix}
1 & 2 & 1 & 2 & 1 & 2 & 1 & 2 \\
0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 \\
1 & 0 & 1 & 0 & 1 & 0 & 1 & 0
\end{pmatrix}\begin{pmatrix}
1 & 0 & 1 \\
2 & 1 & 0 \\
1 & 0 & 1 \\
2 & 1 & 0 \\
1 & 0 & 1 \\
2 & 1 & 0 \\
1 & 0 & 1 \\
2 & 1 & 0
\end{pmatrix} \\
&=\begin{pmatrix}
1+4+1+4+1+4+1+4 & 2+2+2+2 & 1+1+1+1 \\
2+2+2+2 & 1+1+1+1 & 0 \\
1+1+1+1 & 0 & 1+1+1+1
\end{pmatrix} \\
&=\begin{pmatrix}
20 & 8 & 4 \\
8 & 4 & 0 \\
4 & 0 & 4
\end{pmatrix}
\end{align*} A t A = 1 0 1 2 1 0 1 0 1 2 1 0 1 0 1 2 1 0 1 0 1 2 1 0 1 2 1 2 1 2 1 2 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 = 1 + 4 + 1 + 4 + 1 + 4 + 1 + 4 2 + 2 + 2 + 2 1 + 1 + 1 + 1 2 + 2 + 2 + 2 1 + 1 + 1 + 1 0 1 + 1 + 1 + 1 0 1 + 1 + 1 + 1 = 20 8 4 8 4 0 4 0 4
המטריצה סימטרית.
המטריצה תהיה חיובית מוגדרת ⟺ \iff ⟺ עמודותיה בת"ל.
נשים לב כי העמודה הראשונה ניתנת להרכבה מהעמודה השנייה והשלישית ולכן הן לא בת"ל.
לכן, המטריצה לא חיובית מוגדרת ולכן לא קיים וקטור b ‾ \underline{b} b שעונה על שתי הדרישות .
∎
נתונה בעיית ריבועים פחותים כאשר:
A = ( − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ) b ‾ = ( − 3 2 2 2 − 3 2 2 2 2 2 ) A=\begin{pmatrix}
-4 & 1 & 1 & 1 \\
1 & -4 & 1 & 1 \\
1 & 1 & -4 & 1 \\
1 & 1 & 1 & -4 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1
\end{pmatrix} \qquad \qquad \underline{b}=\begin{pmatrix}
-3 \\
2 \\
2 \\
2 \\
-3 \\
2 \\
2 \\
2 \\
2 \\
2
\end{pmatrix} A = − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 b = − 3 2 2 2 − 3 2 2 2 2 2
חשבו את ערך השגיאה המינימלית.
א. min x ‾ ∥ A x ‾ − b ‾ ∥ 2 2 = 0 \underset{\underline{x}}{\min}\left\lVert A\underline{x}-\underline{b} \right\rVert_{2}^2=0 x min ∥ A x − b ∥ 2 2 = 0
ב. min x ‾ ∥ A x ‾ − b ‾ ∥ 2 2 = 25 \underset{\underline{x}}{\min}\left\lVert A\underline{x}-\underline{b} \right\rVert_{2}^2=25 x min ∥ A x − b ∥ 2 2 = 25
ג. min x ‾ ∥ A x ‾ − b ‾ ∥ 2 2 = 9 \underset{\underline{x}}{\min}\left\lVert A\underline{x}-\underline{b} \right\rVert_{2}^2=9 x min ∥ A x − b ∥ 2 2 = 9
ד. min x ‾ ∥ A x ‾ − b ‾ ∥ 2 2 = 16 \underset{\underline{x}}{\min}\left\lVert A\underline{x}-\underline{b} \right\rVert_{2}^2=16 x min ∥ A x − b ∥ 2 2 = 16
ה. min x ‾ ∥ A x ‾ − b ‾ ∥ 2 2 = 36 \underset{\underline{x}}{\min}\left\lVert A\underline{x}-\underline{b} \right\rVert_{2}^2=36 x min ∥ A x − b ∥ 2 2 = 36
תשובה: ב'
הוכחה:
דבר ראשון, ניתן לראות כי עמודות A A A בת"ל, שכן לפי משפט, אם A t A A^tA A t A הפיכה, העמודות של A A A בת"ל.
A t A = ( 25 0 0 0 0 25 0 0 0 0 25 0 0 0 0 25 ) = 25 I A^tA=\begin{pmatrix}
25 & 0 & 0 & 0 \\
0 & 25 & 0 & 0 \\
0 & 0 & 25 & 0 \\
0 & 0 & 0 & 25
\end{pmatrix}=25I A t A = 25 0 0 0 0 25 0 0 0 0 25 0 0 0 0 25 = 25 I
לכן, יהיה פתרון אחד לבעיית הריבועים הפחותים ונוכל למצוא אותו באמצעות המשוואה הנורמלית:
x ‾ ∗ = A † b ‾ \underline{x}^*=A^{\dagger}\underline{b} x ∗ = A † b
A t A = 25 I ⟹ ( A t A ) − 1 = 1 25 ( I ) − 1 = 1 25 I A^tA=25I \implies (A^tA)^{-1}=\frac{1}{25}(I)^{-1}=\frac{1}{25}I A t A = 25 I ⟹ ( A t A ) − 1 = 25 1 ( I ) − 1 = 25 1 I
A † = 1 25 ( 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 ) ( − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 ) \begin{align*}
A^{\dagger}&=\frac{1}{25}\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1
\end{pmatrix}\begin{pmatrix}
-4 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & -4 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & -4 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & -4 & 1 & 1 & 1 & 1 & 1 & 1
\end{pmatrix}
\end{align*} A † = 25 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
x ‾ ∗ = A † b ‾ = 1 25 ( − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 ) ( − 3 2 2 2 − 3 2 2 2 2 2 ) = 1 25 ( 12 − 3 + 2 ⋅ 8 − 6 − 8 + 2 ⋅ 7 − 6 − 8 + 2 ⋅ 7 − 6 − 8 + 2 ⋅ 7 ) = 1 25 ( 25 0 0 0 ) = ( 1 0 0 0 ) \begin{align*}
\underline{x}^*&=A^{\dagger}\underline{b}=\frac{1}{25}\begin{pmatrix}
-4 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & -4 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & -4 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
1 & 1 & 1 & -4 & 1 & 1 & 1 & 1 & 1 & 1
\end{pmatrix}\begin{pmatrix}
-3 \\
2 \\
2 \\
2 \\
-3 \\
2 \\
2 \\
2 \\
2 \\
2
\end{pmatrix}=\frac{1}{25}\begin{pmatrix}
12-3+2\cdot 8 \\
-6-8+2\cdot 7 \\
-6-8+2\cdot 7 \\
-6-8+2\cdot 7
\end{pmatrix} \\
&=\frac{1}{25}\begin{pmatrix}
25 \\
0 \\
0 \\
0
\end{pmatrix}=\begin{pmatrix}
1 \\
0 \\
0 \\
0
\end{pmatrix}
\end{align*} x ∗ = A † b = 25 1 − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 − 3 2 2 2 − 3 2 2 2 2 2 = 25 1 12 − 3 + 2 ⋅ 8 − 6 − 8 + 2 ⋅ 7 − 6 − 8 + 2 ⋅ 7 − 6 − 8 + 2 ⋅ 7 = 25 1 25 0 0 0 = 1 0 0 0
כעת נוכל לפתור את המשוואה המקורית:
r ‾ ∗ = A x ‾ ∗ − b ‾ = ( − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ) ( 1 0 0 0 ) − ( − 3 2 2 2 − 3 2 2 2 2 2 ) = ( − 4 1 1 1 1 1 1 1 1 1 ) − ( − 3 2 2 2 − 3 2 2 2 2 2 ) = ( − 1 − 1 − 1 − 1 4 − 1 − 1 − 1 − 1 − 1 ) \begin{align*}
\underline{r}^*&=A\underline{x}^*-\underline{b}=\begin{pmatrix}
-4 & 1 & 1 & 1 \\
1 & -4 & 1 & 1 \\
1 & 1 & -4 & 1 \\
1 & 1 & 1 & -4 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1 \\
1 & 1 & 1 & 1
\end{pmatrix}\begin{pmatrix}
1 \\
0 \\
0 \\
0
\end{pmatrix}-\begin{pmatrix}
-3 \\
2 \\
2 \\
2 \\
-3 \\
2 \\
2 \\
2 \\
2 \\
2
\end{pmatrix}=\begin{pmatrix}
-4 \\
1 \\
1 \\
1 \\
1 \\
1 \\
1 \\
1 \\
1 \\
1
\end{pmatrix}-\begin{pmatrix}
-3 \\
2 \\
2 \\
2 \\
-3 \\
2 \\
2 \\
2 \\
2 \\
2
\end{pmatrix} \\
&=\begin{pmatrix}
-1 \\
-1 \\
-1 \\
-1 \\
4 \\
-1 \\
-1 \\
-1 \\
-1 \\
-1
\end{pmatrix}
\end{align*} r ∗ = A x ∗ − b = − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 1 1 1 − 4 1 1 1 1 1 1 1 0 0 0 − − 3 2 2 2 − 3 2 2 2 2 2 = − 4 1 1 1 1 1 1 1 1 1 − − 3 2 2 2 − 3 2 2 2 2 2 = − 1 − 1 − 1 − 1 4 − 1 − 1 − 1 − 1 − 1
כעת נוכל למצוא את הפתרון הסופי:
∥ A x ‾ ∗ − b ‾ ∥ 2 2 = ∥ r ‾ ∗ ∥ 2 2 = r ‾ ∗ t r ‾ ∗ = ( − 1 − 1 − 1 − 1 4 − 1 − 1 − 1 − 1 − 1 ) ( − 1 − 1 − 1 − 1 4 − 1 − 1 − 1 − 1 − 1 ) = 1 + 1 + 1 + 1 + 16 + 1 + 1 + 1 + 1 + 1 = 16 + 4 + 5 = 25 \begin{align*}
\left\lVert A\underline{x}^*-\underline{b} \right\rVert _{2}^2&=\left\lVert \underline{r}^* \right\rVert _{2}^2={\underline{r}^*}^t\underline{r}^*=\begin{pmatrix}
-1 & -1 & -1 & -1 & 4 & -1 & -1 & -1 & -1 & -1
\end{pmatrix}\begin{pmatrix}
-1 \\
-1 \\
-1 \\
-1 \\
4 \\
-1 \\
-1 \\
-1 \\
-1 \\
-1
\end{pmatrix} \\
&=1+1+1+1+16+1+1+1+1+1=16+4+5=25
\end{align*} ∥ A x ∗ − b ∥ 2 2 = ∥ r ∗ ∥ 2 2 = r ∗ t r ∗ = ( − 1 − 1 − 1 − 1 4 − 1 − 1 − 1 − 1 − 1 ) − 1 − 1 − 1 − 1 4 − 1 − 1 − 1 − 1 − 1 = 1 + 1 + 1 + 1 + 16 + 1 + 1 + 1 + 1 + 1 = 16 + 4 + 5 = 25
וזוהי בדיוק התשובה :)
∎
נתונה בעיית ריבועים פחותים.
נתון שקיים וקטור c ‾ \underline{c} c שעבורו למערכת המשוואות הלא הומגונית A x ‾ = c ‾ A\underline{x}=\underline{c} A x = c קיים פתרון יחיד.
בנוסף, נתון ש-b ‾ \underline{b} b אינו שייך למרחב הנפרש מעמודות A A A .
יהי x ‾ ∗ \underline{x}^* x ∗ פתרון לבעיית הריבועים הפחותים. נסמן את השארית: r ‾ ∗ = A x ‾ ∗ − b ‾ \underline{r}^*=A\underline{x}^*-\underline{b} r ∗ = A x ∗ − b ונסמן את השגיאה: e ‾ ∗ = A t r ‾ ∗ \underline{e}^*=A^t\underline{r}^* e ∗ = A t r ∗ .
סמנו את הטענה הנכונה:
א. לבעיית הריבועים הפחותים יש פתרון יחיד ובנוסף מתקיים e ‾ ∗ ≠ 0 , r ‾ ∗ ≠ 0 \underline{e}^* \neq 0,\underline{r}^* \neq 0 e ∗ = 0 , r ∗ = 0 .
ב. לבעיית הריבועים הפחותים יש פתרון יחיד ובנוסף מתקיים e ‾ ∗ = 0 , r ‾ ∗ ≠ 0 \underline{e}^* = 0,\underline{r}^* \neq 0 e ∗ = 0 , r ∗ = 0 .
ג. לבעיית הריבועים הפחותים יש פתרון יחיד ובנוסף מתקיים e ‾ ∗ = 0 , r ‾ ∗ = 0 \underline{e}^* = 0,\underline{r}^* = 0 e ∗ = 0 , r ∗ = 0 .
ד. לבעיית הריבועים הפחותים יש ∞ \infty ∞ פתרונות ובנוסף מתקיים e ‾ ∗ = 0 , r ‾ ∗ = 0 \underline{e}^*=0,\underline{r}^*=0 e ∗ = 0 , r ∗ = 0 .
ה. לבעיית הריבועים הפחותים יש ∞ \infty ∞ פתרונות ובנוסף מתקיים e ‾ ∗ = 0 , r ‾ ∗ ≠ 0 \underline{e}^*=0,\underline{r}^* \neq0 e ∗ = 0 , r ∗ = 0 .
תשובה: ב'
הוכחה:
נתון כי b ‾ ∉ c o l A \underline{b} \not\in colA b ∈ co l A ולכן, לפי משפט, למערכת A x ‾ = b ‾ A\underline{x}=\underline{b} A x = b אין פתרון.
קיים וקטור עבורו למערכת יש פתרון יחיד ולכן בהכרח עמודות A A A בת"ל.
לכן, לבעיית הריבועים הפחותים עם A A A ו-b ‾ \underline{b} b יהיה פתרון יחיד אך בו, מכיוון שאין פתרון במקור, r ‾ ∗ ≠ 0 \underline{r}^*\neq 0 r ∗ = 0 .
אם A t r ‾ ∗ = 0 A^t\underline{r}^*=0 A t r ∗ = 0 אזי וקטור השארית מאונך למרחב הפתרונות. לפי הגדרת בעיית הריבועים הפחותים והפתרון, זה תמיד מתקיים ולכן e ‾ ∗ = 0 \underline{e}^*=0 e ∗ = 0 תמיד.
∎
תרגיל 2
נתונה פונקציה בשני משתנים:
f ( x 1 , x 2 ) = ( x 1 + 30 ) 2 + ( x 1 + x 2 − 20 ) 2 + ( x 1 + 2 x 2 − 15 ) 2 + ( x 1 + 3 x 2 ) 2 + ( x 1 − 6 x 2 ) 2 f(x_{1},x_{2})=(x_{1}+30)^2+(x_{1}+x_{2}-20)^2+(x_{1}+2x_{2}-15)^2+(x_{1}+3x_{2})^2+(x_{1}-6x_{2})^2 f ( x 1 , x 2 ) = ( x 1 + 30 ) 2 + ( x 1 + x 2 − 20 ) 2 + ( x 1 + 2 x 2 − 15 ) 2 + ( x 1 + 3 x 2 ) 2 + ( x 1 − 6 x 2 ) 2
מצאו את x 1 , x 2 x_{1},x_{2} x 1 , x 2 שמביאים את הפונקציה למינימום באמצעות הנגזרות החלקיות של f f f .
תזכורת: d d t ( a t − b ) 2 = 2 a ( a t − b ) \frac{d}{dt}(at-b)^2=2a(at-b) d t d ( a t − b ) 2 = 2 a ( a t − b ) שימו לב גם לסימן של b b b .
נגזור את הפונקציה ונמצא את ערכי ה-x 1 , x 2 x_{1},x_{2} x 1 , x 2 אשר יהוו מינימום:
∇ f ( x 1 , x 2 ) = ( 2 ( x 1 + 30 ) + 2 ( x 1 + x 2 − 20 ) + 2 ( x 1 + 2 x 2 − 15 ) + 2 ( x 1 + 3 x 2 ) + 2 ( x 1 − 6 x 2 ) 2 ( x 2 + x 1 − 20 ) + 4 ( x 1 + 2 x 2 − 15 ) + 6 ( x 1 + 3 x 2 ) − 12 ( x 1 − 6 x 2 ) ) = ( 10 x 1 + 60 − 40 − 30 100 x 2 − 100 ) = ( 0 0 ) ⟹ { 10 x 1 = 10 ⟹ x 1 = 1 100 x 2 = 100 ⟹ x 2 = 1 \begin{align*}
\nabla f(x_{1},x_{2})&=\begin{pmatrix}
2(x_{1}+30)+2(x_{1}+x_{2}-20)+2(x_{1}+2x_{2}-15)+2(x_{1}+3x_{2})+2(x_{1}-6x_{2}) \\
2(x_{2}+x_{1}-20)+4(x_{1}+2x_{2}-15)+6(x_{1}+3x_{2})-12(x_{1}-6x_{2})
\end{pmatrix} \\
&=\begin{pmatrix}
10x_{1}+60-40-30 \\
100x_{2}-100
\end{pmatrix}=\begin{pmatrix}
0 \\
0
\end{pmatrix} \\
\implies & \begin{cases}
10x_{1}=10 \implies x_{1}=1 \\
100x_{2}=100\implies x_{2}=1
\end{cases}
\end{align*} ∇ f ( x 1 , x 2 ) ⟹ = ( 2 ( x 1 + 30 ) + 2 ( x 1 + x 2 − 20 ) + 2 ( x 1 + 2 x 2 − 15 ) + 2 ( x 1 + 3 x 2 ) + 2 ( x 1 − 6 x 2 ) 2 ( x 2 + x 1 − 20 ) + 4 ( x 1 + 2 x 2 − 15 ) + 6 ( x 1 + 3 x 2 ) − 12 ( x 1 − 6 x 2 ) ) = ( 10 x 1 + 60 − 40 − 30 100 x 2 − 100 ) = ( 0 0 ) { 10 x 1 = 10 ⟹ x 1 = 1 100 x 2 = 100 ⟹ x 2 = 1
לכן, כדי להביא את הפונקציה למינימום נדרש ל-( x 1 x 2 ) = ( 1 1 ) \begin{pmatrix}x_{1}\\ x_{2}\end{pmatrix}=\begin{pmatrix}1\\ 1\end{pmatrix} ( x 1 x 2 ) = ( 1 1 ) .
נסחו את הבעית הבאת f f f למינימום כבעיית ריבועים פחותים.
מהם A , x ‾ , b ‾ A,\underline{x},\underline{b} A , x , b ?
נגדיר:
f 1 = ( x 1 + 30 ) , f 2 = ( x 1 + x 2 − 20 ) , f 3 = ( x 1 + 2 x 2 − 15 ) , f 4 = ( x 1 + 3 x 2 ) , f 5 = ( x 1 − 6 x 2 ) f_{1}=(x_{1}+30), \quad f_{2}=(x_{1}+x_{2}-20), \quad f_{3}=(x_{1}+2x_{2}-15), \quad f_{4}=(x_{1}+3x_{2}), \quad f_{5}=(x_{1}-6x_{2}) f 1 = ( x 1 + 30 ) , f 2 = ( x 1 + x 2 − 20 ) , f 3 = ( x 1 + 2 x 2 − 15 ) , f 4 = ( x 1 + 3 x 2 ) , f 5 = ( x 1 − 6 x 2 )
אזי מתקיים:
f ( x 1 , x 2 ) = f 1 2 + f 2 2 + f 3 2 + f 4 2 + f 5 2 f(x_{1},x_{2})=f^2_{1}+f^2_{2}+f^2_{3}+f^2_{4}+f^2_{5} f ( x 1 , x 2 ) = f 1 2 + f 2 2 + f 3 2 + f 4 2 + f 5 2
לכל 1 ≤ i ≤ 5 1\leq i\leq 5 1 ≤ i ≤ 5 מתקיים f i 2 ( x 1 , x 2 ) ≥ 0 f_{i}^2(x_{1},x_{2})\geq 0 f i 2 ( x 1 , x 2 ) ≥ 0 לכל x 1 , x 2 ∈ R x_{1},x_{2} \in \mathbb{R} x 1 , x 2 ∈ R . לכן, כדי להביא את f f f למינימום נדרש להביא את כל f i f_{i} f i כמה שיותר קרוב ל-0 עם אותם x 1 , x 2 x_{1},x_{2} x 1 , x 2 . כלומר, נרצה לבצע f i = 0 f_{i}=0 f i = 0 . נעשה זאת באמצעות ריבועים פחותים. נגדיר יצוג וקטורי לכל פונקציה כזו עם בסיס B = { x 1 , x 2 , 1 } B=\left\{ x_{1},x_{2},1 \right\} B = { x 1 , x 2 , 1 } כך:
[ f 1 ] B = ( 1 0 30 ) [ f 2 ] B = ( 1 1 − 20 ) [ f 3 ] B = ( 1 2 − 15 ) [ f 4 ] B = ( 1 3 0 ) [ f 5 ] B = ( 1 − 6 0 ) [f_{1}]_{B}=\begin{pmatrix}
1 \\
0 \\
30
\end{pmatrix} \quad [f_{2}]_{B}=\begin{pmatrix}
1 \\
1 \\
-20
\end{pmatrix} \quad [f_{3}]_{B}=\begin{pmatrix}
1 \\
2 \\
-15
\end{pmatrix} \quad [f_{4}]_{B}=\begin{pmatrix}
1 \\
3 \\
0
\end{pmatrix} \quad [f_{5}]_{B}=\begin{pmatrix}
1 \\
-6 \\
0
\end{pmatrix} [ f 1 ] B = 1 0 30 [ f 2 ] B = 1 1 − 20 [ f 3 ] B = 1 2 − 15 [ f 4 ] B = 1 3 0 [ f 5 ] B = 1 − 6 0
כעת, נציב את וקטורים האלו במטריצה ליצירת מערכת משוואות הומוגנית - שכן אנו רוצים x 1 , x 2 x_{1},x_{2} x 1 , x 2 יחידים לכל הפונקציות הללו.
( A ∣ b ~ ‾ ) = ( 1 0 30 0 1 1 − 20 0 1 2 − 15 0 1 3 0 0 1 − 6 0 0 ) (A|\underline{\tilde{b}})=\left(\begin{array}{ccc|c}
1 & 0 & 30 & 0 \\
1 & 1 & -20 & 0\\
1 & 2 & -15 & 0 \\
1 & 3 & 0 & 0 \\
1 & -6 & 0 & 0
\end{array}\right) ( A ∣ b ~ ) = 1 1 1 1 1 0 1 2 3 − 6 30 − 20 − 15 0 0 0 0 0 0 0
נוכל להעביר את המקדמים של 1 1 1 לצד השני ליצירת b ‾ \underline{b} b כך:
( A ∣ b ‾ ) = ( 1 0 − 30 1 1 20 1 2 15 1 3 0 1 − 6 0 ) (A|\underline{b})=\left(\begin{array}{cc|c}
1 & 0 & -30 \\
1 & 1 & 20 \\
1 & 2 & 15 \\
1 & 3 & 0 \\
1 & -6 & 0
\end{array}\right) ( A ∣ b ) = 1 1 1 1 1 0 1 2 3 − 6 − 30 20 15 0 0
נגדיר כעת במדוייק:
A = ( 1 0 1 1 1 2 1 3 1 − 6 ) b ‾ = ( − 30 20 15 0 0 ) x ‾ = ( x 1 x 2 ) A=\begin{pmatrix}
1 & 0 \\
1 & 1 \\
1 & 2 \\
1 & 3 \\
1 & -6
\end{pmatrix} \quad \quad \underline{b}=\begin{pmatrix}
-30 \\
20 \\
15 \\
0 \\
0
\end{pmatrix} \quad \quad \underline{x}=\begin{pmatrix}
x_{1} \\
x_{2}
\end{pmatrix} A = 1 1 1 1 1 0 1 2 3 − 6 b = − 30 20 15 0 0 x = ( x 1 x 2 )
כעת נוכל להגדיר את בעיית הריבועים הפחותים שלנו:
p ( x ‾ ) = ∥ A x ‾ − b ‾ ∥ 2 2 = ∥ ( 1 0 1 1 1 2 1 3 1 − 6 ) ( x 1 x 2 ) − ( − 30 20 15 0 0 ) ∥ 2 2 p(\underline{x}) =\left\lVert A\underline{x}-\underline{b} \right\rVert _{2}^2=\left\lVert \begin{pmatrix}
1 & 0 \\
1 & 1 \\
1 & 2 \\
1 & 3 \\
1 & -6
\end{pmatrix}\begin{pmatrix}
x_{1} \\
x_{2}
\end{pmatrix}-\begin{pmatrix}
-30 \\
20 \\
15 \\
0 \\
0
\end{pmatrix} \right\rVert_{2}^2 p ( x ) = ∥ A x − b ∥ 2 2 = 1 1 1 1 1 0 1 2 3 − 6 ( x 1 x 2 ) − − 30 20 15 0 0 2 2
מצאו את הפתרון לבעית הריבועים הפחותים בדרך שלמדנו בכיתה.
נפתור את הבעייה לפי המשוואה הנורמלית כפי שלמדנו בהרצאה.
A t A = ( 1 1 1 1 1 0 1 2 3 − 6 ) ( 1 0 1 1 1 2 1 3 1 − 6 ) = ( 5 0 0 50 ) = 5 ( 1 0 0 10 ) A^tA=\begin{pmatrix}
1 & 1 & 1 & 1 & 1 \\
0 & 1 & 2 & 3 & -6
\end{pmatrix}\begin{pmatrix}
1 & 0 \\
1 & 1 \\
1 & 2 \\
1 & 3 \\
1 & -6
\end{pmatrix}=\begin{pmatrix}
5 & 0 \\
0 & 50
\end{pmatrix}=5\begin{pmatrix}
1 & 0 \\
0 & 10
\end{pmatrix} A t A = ( 1 0 1 1 1 2 1 3 1 − 6 ) 1 1 1 1 1 0 1 2 3 − 6 = ( 5 0 0 50 ) = 5 ( 1 0 0 10 )
( 5 0 1 0 0 50 0 1 ) R 1 = 1 5 R 1 R 2 = 1 50 R 2 → ( 1 0 1 5 0 0 1 0 1 50 ) ⟹ ( A t A ) − 1 = ( 1 5 0 0 1 50 ) = 1 5 ( 1 0 0 1 10 ) \left(\begin{array}{cc|cc}
5 & 0 & 1 & 0\\
0 & 50 & 0 & 1
\end{array}\right)\overrightarrow{\begin{matrix}
R_{1}=\frac{1}{5}R_{1} \\
R_{2}=\frac{1}{50}R_{2}
\end{matrix}}\left(\begin{array}{cc|cc}
1 & 0 & \frac{1}{5} & 0 \\
0 & 1 & 0 & \frac{1}{50}
\end{array}\right) \implies (A^tA)^{-1}=\begin{pmatrix}
\frac{1}{5} & 0 \\
0 & \frac{1}{50}
\end{pmatrix}=\frac{1}{5}\begin{pmatrix}
1 & 0 \\
0 & \frac{1}{10}
\end{pmatrix} ( 5 0 0 50 1 0 0 1 ) R 1 = 5 1 R 1 R 2 = 50 1 R 2 ( 1 0 0 1 5 1 0 0 50 1 ) ⟹ ( A t A ) − 1 = ( 5 1 0 0 50 1 ) = 5 1 ( 1 0 0 10 1 )
A † = ( A t A ) − 1 A t = 1 5 ( 1 0 0 1 10 ) ( 1 1 1 1 1 0 1 2 3 − 6 ) = 1 5 ( 1 1 1 1 1 0 1 10 2 10 3 10 − 6 10 ) A^{\dagger}=(A^tA)^{-1}A^t=\frac{1}{5}\begin{pmatrix}
1 & 0 \\
0 & \frac{1}{10}
\end{pmatrix}\begin{pmatrix}
1 & 1 & 1 & 1 & 1 \\
0 & 1 & 2 & 3 & -6
\end{pmatrix}=\frac{1}{5}\begin{pmatrix}
1 & 1 & 1 & 1 & 1 \\
0 & \frac{1}{10} & \frac{2}{10} & \frac{3}{10} & -\frac{6}{10}
\end{pmatrix} A † = ( A t A ) − 1 A t = 5 1 ( 1 0 0 10 1 ) ( 1 0 1 1 1 2 1 3 1 − 6 ) = 5 1 ( 1 0 1 10 1 1 10 2 1 10 3 1 − 10 6 )
x ‾ ∗ = A † b ‾ = 1 5 ( 1 1 1 1 1 0 1 10 2 10 3 10 − 6 10 ) ( − 30 20 15 0 0 ) = 1 5 ( − 30 + 20 + 15 2 + 3 ) = 1 5 ( 5 5 ) \underline{x}^*=A^{\dagger}\underline{b}=\frac{1}{5}\begin{pmatrix}
1 & 1 & 1 & 1 & 1 \\
0 & \frac{1}{10} & \frac{2}{10} & \frac{3}{10} & -\frac{6}{10}
\end{pmatrix}\begin{pmatrix}
-30 \\
20 \\
15 \\
0 \\
0
\end{pmatrix}=\frac{1}{5}\begin{pmatrix}
-30+20+15 \\
2+3
\end{pmatrix}=\frac{1}{5}\begin{pmatrix}
5 \\
5
\end{pmatrix} x ∗ = A † b = 5 1 ( 1 0 1 10 1 1 10 2 1 10 3 1 − 10 6 ) − 30 20 15 0 0 = 5 1 ( − 30 + 20 + 15 2 + 3 ) = 5 1 ( 5 5 )
⟹ x ‾ ∗ = ( x 1 x 2 ) = ( 1 1 ) \implies \underline{x}^*=\begin{pmatrix}
x_{1} \\
x_{2}
\end{pmatrix}=\begin{pmatrix}
1 \\
1
\end{pmatrix} ⟹ x ∗ = ( x 1 x 2 ) = ( 1 1 )
הפתרון זהה לפתרון מסעיף א' שזה טוב כי הם אמורים להיות זהים אם יש מינימום :)
הוכיחו בעזרת A A A כי קיים מינימום יחיד לבעיה.
הוכחה:
לפי משפט, יש מינימום יחיד K ⟺ K \iff K ⟺ היא מטריצה סימטרית וחיובית מוגדרת אשר מוגדרת להיות K = A t A K=A^tA K = A t A .
נשים לב כי בסעיף קודם קיבלנו:
K = A t A = ( 5 0 0 50 ) K=A^tA=\begin{pmatrix}
5 & 0 \\
0 & 50
\end{pmatrix} K = A t A = ( 5 0 0 50 )
המטריצה הזו היא בהחלט סימטרית וכעת נבדוק אם היא חיובית מוגדרת לפי הגדרה:
יהי x ‾ ≠ 0 \underline{x} \neq 0 x = 0 . אזי:
x ‾ t K x ‾ = ( x 1 x 2 ) ( 5 0 0 50 ) ( x 1 x 2 ) = ( 5 x 1 50 x 2 ) ( x 1 x 2 ) = 5 x 1 2 + 50 x 2 2 ≥ 0 \begin{align*}
\underline{x}^tK\underline{x}&= \begin{pmatrix}
x_{1} & x_{2}
\end{pmatrix}\begin{pmatrix}
5 & 0 \\
0 & 50
\end{pmatrix}\begin{pmatrix}
x_{1} \\
x_{2}
\end{pmatrix}=\begin{pmatrix}
5x_{1} & 50x_{2}
\end{pmatrix}\begin{pmatrix}
x_{1} \\
x_{2}
\end{pmatrix}=5x_{1}^2+50x_{2}^2 \geq 0
\end{align*} x t K x = ( x 1 x 2 ) ( 5 0 0 50 ) ( x 1 x 2 ) = ( 5 x 1 50 x 2 ) ( x 1 x 2 ) = 5 x 1 2 + 50 x 2 2 ≥ 0
נניח בשלילה כי x ‾ t K x ‾ = 0 \underline{x}^tK\underline{x}=0 x t K x = 0 אזי 5 x 1 2 + 50 x 2 2 = 0 5x_{1}^2+50x_{2}^2=0 5 x 1 2 + 50 x 2 2 = 0 ולכן, 5 x 1 2 = 0 ∧ 50 x 2 2 = 0 5x_{1}^2=0 \land 50x_{2}^2=0 5 x 1 2 = 0 ∧ 50 x 2 2 = 0 ולכן: x 1 = 0 ∧ x 2 = 0 x_{1}=0 \land x_{2}=0 x 1 = 0 ∧ x 2 = 0 ובכך x ‾ = 0 \underline{x}=0 x = 0 .
לכן, K ≻ 0 K \succ 0 K ≻ 0 ולכן, לפי המשפט, יש מינימום יחיד לבעיית הריבועים הפחותים בתרגיל.
∎
האם שינוי b ‾ \underline{b} b היה משנה את יחידות הפתרון? נמקו
המשפט הנ"ל שנלמד בהרצאה מציב תנאי יחיד על A A A על מנת שיהיה פתרון יחיד.
אם A t A A^tA A t A סימטרית וחיובית מוגדרת אזי יש פתרון יחיד לבעיה.
לכן, לא משנה מה b ‾ \underline{b} b עדיין יהיה פתרון יחיד לבעיית הריבועים הפחותים הנ"ל.
תרגיל 3
נתונות 2 בעיות מינימיזציה ריבועיות עם מטריצות A , C ∈ R m × n A,C \in \mathbb{R}^{m\times n} A , C ∈ R m × n ומטריצה אלכסונית בעלת איברים אי שליליים W ∈ R m × m W \in \mathbb{R}^{m\times m} W ∈ R m × m ווקטורים b ‾ , d ‾ ∈ R m \underline{b}, \underline{d} \in \mathbb{R}^{m} b , d ∈ R m וסקלר λ > 0 \lambda >0 λ > 0 .
בעיה א': min x ‾ ∈ R n ∥ A x ‾ − b ‾ ∥ 2 2 \underset{\underline{x} \in \mathbb{R}^n}{\min}\left\lVert A\underline{x}-\underline{b} \right\rVert_{2}^2 x ∈ R n min ∥ A x − b ∥ 2 2
בעיה ב': min x ‾ ∈ R n ∥ A x ‾ − b ‾ ∥ 2 2 + λ ∥ C x ‾ − d ‾ ∥ W 2 \underset{\underline{x} \in\mathbb{R}^n}{\min}\left\lVert A\underline{x}-\underline{b} \right\rVert_{2}^2+\lambda \left\lVert C\underline{x}-\underline{d} \right\rVert_{W}^2 x ∈ R n min ∥ A x − b ∥ 2 2 + λ ∥ C x − d ∥ W 2 . שימו לב ל-W W W ו-λ \lambda λ !
מהי קבוצת הפתרונות של בעיה א'?
מצאו קבוצה שניתן להציג בצורה { x ‾ ∈ R n ∣ K x ‾ = f ‾ } \left\{ \underline{x} \in \mathbb{R}^n | K\underline{x}=\underline{f} \right\} { x ∈ R n ∣ K x = f } שוקטור x ‾ \underline{x} x שייך אליה ⟺ \iff ⟺ הצבתו בביטוי מבעיה א' נותנת ערך מינימלי לביטוי.
קבוצת הפתרונות של בעיה א' הינה לפי משפט קבוצת הפתרונות של המשוואה הנורמלית:
A t A x ‾ = A t b ‾ A^tA\underline{x}=A^t\underline{b} A t A x = A t b
נסמן K = A t A K=A^tA K = A t A ו-f ‾ = A t b ‾ \underline{f}=A^t\underline{b} f = A t b ואז:
K x ‾ = f ‾ K\underline{x}=\underline{f} K x = f
מהי קבוצת הפתרונות של בעיה ב'?
הדרכה: ניתן לגזור את הביטוי בבעיה ב' ולהשוות אותו ל-0 0 0 . לשם כך ניתן למצוא K , f ‾ K,\underline{f} K , f מתאימים (שונים מאלו של הסעיף הקודם) שבאמצעותם ניתן לבטא את הביטוי בבעיה ב' בצורה x ‾ t K x ‾ − 2 x ‾ t f ‾ + c \underline{x}^tK\underline{x}-2\underline{x}^t\underline{f}+c x t K x − 2 x t f + c .
נגדיר:
p ( x ‾ ) = ∥ A x ‾ − b ‾ ∥ 2 2 + λ ∥ C x ‾ − d ‾ ∥ W 2 = ( A x ‾ − b ‾ ) t ( A x ‾ − b ‾ ) + λ ( C x ‾ − d ‾ ) t W ( C x ‾ − d ‾ ) = ( x ‾ t A t − b ‾ t ) ( A x ‾ − b ‾ ) + λ ( x ‾ t C t − d ‾ t ) W ( C x ‾ − d ‾ ) = x ‾ t A t A x ‾ − x ‾ t A t b ‾ − b ‾ t A x ‾ + b ‾ t b ‾ + λ ( x ‾ t C t W C x ‾ − x ‾ t C t W d ‾ − d ‾ t W C x ‾ + d ‾ t W d ‾ ) \begin{align*}
p(\underline{x})&=\left\lVert A\underline{x}-\underline{b} \right\rVert _{2}^2+\lambda \left\lVert C\underline{x}-\underline{d} \right\rVert _{W}^2=(A\underline{x}-\underline{b})^t(A\underline{x}-\underline{b})+\lambda(C\underline{x}-\underline{d})^tW(C\underline{x}-\underline{d}) \\
&=(\underline{x}^tA^t-\underline{b}^t)(A\underline{x}-\underline{b})+\lambda(\underline{x}^tC^t-\underline{d}^t)W(C\underline{x}-\underline{d}) \\
&=\underline{x}^tA^tA\underline{x}-\underline{x}^tA^t\underline{b}-\underline{b}^tA\underline{x}+\underline{b}^t\underline{b}+\lambda(\underline{x}^tC^tWC\underline{x}-\underline{x}^tC^tW\underline{d}-\underline{d}^tWC\underline{x}+\underline{d}^tW\underline{d})
\end{align*} p ( x ) = ∥ A x − b ∥ 2 2 + λ ∥ C x − d ∥ W 2 = ( A x − b ) t ( A x − b ) + λ ( C x − d ) t W ( C x − d ) = ( x t A t − b t ) ( A x − b ) + λ ( x t C t − d t ) W ( C x − d ) = x t A t A x − x t A t b − b t A x + b t b + λ ( x t C t W C x − x t C t W d − d t W C x + d t W d )
נשים לב כי x ‾ t A t b ‾ \underline{x}^tA^t\underline{b} x t A t b הוא סקלר שזהה ל-b ‾ t A x ‾ \underline{b}^tA\underline{x} b t A x שכן שחלוף סקלר שווה לעצמו. בהתאמה, x ‾ t C t W d ‾ = d ‾ t W C x ‾ \underline{x}^tC^tW\underline{d}=\underline{d}^tWC\underline{x} x t C t W d = d t W C x ולכן:
p ( x ‾ ) = x ‾ t A t A x ‾ − 2 x ‾ t A t b ‾ + b ‾ t b ‾ + λ x ‾ t C t W C x ‾ − 2 λ x ‾ t C t W d ‾ + λ d ‾ t W d ‾ = x ‾ t ( A t A + λ C t W C ) x ‾ − 2 x ‾ t ( A t b ‾ + λ C t W d ‾ ) + b ‾ t b ‾ + λ d ‾ t W d ‾ \begin{align*}
p(\underline{x})&=\underline{x}^tA^tA\underline{x}-2\underline{x}^tA^t\underline{b}+\underline{b}^t\underline{b}+\lambda \underline{x}^tC^tWC\underline{x}-2\lambda\underline{x}^tC^tW\underline{d}+\lambda\underline{d}^tW\underline{d} \\
&=\underline{x}^t(A^tA+\lambda C^tWC)\underline{x}-2\underline{x}^t(A^t\underline{b}+\lambda C^tW\underline{d})+\underline{b}^t\underline{b}+\lambda\underline{d}^tW\underline{d}
\end{align*} p ( x ) = x t A t A x − 2 x t A t b + b t b + λ x t C t W C x − 2 λ x t C t W d + λ d t W d = x t ( A t A + λ C t W C ) x − 2 x t ( A t b + λ C t W d ) + b t b + λ d t W d
כעת נגדיר:
K = A t A + λ C t W C , f ‾ = A t b ‾ + λ C t W d ‾ , c = b ‾ t b ‾ + λ d ‾ t W d ‾ K=A^tA+\lambda C^tWC, \quad \underline{f}=A^t\underline{b}+\lambda C^tW\underline{d}, \quad c=\underline{b}^t\underline{b}+\lambda\underline{d}^tW\underline{d} K = A t A + λ C t W C , f = A t b + λ C t W d , c = b t b + λ d t W d
קיבלנו: p ( x ‾ ) = x ‾ t K x ‾ − 2 x ‾ t f ‾ + c p(\underline{x})=\underline{x}^tK\underline{x}-2\underline{x}^t\underline{f}+c p ( x ) = x t K x − 2 x t f + c . נגזור את p ( x ) p(x) p ( x ) כעת למציאת המינמום:
∇ x ‾ p ( x ‾ ) = 2 K x ‾ − 2 f ‾ \nabla_{\underline{x}} p(\underline{x})= 2K\underline{x}-2\underline{f} ∇ x p ( x ) = 2 K x − 2 f
נשווה לאפס ונקבל:
2 K x ‾ = 2 f ‾ ⟹ K x ‾ = f ‾ 2K\underline{x}=2\underline{f} \implies K\underline{x}=\underline{f} 2 K x = 2 f ⟹ K x = f
לכן, קבוצת הפתרונות של בעיה ב' הינה:
{ x ‾ ( A t A + λ C t W C ) x ‾ = ( A t b ‾ + λ C t W d ‾ ) } \left\{ \begin{array}{c|c}
\underline{x} & (A^tA+\lambda C^tWC)\underline{x}=(A^t\underline{b}+\lambda C^tW\underline{d})
\end{array} \right\} { x ( A t A + λ C t W C ) x = ( A t b + λ C t W d ) }
מהו התנאי ההכרחי והמספיק ליחידות הפתרון לבעיה א'?
לפי משפט, לבעית ריבועים פחותים min x ‾ ∥ M x ‾ − v ‾ ∥ 2 2 \underset{\underline{x}}{\min}\left\lVert M\underline{x}-\underline{v} \right\rVert_{2}^2 x min ∥ M x − v ∥ 2 2 יש פתרון יחיד ⟺ \iff ⟺ המטריצה K ′ = M t M K'=M^tM K ′ = M t M הינה חיובית מוגדרת.
לפי משפט אחר, המטריצה K ′ K' K ′ חיובית מוגדרת ⟺ \iff ⟺ עמודות המטריצה M M M בת"ל.
במקרה של בעיה א', נדרוש שעמודות A A A יהיו בת"ל וזה יהיה התנאי ההכרחי והמספיק ליחידות הפתרון.
מהו התנאי ההכרחי והמספיק ליחידות הפתרון לבעיה ב'?
לפי מה שראינו בסעיף הנ"ל, נדרוש גם פה כי המטריצה K K K תהיה חיובית מוגדרת ונבדוק האם נוכל לפתח את התנאי על המטריצות שמרכיבות את K K K .
K = A t A + λ C t W C K=A^tA+\lambda C^tWC K = A t A + λ C t W C
נתון כי λ > 0 \lambda>0 λ > 0 ובנוסף כי W W W הינה אלכסונית בעלת איברים אי-שליליים ולכן אם נקח כל איבר באלכסון W W W ונהפוך אותו לשורש של עצמו נקבל מטריצה חדשה אותה נסמן W 1 2 W^{\frac{1}{2}} W 2 1 המקיימת W = W 1 2 W 1 2 W=W^{\frac{1}{2}}W^{\frac{1}{2}} W = W 2 1 W 2 1 ובנוסף, מכיוון שגם W 1 2 W^{\frac{1}{2}} W 2 1 אלכסונית היא מקיימת W 1 2 = ( W 1 2 ) t W^{\frac{1}{2}}=(W^{\frac{1}{2}})^t W 2 1 = ( W 2 1 ) t .
לכן:
K = A t A + ( λ C t W 1 2 ) ( λ W 1 2 C ) = A t A + ( λ W 1 2 C ) t ( λ W 1 2 C ) = ( A t ( λ W 1 2 C ) t ) ( A λ W 1 2 C ) K\!=\!\!A^tA\!+\!\!\left( \sqrt{ \lambda }C^tW^{\frac{1}{2}} \right)\!\!\left( \sqrt{ \lambda }W^{\frac{1}{2}}C \right)\!=\!A^tA+\!\!\left( \sqrt{ \lambda }W^{\frac{1}{2}}C \right)^t\!\!\left( \sqrt{ \lambda }W^{\frac{1}{2}}C \right)\!\!=\!\!\begin{pmatrix}
A^t & \left( \sqrt{ \lambda }W^{\frac{1}{2}}C \right)^t
\end{pmatrix}\!\!\begin{pmatrix}
A \\
\sqrt{ \lambda }W^{\frac{1}{2}}C
\end{pmatrix} K = A t A + ( λ C t W 2 1 ) ( λ W 2 1 C ) = A t A + ( λ W 2 1 C ) t ( λ W 2 1 C ) = ( A t ( λ W 2 1 C ) t ) ( A λ W 2 1 C )
נסמן: M = ( A λ W 1 2 C ) M=\begin{pmatrix}A\\ \sqrt{ \lambda }W^{\frac{1}{2}}C\end{pmatrix} M = ( A λ W 2 1 C ) ואז: K = M t M K=M^tM K = M t M .
לכן, נוכל לדרוש כי עמודות M M M יהיו בת"ל. כלומר, לכל סט סקלרים x 1 , … , x m ∈ R x_{1},\dots,x_{m}\in \mathbb{R} x 1 , … , x m ∈ R אשר נסמנם יחדיו x ‾ = ( x 1 x 2 ⋮ x m ) \underline{x}=\begin{pmatrix}x_{1}\\ x_{2} \\ \vdots \\ x_{m}\end{pmatrix} x = x 1 x 2 ⋮ x m מקיים:
M x ‾ = 0 M\underline{x}=0 M x = 0
(שזהו בדיוק הכפלת עמודות M M M בכל סקלר ואז סכימתם יחדיו בדיוק כמו בהגדרת צ"ל ובת"ל)
נוכל לחלק זאת למטריצות שהרכיבו את M M M כך:
M x ‾ = ( A λ W 1 2 C ) x ‾ = ( A x ‾ λ W 1 2 C x ‾ ) = ( 0 0 ) M\underline{x}=\begin{pmatrix}
A \\
\sqrt{ \lambda }W^{\frac{1}{2}}C
\end{pmatrix}\underline{x}=\begin{pmatrix}
A\underline{x} \\
\sqrt{ \lambda }W^{\frac{1}{2}}C\underline{x}
\end{pmatrix}=\begin{pmatrix}
0 \\
0
\end{pmatrix} M x = ( A λ W 2 1 C ) x = ( A x λ W 2 1 C x ) = ( 0 0 )
לכן מתקיים:
{ A x ‾ = 0 ⟺ x ‾ ∈ n u l l A λ W 1 2 C x ‾ = 0 ⟺ x ‾ ∈ n u l l ( λ W 1 2 C ) ⟺ x ‾ ∈ n u l l ( W 1 2 C ) \begin{cases}
A\underline{x}=0 \iff \underline{x} \in null A \\
\sqrt{ \lambda }W^{\frac{1}{2}}C\underline{x}=0 \iff \underline{x} \in null(\sqrt{ \lambda }W^{\frac{1}{2}}C)\iff \underline{x} \in null(W^{\frac{1}{2}}C)
\end{cases} { A x = 0 ⟺ x ∈ n u ll A λ W 2 1 C x = 0 ⟺ x ∈ n u ll ( λ W 2 1 C ) ⟺ x ∈ n u ll ( W 2 1 C )
אם עמודות M M M בת"ל אז מתקיים כי x ‾ \underline{x} x היחיד המקיים את הדרישות הללו הינו וקטור האפס ולכן:
לבעיית הריבועים הפחותים ב' יש רק פתרון אחד ⟺ \iff ⟺ מתקיים:
n u l l A ∩ n u l l ( W 1 2 C ) = { 0 } null A \cap null(W^{\frac{1}{2}}C) =\left\{ 0 \right\} n u ll A ∩ n u ll ( W 2 1 C ) = { 0 }
מהי קבוצת החיתוך של הקבוצות שמצאתם בסעיפים 1 − 2 1-2 1 − 2 ?
מצאו מטריצה K K K ווקטור f ‾ \underline{f} f מתאימים שבאמצעותם ניתן להציג את קבוצת החיתוך בצורה { x ‾ ∈ R n ∣ K x ‾ = f ‾ } \left\{ \underline{x} \in \mathbb{R}^n | K\underline{x}=\underline{f} \right\} { x ∈ R n ∣ K x = f } .
הדרכה: כאשר מחפשים וקטור x ‾ \underline{x} x שמקיים 2 מעכרות משוואות ליניאריות בו זמנית, ניתן לאחד אותן למערכת משוואות ליניארית אחת גדולה.
כדאי לפשט את מערכת המשוואות ע"י פעולות שורה בסיסיות, כדי לקבל תשובות פשוטות יותר לסעיפים הבאים.
בעצם נרצה למצוא את קבוצת הוקטורים המקיימת:
A t A x ‾ = A t b ‾ ∧ ( A t A + λ C t W C ) x ‾ = ( A t b ‾ + λ C t W d ‾ ) A^tA\underline{x}=A^t\underline{b}\;\; {\large \land}\;\; (A^tA+\lambda C^tWC)\underline{x}=(A^t\underline{b}+\lambda C^tW\underline{d}) A t A x = A t b ∧ ( A t A + λ C t W C ) x = ( A t b + λ C t W d )
מכיוון שזה מתקיים לאותו הוקטור נאחד את שתי המשוואות הללו לוקטורים:
( A t A A t A + λ C t W C ) x ‾ = ( A t b ‾ A t b ‾ + λ C t W d ‾ ) \begin{pmatrix}
A^tA \\
A^tA+\lambda C^tWC
\end{pmatrix}\underline{x}=\begin{pmatrix}
A^t\underline{b} \\
A^t\underline{b}+\lambda C^tW\underline{d}
\end{pmatrix} ( A t A A t A + λ C t W C ) x = ( A t b A t b + λ C t W d )
נשתמש בפעולת שורה על שני האגפים של: R 2 = R 2 − R 1 R_{2}=R_{2}-R_{1} R 2 = R 2 − R 1 ואז נקבל:
( A t A λ C t W C ) x ‾ = ( A t b ‾ λ C t W d ‾ ) \begin{pmatrix}
A^tA \\
\lambda C^tWC
\end{pmatrix}\underline{x}=\begin{pmatrix}
A^t\underline{b} \\
\lambda C^tW\underline{d}
\end{pmatrix} ( A t A λ C t W C ) x = ( A t b λ C t W d )
נשתמש כעת בעוד פעולת שורה בדמות R 2 = 1 λ R 2 R_{2}=\frac{1}{\lambda}R_{2} R 2 = λ 1 R 2 . אנו יכולים לעשות זאת כי λ > 0 \lambda>0 λ > 0 ובפרט λ ≠ 0 \lambda \neq 0 λ = 0 .
( A t A C t W C ) x ‾ = ( A t b ‾ C t W d ‾ ) \begin{pmatrix}
A^tA \\
C^tWC
\end{pmatrix}\underline{x}=\begin{pmatrix}
A^t\underline{b} \\
C^tW\underline{d}
\end{pmatrix} ( A t A C t W C ) x = ( A t b C t W d )
נגדיר:
K = ( A t A C t W C ) f ‾ = ( A t b ‾ C t W d ‾ ) K=\begin{pmatrix}
A^tA \\
C^tWC
\end{pmatrix} \qquad \qquad \underline{f}=\begin{pmatrix}
A^t\underline{b} \\
C^tW\underline{d}
\end{pmatrix} K = ( A t A C t W C ) f = ( A t b C t W d )
קבוצת החיתוך של הקבוצות מסעיף 1 ו-2 הינה:
{ x ‾ ( A t A C t W C ) x ‾ = ( A t b ‾ C t W d ‾ ) } = { x ‾ ∣ K x ‾ = f ‾ } \left\{ \begin{array}{c|c}
\underline{x} & \begin{pmatrix}
A^tA \\
C^tWC
\end{pmatrix}\underline{x}=\begin{pmatrix}
A^t\underline{b} \\
C^tW\underline{d}
\end{pmatrix}
\end{array} \right\}=\left\{ \underline{x} | K\underline{x}=\underline{f} \right\} { x ( A t A C t W C ) x = ( A t b C t W d ) } = { x ∣ K x = f }
מהו התנאי ההכרחי והמספיק לכך שקבוצת החיתוך תכיל וקטור אחד לפחות ?
נשים לב כי קיבלנו בסעיף קודם מערכת משוואות שכל x ‾ \underline{x} x שפותר אותה נמצא בקבוצת החיתוך. לכן, על מנת שקבוצת החיתוך תכיל וקטור אחד לפחות, נדרש שיהיה וקטור אחד לפחות שפותר את מערכת המשוואות הנ"ל.
לכן, לפי משפט מאלגברה אמ, על מנת שיהיה פתרון למערכת משוואות A x ‾ = b ‾ A\underline{x}=\underline{b} A x = b נדרש כי b ‾ ∈ c o l A \underline{b} \in colA b ∈ co l A .
נדרוש את תנאי זה אצלנו:
( A t b ‾ C t W d ‾ ) ∈ c o l ( A t A C t W C ) \begin{pmatrix}
A^t\underline{b} \\
C^tW\underline{d}
\end{pmatrix} \in col\begin{pmatrix}
A^tA \\
C^tWC
\end{pmatrix} ( A t b C t W d ) ∈ co l ( A t A C t W C )
זהו התנאי ההכרחי והמספיק על מנת שקבוצת החיתוך תכיל לפחות וקטור אחד.
מהו התנאי ההכרחי והמספיק לכך שקבוצת החיתוך תכיל וקטור אחד לכל היותר ?
הדרכה: נסחו תנאי על מטריצת הבלוקים ( K M ) \begin{pmatrix}K \\ M\end{pmatrix} ( K M ) שמצאתם בסעיף 5.
על מנת שקבוצת החיתוך תכיל וקטור אחד לכל היותר וקטור אחד נדרש כי עמודותיה של המטריצה V = ( A t A C t W C ) V=\begin{pmatrix}A^tA\\ C^tWC\end{pmatrix} V = ( A t A C t W C ) יהיו בת"ל ולכן, למערכת ההומוגנית יהיה בדיוק פתרון אחד והוא הטריויאלי(לפי הגדרת צ"ל ובת"ל).
לפי משפט, קבוצת הפתרונות של המערכת הלא הומוגנית יהיה הפתרון הכללי של ההומוגנית + הפתרון הפרטי של האי הומוגנית. מכיוון שהפתרון הכללי של ההומוגנית הוא 0, הפתרון הפרטי הוא היחיד שמשנה. אם קיים כזה, אזי יהיה פתרון אחד למערכת המשוואות. אם לא קיים פתרון כזה, אז יהיו אפס פתרונות למערכת המשוואות.
לכן, במצב בו עמודות V V V בת"ל בקבוצת החיתוך יהיה מקסימום וקטור אחד.
שאלה 4
עבור מטריצה A A A בעלת עמודות בת"ל , הגדרנו בשיעור את מטריצת ההטלה P A = A ( A t A ) − 1 A t P_{A}=A(A^tA)^{-1}A^t P A = A ( A t A ) − 1 A t . זו המטריצה שעבורה ההיטל של וקטור כלשהו b ‾ \underline{b} b על מרחב העמודות A A A הוא P A b ‾ P_{A}\underline{b} P A b .
שימו לב ש-A − 1 A^{-1} A − 1 לא בהכרח מוגדרת.
הוכיחו את הטענות הבאות:
המטריצה A A A אינוואריאנטית תחת כפל משמאל במטריצת ההטלה שלה, כלומר, P A A = A P_{A}A=A P A A = A .
הוכחה:
נשים לב כי A t A A^tA A t A הפיכה לא משנה מה A A A ולכן ( A t A ) − 1 ( A t A ) = I (A^tA)^{-1}(A^tA)=I ( A t A ) − 1 ( A t A ) = I ולכן:
P A A = A ( A t A ) − 1 ( A t A ) = A ⋅ I = A P_{A}A=A(A^tA)^{-1}(A^tA)=A\cdot I=A P A A = A ( A t A ) − 1 ( A t A ) = A ⋅ I = A
∎
מטריצת ההטלה אידמפוטנטית, כלומר P A P A = P A P_{A}P_{A}=P_{A} P A P A = P A .
הוכחה:
P A P A = P A A ( A t A ) − 1 A t = ( P A A ) ( A t A ) − 1 A t = ↓ סעיף קודם A ( A t A ) − 1 A t = P A P_{A}P_{A}=P_{A} A(A^tA)^{-1}A^t =(P_{A}A)(A^tA)^{-1}A^t \underset{\begin{matrix}
\downarrow \\
\R{\text{סעיף קודם}}
\end{matrix}}{=}A(A^tA)^{-1}A^t=P_{A} P A P A = P A A ( A t A ) − 1 A t = ( P A A ) ( A t A ) − 1 A t ↓ סעיף קודם = A ( A t A ) − 1 A t = P A
∎
הוכחה:
P A t = ( A ( A t A ) − 1 A t ) t = ( A t ) t ( ( A t A ) − 1 ) t A t = A ( ( A t A ) t ) − 1 A t = A ( A t A ) − 1 A t = P A P_{A}^t=(A(A^tA)^{-1}A^t)^{t}=(A^t)^t((A^tA)^{-1})^{t}A^t=A((A^tA)^t)^{-1}A^t=A(A^tA)^{-1}A^t=P_{A} P A t = ( A ( A t A ) − 1 A t ) t = ( A t ) t (( A t A ) − 1 ) t A t = A (( A t A ) t ) − 1 A t = A ( A t A ) − 1 A t = P A
לכן, לפי הגדרה, מטריצת ההטלה סימטרית.
∎
מטריצת ההטלה חיובית חצי מוגדרת.
הוכחה:
יהי x ‾ ≠ 0 \underline{x} \neq0 x = 0 . אזי:
x ‾ t P A x ‾ = x ‾ t P A P A x ‾ = x ‾ t P A t P A x ‾ = ↓ y ‾ = P A x ‾ y ‾ t y ‾ = ∑ i = 1 n y i 2 ≥ 0 \begin{align*}
\underline{x}^tP_{A}\underline{x}&= \underline{x}^tP_{A}P_{A}\underline{x}=\underline{x}^tP_{A}^tP_{A}\underline{x} \underset{\begin{matrix}
\downarrow \\
\underline{y}=P_{A}\underline{x}
\end{matrix}}{=}\underline{y}^t\underline{y}=\sum_{i=1}^n y_{i}^2 \geq 0
\end{align*} x t P A x = x t P A P A x = x t P A t P A x ↓ y = P A x = y t y = i = 1 ∑ n y i 2 ≥ 0
לכן, לפי הגדרה, מטריצת ההטלה חיובית חצי מוגדרת.
∎
אם A A A לא ריבועית, אז מטריצת ההטלה (סינגולרית, כלומר) לא הפיכה.
הוכחה:
מסעיף ב', אנו יודעים כי P A P A = P A P_{A}P_{A}=P_{A} P A P A = P A . נניח בשלילה ש-P A P_{A} P A הפיכה ונכפיל משמאל ב-P A − 1 P_{A}^{-1} P A − 1 ואז:
I ⋅ P A = I ⟹ P A = I ⟺ A ( A t A ) − 1 A t = I ⟺ A ( ( A t A ) − 1 A t ) = I I\cdot P_{A}=I \implies P_{A}=I \iff A(A^tA)^{-1}A^t=I \iff A((A^tA)^{-1}A^t)=I I ⋅ P A = I ⟹ P A = I ⟺ A ( A t A ) − 1 A t = I ⟺ A (( A t A ) − 1 A t ) = I
לכן, המטריצה A A A הפיכה בסתירה לכך ש-A A A לא ריבועית ולכן לא יכולה להיות הפיכה.
לכן, P A P_{A} P A אינה הפיכה במידה ו-A A A אינה ריבועית.
∎
אם A A A ריבועית, אז מטריצת ההטלה הפיכה.
הוכחה:
נתון כי A A A ריבועית. נניח בה"כ כי A A A בגודל n × n n \times n n × n . נתון כי עמודות A A A בת"ל ולכן, dim c o l A = n \dim colA=n dim co l A = n . לכן, לפי משפט r ( A ) = n r(A)=n r ( A ) = n ולכן, לפי משפט, המטריצה A הפיכה ובנוסף, גם A t A^t A t הפיכה.
לכן:
x ‾ t P A x ‾ = x ‾ t A ( A t A ) − 1 A t x ‾ = x ‾ t A A − 1 ( A t ) − 1 A t x ‾ = x ‾ t x ‾ = ∥ x ‾ ∥ 2 2 ≥ 0 \underline{x}^tP_{A}\underline{x}=\underline{x}^tA(A^tA)^{-1}A^t\underline{x} = \underline{x}^tAA^{-1}(A^t)^{-1}A^t\underline{x} =\underline{x}^t\underline{x}=\left\lVert \underline{x} \right\rVert _{2}^2 \geq0 x t P A x = x t A ( A t A ) − 1 A t x = x t A A − 1 ( A t ) − 1 A t x = x t x = ∥ x ∥ 2 2 ≥ 0
הנורמה שווה לאפס אך ורק כאשר x ‾ = 0 \underline{x}=0 x = 0 ולכן, לפי הגדרה, P A ≻ 0 P_{A}\succ 0 P A ≻ 0 .
בנוסף, המטריצה P A P_{A} P A ריבועית, סימטרית(סעיף ג') וחיובית חצי מוגדרת(סעיף ד'). לכן, לפי משפט, P A P_{A} P A הפיכה.
∎
נגדיר את המטריצה H A = I − P A H_{A}=I-P_{A} H A = I − P A זו מטריצת ההטלה על מרחב הוקטורים הניצבים לעמודות A A A .
הוכיחו כי H A H_{A} H A היא סימטרית ואידמפוטנטית.
הוכחה:
H A t = ( I − P A ) t = I − P A t = I − P A = H A H_{A}^t=(I-P_{A})^t=I-P_{A}^t=I-P_{A}=H_{A} H A t = ( I − P A ) t = I − P A t = I − P A = H A
לכן, המטריצה H A H_{A} H A סימטרית.
H A H A = ( I − P A ) ( I − P A ) = I 2 − P A − P A + P A 2 = I − 2 P A + P A = I − P A = H A H_{A}H_{A}=(I-P_{A})(I-P_{A})=I^2-P_{A}-P_{A}+P_{A}^2=I-2P_{A}+P_{A}=I-P_{A}=H_{A} H A H A = ( I − P A ) ( I − P A ) = I 2 − P A − P A + P A 2 = I − 2 P A + P A = I − P A = H A
ולכן המטריצה H A H_{A} H A גם אידמפוטנטית.
∎
הוכיחו כי A t H A = 0 A^tH_{A}=0 A t H A = 0 .
הוכחה:
A t H A = A t ( I − P A ) = A t − A t P A = A t − A t A ( A t A ) − 1 A t = A t − I ⋅ A t = 0 A^tH_{A}=A^t(I-P_{A})=A^t-A^tP_{A}=A^t-A^tA(A^tA)^{-1}A^t=A^t-I\cdot A^t=0 A t H A = A t ( I − P A ) = A t − A t P A = A t − A t A ( A t A ) − 1 A t = A t − I ⋅ A t = 0
∎
נתון פתרון לבעית ריבועים פחותים x ‾ = a r g min x ‾ ∥ A x ‾ − b ‾ ∥ 2 2 \underline{x}=arg \underset{\underline{x}}{\min}\left\lVert A\underline{x}-\underline{b} \right\rVert_{2}^2 x = a r g x min ∥ A x − b ∥ 2 2 .
בטאו את וקטור השגיאה r ‾ ∗ = A x ‾ ∗ − b ‾ \underline{r}^*=A\underline{x}^*-\underline{b} r ∗ = A x ∗ − b באמצעות H A , b ‾ H_{A},\underline{b} H A , b .
לפי המשוואה הנורמלית נקבל כי:
x ‾ ∗ = A † b ‾ = ( A t A ) − 1 A t b ‾ \underline{x}^*=A^{\dagger}\underline{b}=(A^tA)^{-1}A^t\underline{b} x ∗ = A † b = ( A t A ) − 1 A t b
נציב בוקטור השארית ונקבל:
r ‾ ∗ = A ( A t A ) − 1 A t b ‾ − b ‾ = P A b ‾ − b ‾ = ( P A − I ) b ‾ = H A b ‾ \underline{r}^*=A(A^tA)^{-1}A^t\underline{b}-\underline{b}=P_{A}\underline{b}-\underline{b}=(P_{A}-I)\underline{b}=H_{A}\underline{b} r ∗ = A ( A t A ) − 1 A t b − b = P A b − b = ( P A − I ) b = H A b
הוכיחו כי H A P A = 0 H_{A}P_{A}=0 H A P A = 0 .
הוכחה:
H A P A = ( I − P A ) P A = P A − P A 2 = P A − P A = 0 H_{A}P_{A}=(I-P_{A})P_{A}=P_{A}-P_{A}^2=P_{A}-P_{A}=0 H A P A = ( I − P A ) P A = P A − P A 2 = P A − P A = 0
∎
תרגיל 5
בבעיה זו יש לנו m m m דגימות מהצורה { ( x k , y k ) } k = 1 m \left\{ (x_{k},y_{k}) \right\}_{k=1}^m { ( x k , y k ) } k = 1 m כאשר x k x_{k} x k זו הנקודה בה התרחשה הדגימה ו-y k y_{k} y k זה הערך שנדגם.
כעת, נרצה להתאים פולינום ממעלה n − 1 n-1 n − 1 שיהיה כמה שיותר קרוב לדגימות שקיבלנו. שימו לב שאם הדגימות באמת התקבלו מפולינום כלשהו, אז אם נגלה אותו נדע גם מה תהיה הדגימה ב-x x x אחר שלא התקבל בדגימות.
ניתן לנסח את הבעיה בצורה הבאה:
קיבלנו את m m m הדגימות { ( x k , y k ) } k = 1 m \left\{ (x_{k},y_{k}) \right\}_{k=1}^m { ( x k , y k ) } k = 1 m כך ש-x 1 < x 2 < ⋯ < x m x_{1}<x_{2}<\dots<x_{m} x 1 < x 2 < ⋯ < x m .
נרצה למצוא פולינום p ( x ) p(x) p ( x ) ממעה לכל היותר n − 1 n-1 n − 1 (אם קיים) המקיים כי:
p ( x ) = a r g min q ( x ) ∈ R n − 1 [ x ] ( ∑ k = 1 m ∣ q ( x k ) − y k ∣ 2 ) p(x)=arg \underset{q(x) \in \mathbb{R}_{n-1}[x]}{\min} \left( \sum_{k=1}^m |q(x_{k})-y_{k}|^2 \right) p ( x ) = a r g q ( x ) ∈ R n − 1 [ x ] min ( k = 1 ∑ m ∣ q ( x k ) − y k ∣ 2 )
כעכשיו שאנו מבינים את הבעיה, בואו נפתור אותה.
יהיו x 1 , x 2 , … , x m ∈ R x_{1},x_{2},\dots,x_{m}\in \mathbb{R} x 1 , x 2 , … , x m ∈ R ויהי n ∈ N n \in \mathbb{N} n ∈ N ונגדיר את המטריצה:
V n ( x 1 , x 2 , … , x m ) = ( 1 x 1 x 1 2 ⋯ x 1 n − 1 1 x 2 x 2 2 ⋯ x 2 n − 1 1 x 3 x 3 2 ⋯ x 3 n − 1 ⋮ ⋮ ⋮ ⋮ 1 x m x m 2 ⋯ x m n − 1 ) V_{n}(x_{1},x_{2},\dots,x_{m})=\begin{pmatrix}
1 & x_{1} & x_{1}^2 & \cdots & x_{1}^{n-1} \\
1 & x_{2} & x_{2}^2 & \cdots & x_{2}^{n-1} \\
1 & x_{3} & x_{3}^2 & \cdots & x_{3}^{n-1} \\
\vdots & \vdots & \vdots & & \vdots \\
1 & x_{m} & x_{m}^2 & \cdots & x_{m}^{n-1}
\end{pmatrix} V n ( x 1 , x 2 , … , x m ) = 1 1 1 ⋮ 1 x 1 x 2 x 3 ⋮ x m x 1 2 x 2 2 x 3 2 ⋮ x m 2 ⋯ ⋯ ⋯ ⋯ x 1 n − 1 x 2 n − 1 x 3 n − 1 ⋮ x m n − 1
כאשר m = n m=n m = n והמטריצה נקראת מטריצת ונדרמונד .
נסחו את הבעיה כבעיית L S LS L S והוכיחו שקיים פתרון לבעיה שלנו.
נסמן: f ( x ) = ∑ k = 1 m ∣ q ( x k ) − y k ∣ 2 \displaystyle f(x)=\sum_{k=1}^m |q(x_{k})-y_{k}|^2 f ( x ) = k = 1 ∑ m ∣ q ( x k ) − y k ∣ 2 ואז p ( x ) = arg min f ( x ) p(x)=\arg \min f(x) p ( x ) = arg min f ( x ) .
נשים לב כי כל מחובר בסכום של f f f הינו אי שלילי ובריבוע. לכן, כדי להביא את p p p למינימום נצטרך להקטין כל מחובר עד כמה שאפשר. נוכל להציב זאת במטריצה:
( q ( x 1 ) q ( x 2 ) ⋮ q ( x m ) ) = ( y 1 y 2 ⋮ y m ) \begin{pmatrix}
q(x_{1}) \\
q(x_{2}) \\
\vdots \\
q(x_{m})
\end{pmatrix}=\begin{pmatrix}
y_{1} \\
y_{2} \\
\vdots \\
y_{m}
\end{pmatrix} q ( x 1 ) q ( x 2 ) ⋮ q ( x m ) = y 1 y 2 ⋮ y m
אם נוציא את x k x_{k} x k מתוך הפולינום נקבל תבנית של פולינום אליה אנו מכניסים את ה-x x x -ים שלנו. לכן:
V n ( x 1 , x 2 , … , x m ) = ( 1 x 1 x 1 2 … x 1 n − 1 1 x 2 x 2 2 … x 2 n − 1 1 x 3 x 3 2 ⋯ x 3 n − 1 ⋮ ⋮ ⋮ ⋮ 1 x m x m 2 ⋯ x m n − 1 ) = ( y 1 y 2 ⋮ y m ) = y ‾ V_{n}(x_{1},x_{2},\dots,x_{m})=\begin{pmatrix}
1 & x_{1} & x_{1}^2 & \dots & x_{1}^{n-1} \\
1 & x_{2} & x_{2}^2 & \dots & x_{2}^{n-1} \\
1 & x_{3} & x_{3}^2 & \cdots & x_{3}^{n-1} \\
\vdots & \vdots & \vdots & & \vdots \\
1 & x_{m} & x_{m}^2 & \cdots & x_{m}^{n-1}
\end{pmatrix}=\begin{pmatrix}
y_{1} \\
y_{2} \\
\vdots \\
y_{m}
\end{pmatrix}=\underline{y} V n ( x 1 , x 2 , … , x m ) = 1 1 1 ⋮ 1 x 1 x 2 x 3 ⋮ x m x 1 2 x 2 2 x 3 2 ⋮ x m 2 … … ⋯ ⋯ x 1 n − 1 x 2 n − 1 x 3 n − 1 ⋮ x m n − 1 = y 1 y 2 ⋮ y m = y
כעת, נגדיר:
A = V n , b ‾ = y ‾ , x ‾ = ( c 1 c 2 ⋮ c m ) A=V_{n}, \qquad \underline{b}=\underline{y}, \qquad \underline{x}=\begin{pmatrix}
c_{1} \\
c_{2} \\
\vdots \\
c_{m}
\end{pmatrix} A = V n , b = y , x = c 1 c 2 ⋮ c m
ואז מתקיים:
p ( x ) = a r g min c ‾ ∥ A c ‾ − b ‾ ∥ 2 2 p(x)=arg \underset{\underline{c}}{\min}\left\lVert A\underline{c}-\underline{b} \right\rVert _{2}^2 p ( x ) = a r g c min ∥ A c − b ∥ 2 2
זוהי בעיית הריבועים הפחותים שלנו.
לפי משפט, לבעיית ריבועים פחותים תמיד יש פתרון(או ∞ \infty ∞ פתרונות) ולכן גם לבעיה זו יש פתרון(או ∞ \infty ∞ פתרונות).
הראו כי
∣ V n ( x 1 , x 2 , … , x n ) ∣ = ∏ 1 ≤ i < j ≤ n ( x j − x i ) |V_{n}(x_{1},x_{2},\dots,x_{n})|=\prod_{1\leq i < j\leq n} (x_{j}-x_{i}) ∣ V n ( x 1 , x 2 , … , x n ) ∣ = 1 ≤ i < j ≤ n ∏ ( x j − x i )
הוכחה:
נמצא את הדרטמיננטה באמצעות אינדוקציה על n n n .
בסיס: עבור n = 2 n=2 n = 2 . מתקיים:
V 2 ( x 1 , x 2 ) = ( 1 x 1 1 x 2 ) V_{2}(x_{1},x_{2})=\begin{pmatrix}
1 & x_{1} \\
1 & x_{2}
\end{pmatrix} V 2 ( x 1 , x 2 ) = ( 1 1 x 1 x 2 )
ולכן:
∣ V 2 ( x 1 , x 2 ) ∣ = ∣ 1 x 1 1 x 2 ∣ = x 2 − x 1 |V_{2}(x_{1},x_{2})|=\begin{vmatrix}
1 & x_{1} \\
1 & x_{2}
\end{vmatrix}=x_{2}-x_{1} ∣ V 2 ( x 1 , x 2 ) ∣ = 1 1 x 1 x 2 = x 2 − x 1
כנדרש.
צעד: נניח כי עבור n n n מתקיים ∣ V n ( x 1 , x 2 , … , x n ) ∣ = ∏ 1 ≤ i < j ≤ n ( x j − x i ) |V_{n}(x_{1},x_{2},\dots,x_{n})|=\prod_{1\leq i < j\leq n} (x_{j}-x_{i}) ∣ V n ( x 1 , x 2 , … , x n ) ∣ = ∏ 1 ≤ i < j ≤ n ( x j − x i ) ונוכיח זאת עבור n + 1 n+1 n + 1 .
∣ V n + 1 ( x 1 , … , x n + 1 ) ∣ = ∣ 1 x 1 x 1 2 … x 1 n 1 x 2 x 2 2 … x 2 n ⋮ ⋮ ⋮ ⋮ 1 x n + 1 x n + 1 2 … x n + 1 n ∣ |V_{n+1}(x_{1},\dots,x_{n+1})|=\begin{vmatrix}
1 & x_{1} & x_{1}^2 & \dots & x_{1}^{n} \\
1 & x_{2} & x_{2}^2 & \dots & x_{2}^{n} \\
\vdots & \vdots & \vdots & & \vdots \\
1 & x_{n+1} & x_{n+1}^2 & \dots & x_{n+1}^n
\end{vmatrix} ∣ V n + 1 ( x 1 , … , x n + 1 ) ∣ = 1 1 ⋮ 1 x 1 x 2 ⋮ x n + 1 x 1 2 x 2 2 ⋮ x n + 1 2 … … … x 1 n x 2 n ⋮ x n + 1 n
נבצע כעת פעולות עמודה אלמנטריות בזה אחר זה אשר יעקבו אחר התבנית: C i = C i − x 1 C i − 1 C_{i}=C_{i}-x_{1}C_{i-1} C i = C i − x 1 C i − 1 לכל 2 ≤ i 2\leq i 2 ≤ i כאשר נתחיל מ-i = n i=n i = n ונרד עד i = 2 i=2 i = 2 .
נקבל לאחר דירוג זה את המטריצה:
V n + 1 ( x 1 , … , x n + 1 ) = ∣ 1 0 0 … 0 1 x 2 − x 1 x 2 ( x 2 − x 1 ) … x 2 n − 1 ( x 2 − x 1 ) ⋮ ⋮ ⋮ ⋮ 1 x n + 1 − x 1 x n + 1 ( x n + 1 − x 1 ) … x n + 1 n − 1 ( x n + 1 − x 1 ) ∣ = ∣ 1 x 2 − x 1 x 2 ( x 2 − x 1 ) … x 2 n − 1 ( x 2 − x 1 ) ⋮ ⋮ ⋮ ⋮ 1 x n + 1 − x 1 x n + 1 ( x n + 1 − x 1 ) … x n + 1 n − 1 ( x n + 1 − x 1 ) ∣ = ( x 2 − x 1 ) ( x 3 − x 1 ) ⋯ ( x n + 1 − x 1 ) ∣ 1 x 2 … x 2 n − 1 ⋮ ⋮ ⋮ 1 x n + 1 … x n + 1 n − 1 ∣ = ( x 2 − x 1 ) ( x 3 − x 1 ) ⋯ ( x n + 1 − x 1 ) ∣ V n ( x 2 , … , x n + 1 ) ∣ \begin{align*}
V_{n+1}(x_{1},\dots,x_{n+1})&=\begin{vmatrix}
1 & 0 & 0 & \dots & 0 \\
1 & x_{2}-x_{1} & x_{2}(x_{2}-x_{1}) & \dots & x_{2}^{n-1}(x_{2}-x_{1}) \\
\vdots & \vdots & \vdots & & \vdots \\
1 & x_{n+1}-x_{1} & x_{n+1}(x_{n+1}-x_{1}) & \dots & x_{n+1}^{n-1}(x_{n+1}-x_{1})
\end{vmatrix} \\
&=\begin{vmatrix}
1 & x_{2}-x_{1} & x_{2}(x_{2}-x_{1}) & \dots & x_{2}^{n-1}(x_{2}-x_{1}) \\
\vdots & \vdots & \vdots & & \vdots \\
1 & x_{n+1}-x_{1} & x_{n+1}(x_{n+1}-x_{1}) & \dots & x_{n+1}^{n-1}(x_{n+1}-x_{1})
\end{vmatrix} \\
&=(x_{2}-x_{1})(x_{3}-x_{1})\cdots(x_{n+1}-x_{1})\begin{vmatrix}
1 & x_{2} & \dots & x_{2}^{n-1} \\
\vdots & \vdots & & \vdots \\
1 & x_{n+1} & \dots & x_{n+1}^{n-1}
\end{vmatrix} \\
&=(x_{2}-x_{1})(x_{3}-x_{1})\cdots(x_{n+1}-x_{1})|V_{n}(x_{2},\dots,x_{n+1})|
\end{align*} V n + 1 ( x 1 , … , x n + 1 ) = 1 1 ⋮ 1 0 x 2 − x 1 ⋮ x n + 1 − x 1 0 x 2 ( x 2 − x 1 ) ⋮ x n + 1 ( x n + 1 − x 1 ) … … … 0 x 2 n − 1 ( x 2 − x 1 ) ⋮ x n + 1 n − 1 ( x n + 1 − x 1 ) = 1 ⋮ 1 x 2 − x 1 ⋮ x n + 1 − x 1 x 2 ( x 2 − x 1 ) ⋮ x n + 1 ( x n + 1 − x 1 ) … … x 2 n − 1 ( x 2 − x 1 ) ⋮ x n + 1 n − 1 ( x n + 1 − x 1 ) = ( x 2 − x 1 ) ( x 3 − x 1 ) ⋯ ( x n + 1 − x 1 ) 1 ⋮ 1 x 2 ⋮ x n + 1 … … x 2 n − 1 ⋮ x n + 1 n − 1 = ( x 2 − x 1 ) ( x 3 − x 1 ) ⋯ ( x n + 1 − x 1 ) ∣ V n ( x 2 , … , x n + 1 ) ∣
מכיוון ש-x 2 , … , x n + 1 x_{2},\dots,x_{n+1} x 2 , … , x n + 1 הם n n n איברים בדיוק, לפי הנחת האינדוקציה מתקיים:
∣ V n + 1 ( x 1 , … , x n + 1 ) ∣ = ( x 2 − x 1 ) ( x 3 − x 1 ) … ( x n + 1 − x 1 ) ∏ 2 ≤ i < j < n + 1 ( x j − x i ) = ∏ 1 ≤ i < j ≤ n + 1 ( x j − x i ) |V_{n+1}(x_{1},\dots,x_{n+1})|=(x_{2}-x_{1})(x_{3}-x_{1})\dots(x_{n+1}-x_{1})\prod_{2\leq i<j<n+1} (x_{j}-x_{i})=\prod_{1\leq i<j\leq n+1}(x_{j}-x_{i}) ∣ V n + 1 ( x 1 , … , x n + 1 ) ∣ = ( x 2 − x 1 ) ( x 3 − x 1 ) … ( x n + 1 − x 1 ) 2 ≤ i < j < n + 1 ∏ ( x j − x i ) = 1 ≤ i < j ≤ n + 1 ∏ ( x j − x i )
לכן, לפי ההוכחה באינודקציה, הטענה מתקיימת.
∎
הוכיחו כי אם m = n m=n m = n אז קיים פולינום יחיד שמביא למינימום את הבעיה שלנו והראו כי המינימום הוא 0 0 0 .
הוכחה:
לפי סעיף קודם, הדטרמיננטה של V n ( x 1 , … , x n ) V_{n}(x_{1},\dots,x_{n}) V n ( x 1 , … , x n ) שונה מאפס שכן כל חיסור שונה מאפס(x j > x i x_{j}>x_{i} x j > x i ) ו-R \mathbb{R} R הוא שדה.
לכן, לפי משפט, המטריצה הפיכה ולכן למערכת יש פתרון יחיד.
לפי משפט מתקיים:
c ‾ ∗ = A − 1 b ‾ \underline{c}^*=A^{-1}\underline{b} c ∗ = A − 1 b
∥ A c ‾ − b ‾ ∥ 2 2 = ∥ b ‾ − b ‾ ∥ 2 2 = ∥ 0 ‾ ∥ 2 2 = 0 \left\lVert A\underline{c}-\underline{b} \right\rVert _{2}^2=\left\lVert \underline{b}-\underline{b} \right\rVert _{2}^2= \left\lVert \underline{0} \right\rVert _{2}^2=0 ∥ A c − b ∥ 2 2 = ∥ b − b ∥ 2 2 = ∥ 0 ∥ 2 2 = 0
∎
הוכיחו כי אם n > m n>m n > m אז יש ∞ \infty ∞ פולינומים שמביאים למינימום את הבעיה שלנו.
הוכחה:
כאשר n > m n>m n > m המטריצה A A A מקבלת דרגה של מקסימום m m m .
לפי משפט, r ( A t A ) = r ( A ) ≤ m < n r(A^tA)=r(A)\leq m<n r ( A t A ) = r ( A ) ≤ m < n . אך המטריצה A t A A^tA A t A הינה בגודל n × n n \times n n × n ולכן דרגתה אינה מלאה. לכן היא לא הפיכה ולבעיית הריבועים הפחותים יש ∞ \infty ∞ פתרונות לפי משפט.
∎