Consider the matrix \(A=\begin{bmatrix}1&2&1&2\\1&2&2&5\\0&0&1&3\end{bmatrix}\).
(a) (2 points) Compute the dimensions of the column space \(C(A)\) and the null-space \(N(A)\).
(b) (2 points) Give an orthogonal basis for \(C(A)\) and \(N(A)\), respectively.
(c) (2 points) Find a projection matrix that projects any vector \(b\in\mathbb R^3\) onto the column space \(C(A)\).
(d) (4 points) Find the least-squares solutions to the problem \(A\mathbf x=\begin{bmatrix}-1\\3\\1\end{bmatrix}\).
(e) (5 points) Find the minimum-length, least-squares solution to the problem \(A\mathbf x=\begin{bmatrix}-1\\3\\1\end{bmatrix}\).
列運算:\(R_2-R_1\) 得 \((0,0,1,3)\),與 \(R_3\) 相同
\(\begin{bmatrix}1&2&1&2\\0&0&1&3\\0&0&0&0\end{bmatrix}\) → pivot 在第 1、3 欄,\(\operatorname{rank}A=2\)
(a) \(\dim C(A)=\operatorname{rank}=2\);rank-nullity:\(\dim N(A)=4-2=2\)
\(\dim C(A)=2,\ \dim N(A)=2\)
(b) \(C(A)\):取 pivot 欄 \(\mathbf c_1=(1,1,0)^T\)、\(\mathbf c_3=(1,2,1)^T\),Gram–Schmidt
\(\mathbf u_1=(1,1,0)^T\),\(\mathbf u_2=\mathbf c_3-\dfrac{\mathbf c_3\cdot\mathbf u_1}{\mathbf u_1\cdot\mathbf u_1}\mathbf u_1=(1,2,1)-\tfrac32(1,1,0)=\left(-\tfrac12,\tfrac12,1\right)^T\)
\(N(A)\):\(x_3=-3x_4\),\(x_1=-2x_2+x_4\),自由變數 \(x_2,x_4\)
\(\mathbf v_1=(-2,1,0,0)^T,\ \mathbf v_2=(1,0,-3,1)^T\);\(\mathbf v_1\cdot\mathbf v_2=-2,\ \|\mathbf v_1\|^2=5\)
\(\mathbf w_1=\mathbf v_1\),\(\mathbf w_2=\mathbf v_2+\tfrac25\mathbf v_1=\left(\tfrac15,\tfrac25,-3,1\right)^T\)
\(C(A)\):\(\{(1,1,0)^T,\ (-\tfrac12,\tfrac12,1)^T\}\);\(N(A)\):\(\{(-2,1,0,0)^T,\ (\tfrac15,\tfrac25,-3,1)^T\}\)
(c) 取 \(B=\begin{bmatrix}1&1\\1&2\\0&1\end{bmatrix}\)(\(C(A)\) 的基底),\(B^TB=\begin{bmatrix}2&3\\3&6\end{bmatrix}\),\(\det=3\),\((B^TB)^{-1}=\tfrac13\begin{bmatrix}6&-3\\-3&2\end{bmatrix}\)
\(P=B(B^TB)^{-1}B^T\)
\(P=\dfrac13\begin{bmatrix}2&1&-1\\1&2&1\\-1&1&2\end{bmatrix}\)
(d) \(\mathbf b=(-1,3,1)^T\):\(P\mathbf b=\tfrac13(-2+3-1,\ -1+6+1,\ 1+3+2)=(0,2,2)^T\)
解 \(A\mathbf x=(0,2,2)^T\):用 pivot 欄 \(c_1,c_3\):\(\alpha(1,1,0)+\beta(1,2,1)=(0,2,2)\) → \(\beta=2,\ \alpha=-2\)
特解 \(\mathbf x_p=(-2,0,2,0)^T\),加上 \(N(A)\) 的任意元素
\(\hat{\mathbf x}=\begin{bmatrix}-2\\0\\2\\0\end{bmatrix}+s\begin{bmatrix}-2\\1\\0\\0\end{bmatrix}+t\begin{bmatrix}1\\0\\-3\\1\end{bmatrix},\ \ s,t\in\mathbb R\)
(e) 最短的解落在 row space,即 \(\hat{\mathbf x}\perp N(A)\):與 \(\mathbf v_1,\mathbf v_2\) 內積為 0
\(\hat{\mathbf x}\cdot\mathbf v_1=4+5s-2t=0\);\(\hat{\mathbf x}\cdot\mathbf v_2=-8-2s+11t=0\)
解得 \(s=-\tfrac{28}{51},\ t=\tfrac{32}{51}\)
\(\hat{\mathbf x}^+=\dfrac1{51}(-14,\,-28,\,6,\,32)^T\)