.. _over_detHW: Over-Determined Systems Homework ================================== #. When does the vector projection solution to an over-determined system of matrix equations give an exact solution to :math:`\mathbf{A}\,\bm{x} = \bm{b}`? #. Notice that this problem has more equations than unknowns. Still, form the :math:`\bf{A}` and :math:`\bm{b}` matrices in Python and compute the ranks of :math:`\bf{A}` and :math:`\left[\mathbf{A}\,\bm{b}\right]`. Is :math:`\bm{b}` in the column space of :math:`\bm{A}`? Can we find an exact solution, or only an approximate solution? .. math:: \begin{bmatrix} 15 & -3 & 15 \\ 10 & -6 & -7 \\ 5 & 8 & 1 \\ 0 & 6 & 2 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 24 \\ -9 \\ 22 \\ 14 \end{bmatrix} :: A = np.array([[15, -3, 15], [10, -6, -7], [5, 8, 1], [0, 6, 2]]).astype(float); print(A) b = np.array([[24, -9, 22, 14]]).astype(float).T; print(b) #. For the previous system of equations, use Python to find the solution from the projection equation and using the QR factorization. #. For the previous :math:`\bf{A}` matrix, use Python to find its pseudo-inverse, :math:`\mathbf{A}^+`. Verify that :math:`\bm{x} = \mathbf{A}^+\,\bm{b}` finds the same result as found from the projection equation and from QR.