8
$\begingroup$

If I see a question that asks "find the projection a vector $b$ onto a matrix $A$" I would either solve by using $A^TA\hat x =A^Tb$ and then the projection would equal $A\hat x$,

and if the matrix $A$ was orthogonal then I would use $proj_bA = \frac{b \cdot q_1}{q_1 \cdot q_1}q_1 + ... + \frac{b \cdot q_k}{q_k \cdot q_k}q_k$ where $q_k$ represents the $k^{th}$ vector in matrix $A$.

My question is what if a question says find the projection of some vector $b$ onto the column/row space of matrix $A$?
What does this mean and what would I need to do differently to calculate it?

$\endgroup$
4
  • 1
    $\begingroup$ Projecting onto the row-space of $A$ is the same as projecting onto the column-space of $A^T$. $\endgroup$ Commented May 6, 2016 at 20:28
  • 2
    $\begingroup$ Solving $A^TA \hat x = A^Tb$ is "projective $b$ onto the column-space of the matrix $A$". Strictly speaking, it is non-sense to say that you're "projecting a vector onto a matrix". $\endgroup$ Commented May 6, 2016 at 20:29
  • $\begingroup$ @Omnomnomnom so if I have to project onto the row space I would use $AA^T\hat x=Ab$? $\endgroup$
    – idknuttin
    Commented May 6, 2016 at 20:38
  • 1
    $\begingroup$ Yep.${}{}{}{}{}{}$ $\endgroup$ Commented May 6, 2016 at 20:52

1 Answer 1

9
$\begingroup$

if the columns of matrix $A$ are linearly independent, the projection of a vector, $b$, onto the column space of A can be computed as

$$P=A(A^TA)^{-1}A^T$$

From here.

Wiki seems to say the same. It also says here that

The column space of $A$ is equal to the row space of $A^T$.

I'm guessing that

if the rows of matrix $A$ are linearly independent, the projection of a vector, $b$, onto the row space of A can be computed as

$$P=A^T(AA^T)^{-1}A$$

$\endgroup$
2
  • 1
    $\begingroup$ Is there a way to compute this more efficiently? E.g. using some decomposition? $\endgroup$ Commented Jun 22, 2021 at 9:32
  • 1
    $\begingroup$ @Euler_Salter no idea. try asking as a new question and then link it here. i'm curious as well. Edit: oh is this it? $\endgroup$
    – BCLC
    Commented Jul 4, 2021 at 19:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .