# Projection onto Col(A)

$A=\begin{bmatrix} 1 & -3 & -3\\ 1 & 5 &1 \\ 1& 7 & 2 \end{bmatrix}$ , $\vec{b}=\begin{bmatrix} 5\\ -3\\ -5 \end{bmatrix}$

Part (c) of this question is what I am struggling with. Here is the rest of the question for context.

(a) Find an orthogonal basis for Col(A).

I have used the Gram-Schmidt process to create the set of vectors:

$\begin{bmatrix} 1\\ 1\\ 1 \end{bmatrix}$ , $\begin{bmatrix} -6\\ 2\\ 4 \end{bmatrix}$ , $\begin{bmatrix} -18\\ 6\\ 12 \end{bmatrix}$.

(b) Find a basis for Nul(A)

I set up $A\vec{x}=0$, and got the following as the basis: $\begin{bmatrix} 3\\ 1\\ 0 \end{bmatrix}$, $\begin{bmatrix} 3\\ 0\\ 1 \end{bmatrix}$.

(c) Find the projection $\hat{b}$ of $\vec{b}$ onto Col(A).

Now, this is where I'm getting thrown off. Not because I do not understand how to do this calculation, but because I'm not sure what I am projecting onto. What I know is that Col(A) is the set of all linear combinations of the columns of $A$. So, at first glance I thought to project $\vec{b}$ onto the columns of $A$. However, part of me thinks I should project $\vec{b}$ onto the orthogonal basis for Col(A), because that was the first part of this question.

Am I overthinking what part (c) is asking?

• The third vector in your purported basis is three times the second, so the sent isn’t linearly independent. You’ve made an error in orthogonalizing the columns of $A$.
– amd
Apr 25, 2018 at 4:58
• I realize I made a mistake in part (a). When I go back and fix my error by doing Gram-Schmidt method, I get (1,1,1),(-6,2,4),(0,0,0) which is still wrong because the zero vector. I've checked it now 3 times and I keep getting that zero vector no matter what. I'm not sure what I'm doing wrong. Apr 25, 2018 at 13:47
• That’s not wrong. If G-S spits out a zero vector, this means that the one you fed in is linearly dependent on the others and should be discarded. The matrix $A$ doesn’t have full rank, as you should have discovered when you solved $A\vec x=0$, so you can’t have a set three linearly-independent elements of the column space.
– amd
Apr 25, 2018 at 17:05
• Why did you delete your (good) question after getting an answer? May 10, 2018 at 8:45

Guide:

You have made a mistake earlier, if the basis in part $(a)$ has $3$ element and the basis in part $(b)$ has $2$ elements, this violates rank-nullity theorem which says that $$\operatorname{rank}(A)+\operatorname{nullity}(A) = 3$$

where $3$ is the number of columns.

Part $(a)$ should have $2$ elements in the basis and part $(b)$ should have $1$ element.

Orthogonal basis makes computation of projection easier. If the basis that you find in part $(a)$ is $\{ a_1, a_2\}$ To find projection $\vec{b}$ onto the the column space, just compute $\frac{\vec{b}^Ta_1}{\|a_1\|^2}(a_1) + \frac{\vec{b}^Ta_2}{\|a_2\|^2}(a_2)$

Alternatively, suppse the answer in part $(b)$ is $\{v\}$, then computing $\vec{b}-\frac{(\vec{b}^Tv)}{\|v\|^2}v$ works too.

• I was under the impression that the orthogonal basis for Col A is not the same as just the basis for Col A, which I would agree with you is just (1,1,1) because dim Nul(A)=2. Apr 25, 2018 at 13:49
• The difference between orthogonal basis and a regular basis is that the orthogonal basis must be orthogonal. Note that $\operatorname{dim(Nul}(A))=1$. Apr 25, 2018 at 17:04