Neetesh Kumar | October 21, 2024
Linear Algebra Homework Help
This is the solution to Math2B Course: Linear Algebra
Final Exam Question Number 26
Contact me if you need help with Homework, Assignments, Tutoring Sessions, or Exams for STEM subjects.
You can see our Testimonials or Vouches from here of the previous works I have done.
Get Linear Algebra Homework Help
Step-by-step solution:
Step 1: Compute the orthogonal projection of b \mathbf{b} b onto Col ( A ) \text{Col}(A) Col ( A )
Matrix Multiplication Calculator
To compute the orthogonal projection of b \mathbf{b} b onto the column space of A A A , we use the formula:
Proj Col ( A ) ( b ) = A ( A T A ) − 1 A T b \text{Proj}_{\text{Col}(A)}(\mathbf{b}) = A(A^T A)^{-1} A^T \mathbf{b} Proj Col ( A ) ( b ) = A ( A T A ) − 1 A T b
First, compute A T A A^T A A T A :
A T A = [ − 1 2 1 2 1 2 ] [ − 1 2 2 1 1 2 ] = [ 6 2 2 9 ] A^T A = \begin{bmatrix} -1 & 2 & 1 \\ 2 & 1 & 2 \end{bmatrix} \begin{bmatrix} -1 & 2 \\ 2 & 1 \\ 1 & 2 \end{bmatrix} = \begin{bmatrix} 6 & 2 \\ 2 & 9 \end{bmatrix} A T A = [ − 1 2 2 1 1 2 ] − 1 2 1 2 1 2 = [ 6 2 2 9 ]
Next, compute A T b A^T \mathbf{b} A T b :
A T b = [ − 1 2 1 2 1 2 ] [ 5 − 4 4 ] = [ − 5 + ( − 8 ) + 4 10 + ( − 4 ) + 8 ] = [ − 9 14 ] A^T \mathbf{b} = \begin{bmatrix} -1 & 2 & 1 \\ 2 & 1 & 2 \end{bmatrix} \begin{bmatrix} 5 \\ -4 \\ 4 \end{bmatrix} = \begin{bmatrix} -5 + (-8) + 4 \\ 10 + (-4) + 8 \end{bmatrix} = \begin{bmatrix} -9 \\ 14 \end{bmatrix} A T b = [ − 1 2 2 1 1 2 ] 5 − 4 4 = [ − 5 + ( − 8 ) + 4 10 + ( − 4 ) + 8 ] = [ − 9 14 ]
Now, compute ( A T A ) − 1 (A^T A)^{-1} ( A T A ) − 1 :
( A T A ) − 1 = [ 6 2 2 9 ] − 1 = [ 9 50 − 1 25 − 1 25 3 25 ] (A^T A)^{-1} = \begin{bmatrix} 6 & 2 \\ 2 & 9 \end{bmatrix}^{-1} = \begin{bmatrix} \frac{9}{50} & \frac{-1}{25} \\ \frac{-1}{25} & \frac{3}{25} \end{bmatrix} ( A T A ) − 1 = [ 6 2 2 9 ] − 1 = [ 50 9 25 − 1 25 − 1 25 3 ]
Now, compute the projection:
Proj Col ( A ) ( b ) = A [ 9 50 − 1 25 − 1 25 3 25 ] [ − 9 14 ] = A [ − 109 50 51 25 ] = A [ − 2.18 2.04 ] \text{Proj}_{\text{Col}(A)}(\mathbf{b}) = A \begin{bmatrix} \frac{9}{50} & \frac{-1}{25} \\ \frac{-1}{25} & \frac{3}{25} \end{bmatrix} \begin{bmatrix} -9 \\ 14 \end{bmatrix} = A \begin{bmatrix} -\frac{109}{50} \\ \frac{51}{25} \end{bmatrix} = A \begin{bmatrix} -2.18 \\ 2.04 \end{bmatrix} Proj Col ( A ) ( b ) = A [ 50 9 25 − 1 25 − 1 25 3 ] [ − 9 14 ] = A [ − 50 109 25 51 ] = A [ − 2.18 2.04 ]
Multiplying A A A with this result:
Proj Col ( A ) ( b ) = [ − 1 2 2 1 1 2 ] [ − 109 50 51 25 ] = Proj Col ( A ) ( b ) = [ 313 50 − 58 25 19 10 ] \text{Proj}_{\text{Col}(A)}(\mathbf{b}) = \begin{bmatrix} -1 & 2 \\ 2 & 1 \\ 1 & 2 \end{bmatrix} \begin{bmatrix} -\frac{109}{50} \\ \frac{51}{25} \end{bmatrix} = \text{Proj}_{\text{Col}(A)}(\mathbf{b}) = \begin{bmatrix} \frac{313}{50} \\ -\frac{58}{25} \\ \frac{19}{10} \end{bmatrix} Proj Col ( A ) ( b ) = − 1 2 1 2 1 2 [ − 50 109 25 51 ] = Proj Col ( A ) ( b ) = 50 313 − 25 58 10 19
Step 2: Solve the least-squares solution A x = b A\mathbf{x} = \mathbf{b} A x = b
The least-squares solution can be found by solving:
x = ( A T A ) − 1 A T b \mathbf{x} = (A^T A)^{-1} A^T \mathbf{b} x = ( A T A ) − 1 A T b
We already computed A T A = [ 6 2 2 9 ] A^T A = \begin{bmatrix} 6 & 2 \\ 2 & 9 \end{bmatrix} A T A = [ 6 2 2 9 ] , ( A T A ) − 1 = [ 9 50 − 1 25 − 1 25 3 25 ] (A^T A)^{-1} = \begin{bmatrix} \frac{9}{50} & \frac{-1}{25} \\ \frac{-1}{25} & \frac{3}{25} \end{bmatrix} ( A T A ) − 1 = [ 50 9 25 − 1 25 − 1 25 3 ] , and A T b = [ − 9 14 ] A^T \mathbf{b} = \begin{bmatrix} -9 \\ 14 \end{bmatrix} A T b = [ − 9 14 ] .
Now compute:
x = [ 9 50 − 1 25 − 1 25 3 25 ] [ − 9 14 ] = [ − 109 50 51 25 ] = [ − 2.18 2.04 ] \mathbf{x} = \begin{bmatrix} \frac{9}{50} & \frac{-1}{25} \\ \frac{-1}{25} & \frac{3}{25} \end{bmatrix} \begin{bmatrix} -9 \\ 14 \end{bmatrix} = \begin{bmatrix} \frac{-109}{50} \\ \frac{51}{25} \end{bmatrix} = \begin{bmatrix} -2.18 \\ 2.04 \end{bmatrix} x = [ 50 9 25 − 1 25 − 1 25 3 ] [ − 9 14 ] = [ 50 − 109 25 51 ] = [ − 2.18 2.04 ]
Final Answer:
The correct answer is Option - B
The orthogonal projection of b \mathbf{b} b onto Col ( A ) \text{Col}(A) Col ( A ) is [ 313 50 − 58 25 19 10 ] \begin{bmatrix} \frac{313}{50} \\ -\frac{58}{25} \\ \frac{19}{10} \end{bmatrix} 50 313 − 25 58 10 19
The least-squares solution is x = [ − 109 50 51 25 ] \mathbf{x} = \begin{bmatrix} \frac{-109}{50} \\ \frac{51}{25} \end{bmatrix} x = [ 50 − 109 25 51 ]
Please comment below if you find any error in this solution.
If this solution helps, then please share this with your friends.
Please subscribe to my
Youtube channel for video solutions to similar questions.
Keep Smiling :-)
Leave a comment