Find the matrix A of the orthogonal projection onto the line L in R2 that consists of all scalar multiples of the vector $\begin{pmatrix} 2 \\ 3 \ \end{pmatrix}$. How do I begin to solve this? Any help would be appreciated.
[Math] Finding the matrix of projection
linear algebra
Related Solutions
Let $L$ be the line spanned by some non-zero vector $\mathbf{v} \in \mathbb{R}^3$, so that $L = \{a\mathbf{v} \mid a \in \mathbb{R}\}$ is the space of all scalar multiples of $\mathbf{v}$. Then the orthogonal projection of a vector $\mathbf{x} \in \mathbb{R}^3$ onto the line $L$ can be computed as $$ \operatorname{Proj}_L(\mathbf{x}) = \frac{\mathbf{v} \cdot \mathbf{x}}{\mathbf{v}\cdot\mathbf{v}} \mathbf{v}. $$ So, in this case, we have $$ \mathbf{v} = \begin{pmatrix}2\\1\\2\end{pmatrix}, \quad \mathbf{x} = \begin{pmatrix}1\\4\\1\end{pmatrix}, $$ so that $$ \mathbf{v} \cdot \mathbf{x} = 2 \cdot 1 + 1 \cdot 4 + 2 \cdot 1 = 8, \quad \mathbf{v} \cdot \mathbf{v} = 2^2 + 1^2 + 2^2 = 9, $$ and hence $$ \operatorname{Proj}_L(\mathbf{x}) = \frac{8}{9}\begin{pmatrix}2\\1\\2\end{pmatrix}. $$
Now, you probably wanted to compute the orthogonal projection of some vector $\mathbf{x}$ onto the line $L$ spanned by some non-zero vector $\mathbf{v}$. But what if you did want to compute the reflection of $\mathbf{x}$ in the line $L$? What would this mean? Well, in general, suppose that $S$ is a subspace of $\mathbb{R}^3$ (e.g., a line through the origin or a plane through the origin), so that for any vector $\mathbf{x} \in \mathbb{R}^3$, we have $$ \mathbf{x} = \operatorname{Proj}_S(\mathbf{x}) + \operatorname{Proj}_{S^\perp}(\mathbf{x}), $$ where $\operatorname{Proj}_S(\mathbf{x})$ is the orthogonal projection of $\mathbf{x}$ onto $S$ and $\operatorname{Proj}_{S^\perp}(\mathbf{x})$ is the orthogonal projection of $\mathbf{x}$ onto the orthogonal complement $$ S^\perp = \{\mathbf{y} \in \mathbb{R}^3 \mid \text{for every $\mathbf{z} \in S$}, \; \mathbf{y} \cdot \mathbf{z} = 0\} $$ of $S$; in particular, observe that $$ \operatorname{Proj}_{S^\perp}(\mathbf{x}) = \mathbf{x} - \operatorname{Proj}_S(\mathbf{x}). $$ Then, geometrically, the reflection $\operatorname{Refl}_S(\mathbf{x})$ of $\mathbf{x}$ in $S$ is given by fixing the component of $\mathbf{x}$ in $S$ and flipping the direction of the component of $\mathbf{x}$ in $S^\perp$, i.e., $$ \operatorname{Refl}_S(\mathbf{x}) = \operatorname{Proj}_S(\mathbf{x}) - \operatorname{Proj}_{S^\perp}(\mathbf{x}) = \operatorname{Proj}_S(\mathbf{x}) - \left( \mathbf{x} - \operatorname{Proj}_S(\mathbf{x})\right) = 2\operatorname{Proj}_S(\mathbf{x}) - \mathbf{x}. $$ So, suppose that $L$ is the line spanned by some non-zero vector $\mathbf{v} \in \mathbb{R}^3$. On the one hand, the reflection of $\mathbf{x}$ in $L$ is given by $$ \operatorname{Refl}_L(\mathbf{x}) = 2\operatorname{Proj}_L(\mathbf{x}) - \mathbf{x} = 2\frac{\mathbf{v} \cdot \mathbf{x}}{\mathbf{v}\cdot\mathbf{v}} \mathbf{v} - \mathbf{x}, $$ which in your case yields $$ \operatorname{Refl}_L(\mathbf{x}) = 2 \cdot \frac{8}{9}\begin{pmatrix}2\\1\\2\end{pmatrix} - \begin{pmatrix}1\\4\\1\end{pmatrix} = \frac{1}{9}\begin{pmatrix}23\\-20\\23\end{pmatrix}. $$ On the other hand, the reflection of $\mathbf{x}$ in the plane $$ L^\perp = \{\mathbf{y} \in \mathbb{R}^3 \mid \mathbf{v} \cdot \mathbf{y} = 0\} $$ with normal vector $\mathbf{v}$ is given by $$ \operatorname{Refl}_{L^\perp}(\mathbf{x}) = 2\operatorname{Proj}_{L^\perp}(\mathbf{x}) - \mathbf{x} = 2\left(\mathbf{x} - \operatorname{Proj}_L(\mathbf{x})\right) - \mathbf{x} = \mathbf{x} - 2\operatorname{Proj}_L(\mathbf{x}) = \mathbf{x} - 2\frac{\mathbf{v} \cdot \mathbf{x}}{\mathbf{v}\cdot\mathbf{v}} \mathbf{v}, $$ which in your case yields $$ \operatorname{Refl}_{L^\perp}(\mathbf{x}) = \begin{pmatrix}1\\4\\1\end{pmatrix} - 2 \cdot \frac{8}{9}\begin{pmatrix}2\\1\\2\end{pmatrix} = -\frac{1}{9}\begin{pmatrix}23\\-20\\23\end{pmatrix}. $$ One last cultural note: the reflection $\operatorname{Refl}_{L^\perp}(\mathbf{x})$ of $\mathbf{x}$ in the plane $L^\perp$ with normal vector $\mathbf{v}$ is better known in more advanced contexts by another name, namely as the image $$ H_{\mathbf{v}}(\mathbf{x}) := \operatorname{Refl}_{L^\perp}(\mathbf{x}) = \mathbf{x} - 2\frac{\mathbf{v} \cdot \mathbf{x}}{\mathbf{v}\cdot\mathbf{v}} \mathbf{v} $$ of $\mathbf{x}$ under the Householder transformation $H_\mathbf{v}$ corresponding to $\mathbf{v}$. So, in your case, as we just saw, $$ H_{\mathbf{v}}(\mathbf{x}) = -\frac{1}{9}\begin{pmatrix}23\\-20\\23\end{pmatrix}. $$
The lecturer simply chose two vectors $a_{1}$ and $a_{2}$ that are independent and contained in the plane $x+y-z=0$. He then applied the formula that you mentioned.
Best Answer
Hint:
The orthogonal projection of vector $v$ onto the mine directed by vector $u$ is given by $$p_u(v)=\frac{\langle v,u\rangle}{\langle u,u\rangle}\,u$$ Hence all you have to do is to calculate the projections of the vectors of the basis onto the vector $\begin{pmatrix}2\\3\end{pmatrix}$.