1. ## Orthogonal projection

I am not able to formulate the answer for the following question. I think it is one of the very basic questions in linear algebra..please help!

Find the matrix of the orthogonal projection in R2 onto the line x=-2y

2. Originally Posted by champrock
I am not able to formulate the answer for the following question. I think it is one of the very basic questions in linear algebra..please help!

Find the matrix of the orthogonal projection in R2 onto the line x=-2y
Let $\displaystyle \theta$ be the angle between this line and the negative x-axis.
Let $\displaystyle \pi_{\text{x}}$ be the projection onto the x-axis.
Let $\displaystyle R_{\theta}$ be the rotation by $\displaystyle \theta$.
Then the matrix you are looking for is given by $\displaystyle R_{-\theta}\pi_{\text{x}}R_{\theta}$.

3. can u tell me what will be the exact value of theta ? and what is the matrix $\displaystyle \pi_{\text{x}}$ in R2? i am slightly confused as to how to formulate this matrix.

thanks

4. Originally Posted by champrock
Find the matrix of the orthogonal projection in R2 onto the line x=-2y
First, find a unit vector in the range of the projection. This is $\displaystyle \bigl(\tfrac{-2}{\sqrt5},\tfrac1{\sqrt5}\bigr)$. Then the projection should take the vector (x,y) to $\displaystyle \bigl\langle(x,y),\bigl(\tfrac{-2}{\sqrt5},\tfrac1{\sqrt5}\bigr)\bigr\rangle \bigl(\tfrac{-2}{\sqrt5},\tfrac1{\sqrt5}\bigr) = \bigl(\tfrac45x-\tfrac25y, -\tfrac25x+\tfrac15y\bigr)$ (where the angled brackets denote the inner product). Thus the matrix of the projection is $\displaystyle \begin{bmatrix}\tfrac45&-\tfrac25\\ -\tfrac25&\tfrac15\end{bmatrix}$.

5. Originally Posted by champrock
can u tell me what will be the exact value of theta ? and what is the matrix $\displaystyle \pi_{\text{x}}$ in R2? i am slightly confused as to how to formulate this matrix.

thanks
Notice that $\displaystyle \tan \theta = \frac{1}{2}$ and $\displaystyle \pi_{\text{x}} = \begin{bmatrix} 1&0\\0&0 \end{bmatrix}$

6. Originally Posted by ThePerfectHacker
Notice that $\displaystyle \tan \theta = \frac{1}{2}$ and $\displaystyle \pi_{\text{x}} = \begin{bmatrix} 1&0\\0&0 \end{bmatrix}$
wont we need to somehow reduce the length of the vector also? Because the original vector has the length of (x^2 + y^2)^0.5 but the new projected vector will have a length of only (x) ?

Am i missing something or do we need to do it when we are doing similar transformations in R^3 ? for example when we are trying to project a vector in R^3 onto the x-y plane then what will be the matrix like? will be multiply the transformation matrix by
(x^2+y^2)^0.5 / (x^2+y^2 +z^2)^0.5
OR
(x^2+y^2 +z^2)^0.5 /(x^2+y^2)^0.5
?

7. Another way to do this:
(I assume you mean the matrix relative to the standard basis <1, 0> and <0, 1>. A linear transformation only has a basis relative to some basis.)

A vector in the direction of the line x= -2y is v= -2i+ j. The projection of u= i onto that is given by $\displaystyle \frac{u\cdot v}{v\cdot v}v$ which, here, is $\displaystyle \frac{-2}{5}(-2i+ j)= \frac{4}{5}i-\frac{2}{5}j$.

The projection of w= j onto that is given by $\displaystyle \frac{1}{5}(-2i+ j)= -\frac{2}{5}i+ \frac{1}{5}j$.

Since applying a linear transformation to the basis vectors in turn gives the columns of the matrix, the matrix corresponding to this projection, in the standard basis, is
$\displaystyle \begin{bmatrix}\frac{4}{5} & -\frac{2}{5} \\ -\frac{2}{5} & \frac{1}{5}\end{bmatrix}$