MIT18.06 Linear Algebra (16)

lec16

Least square

find a line y=C+Dxy=C+Dx through: (1,1)(2,2)(3,2)(1,1)(2,2)(3,2) :

[111213][CD]=[122]\begin{bmatrix} 1 & 1\\ 1 & 2\\ 1 & 3\end{bmatrix}\begin{bmatrix} C \\ D\end{bmatrix}=\begin{bmatrix}1 \\ 2 \\ 2\end{bmatrix}

in the form of

Ax=bAx=b

Minimize :

Axb2=e2\| Ax-b\| ^2=\| e\| ^2

that is, finding PP (projection vector)

Ax^=PA\hat x=P

Steps:

A(bAx^)=0Ab=AAx^x^=(AA)1Ab\begin{align}A^\top (b-A\hat x) & = 0 \\A^\top b & = A^\top A\hat x \\\hat x & = (A^\top A)^{-1} A^\top b\end{align}

get:

x^=[CD]=[2/31/2]\hat x = \begin{bmatrix} C \\ D\end{bmatrix}=\begin{bmatrix} 2/3\\1/2\end{bmatrix}

which means the line is

y=12x+23 y=\frac{1}{2}x+\frac{2}{3} 

When AAA^\top A is invertible

If AA has independent columns, then AAA^\top A is invertible.

to prove: if AA has dependent cols, if AAx=0A^\top A x=0 then x=0x=0

$N(A^\top A) =N(A) see[proofofsee [proof of N(A^\top A)=N(A)$ ](lec14%20e323f8c6256b4c4f8fd632761950a29f.md)

trick

AAx=0xAAx=0(Ax)Ax=0Ax=0(square)x=0(A has independent columns)\begin{aligned} A^\top Ax & = 0 \\ x^\top A^\top A x & = 0\\ (Ax)^\top Ax & = 0 \\ Ax & = 0 \text{(square)} \\ x & = 0 \text{(A has independent columns)} \end{aligned}

that means AA is invertible.

Special case of independent columns

Columns are perp. unit vectors.

e.g.

orthonormal vector


MIT18.06 Linear Algebra (16)
https://yzzzf.xyz/2022/09/27/MIT16.08-lec16/
Author
Zifan Ying
Posted on
September 27, 2022
Licensed under